Records a snapshot of the network state.
public:
static IAsyncAction^ LogNetworkStateAsync()
Type: IAsyncAction
Returns an IAsyncAction object that represents the state of the asynchronous operation.
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
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");
}
});
Namespace: Microsoft.Xbox.Tools.ConsoleExtensions
Metadata: microsoft.xbox.tools.consoleextensions.winmd