Partager via


OnDemandTransferOptions.To Property

 

Gets or sets the end of the time window for which event data is to be transferred.

Namespace:   Microsoft.WindowsAzure.Diagnostics.Management
Assembly:  Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)

Syntax

public DateTime To { get; set; }
public:
property DateTime To {
    DateTime get();
    void set(DateTime value);
}
member To : DateTime with get, set
Public Property To As Date

Property Value

Type: System.DateTime

Type: System.DateTime

Returns DateTime.

Remarks

The To property specifies the end time for a time period from which to return diagnostic data, in UTC. For example, the following code snippet specifies a To time of the current time:

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

Warning

This API is not supported in Azure SDK versions 2.5 and higher. Instead, use the diagnostics.wadcfg XML configuration file. For more information, see Collect Logging Data by Using Azure Diagnostics.

See Also

OnDemandTransferOptions Class
Microsoft.WindowsAzure.Diagnostics.Management Namespace

Return to top