TraceManager.LogNetworkStateAsync Method

Records a snapshot of the network state.

Syntax

public:
static IAsyncAction^ LogNetworkStateAsync()  

Return value

Type: IAsyncAction 

Returns an IAsyncAction object that represents the state of the asynchronous operation.

Remarks

LogNetworkStateAsync is only valid for traces started with a TraceType of AdvancedMultiplayer. The typical usage pattern is to start an AdvancedMultiplayer trace using TraceManager::StartAsync, use LogNetworkStateAsync to record thenetwork state at various points during the trace, then to stop the trace using TraceManager::StopAsync

Example

var XtfTraceManager = Microsoft.Xbox.Tools.ConsoleExtensions.TraceManager;
XtfTraceManager.logNetworkStateAsync().then(
  function complete() {
    // Handle success here 
    writeLog("TraceManager.logNetworkStateAsync succeeded");
  }.bind(this),
  function error(e) {
    // Handle error here 
    writeError("TraceManager.logNetworkStateAsync error: ", e);
  }.bind(this)
);  

C++

Microsoft::Xbox::Tools::ConsoleExtensions::TraceManager::LogNetworkStateAsync()->Completed =
ref new Windows::Foundation::AsyncActionCompletedHandler(
[ this ] ( Windows::Foundation::IAsyncAction^ action, Windows::Foundation::AsyncStatus asyncStatus )
{
  if ( asyncStatus == Windows::Foundation::AsyncStatus::Completed )
  {
    OutputDebugStringW(L"ConsoleExtensions API call succeeded: TraceManager::LogNetworkStateAsync\r\n");
  }
  else
  {
    OutputDebugStringW(L"ConsoleExtensions API call failed: SimulationManager::LogNetworkStateAsync\r\n");
  }
});  

Requirements

Namespace: Microsoft.Xbox.Tools.ConsoleExtensions

Metadata: microsoft.xbox.tools.consoleextensions.winmd

See also

Reference

TraceManager Class

TraceManager Members

Microsoft.Xbox.Tools.ConsoleExtensions Namespace