購入Buy
1-855-856-7678
サポートSupport
OnDemandTransferOptions クラスは、ロール インスタンスから診断データを転送する際のオプションを指定するために使用されます。 たとえば、結果を返すための期間を指定できます。ログ レベルと固定記憶域の通知キューの名前も指定できます。
例
完全な OnDemandTransferOptions オブジェクトを作成し、オンデマンド転送を開始するコード スニペットを次に示します。
// Specify the on-demand transfer options for the diagnostic data. OnDemandTransferOptions transferOptions = new OnDemandTransferOptions(); // Get data starting from an hour ago until now. transferOptions.From = DateTime.UtcNow.AddHours(1.0); transferOptions.To = DateTime.UtcNow; // Specify only error-level logs. transferOptions.LogLevelFilter = LogLevel.Error; // Provide a name for the queue where completion messages will be stored. transferOptions.NotificationQueueName = "wad-on-demand-transfers"; // Start a transfer of Windows event logs. roleInstanceDiagnosticManager.BeginOnDemandTransfer(DataBufferName.PerformanceCounters, transferOptions);