匯出 (0) 列印
全部展開

OnDemandTransferOptions 類別

Specifies options for an on-demand transfer.

命名空間: Microsoft.WindowsAzure.Diagnostics.Management
組件: Microsoft.WindowsAzure.Diagnostics (在 microsoft.windowsazure.diagnostics.dll 中)

'用途
Dim instance As OnDemandTransferOptions

'宣告
Public Class OnDemandTransferOptions
public class OnDemandTransferOptions
public class OnDemandTransferOptions

The OnDemandTransferOptions class is used to specify options for transferring diagnostic data from a role instance. For example, you can specify a time period from which to return results, as well as specify logging levels and a name for the notification queue in persistent storage.

Example

The following code snippet creates a complete OnDemandTransferOptions object and starts an on-demand transfer.

// 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);


System.Object
  Microsoft.WindowsAzure.Diagnostics.Management.OnDemandTransferOptions

任何這個類型的公用靜態 (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。 並非所有的執行個體成員都是安全執行緒。

開發平台

Windows XP Home Edition, Windows XP Professional, Windows Server 2003、Windows Server 2008 和 Windows 2000

目標平台

社群新增項目

顯示:
© 2014 Microsoft