Esporta (0) Stampa
Espandi tutto

Classe OnDemandTransferOptions

Specifies options for an on-demand transfer.

Spazio dei nomi: Microsoft.WindowsAzure.Diagnostics.Management
Assembly: Microsoft.WindowsAzure.Diagnostics (in 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.


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


Tutti i membri statici pubblici (Shared in Visual Basic) di questo tipo sono thread-safe. I membri di istanza non sono garantiti come thread-safe.

Piattaforme di sviluppo

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Server 2008 e Windows 2000

Piattaforme di destinazione

Aggiunte alla community

© 2014 Microsoft