Table of Contents

Class OperationContext

Namespace
Microsoft.WindowsAzure.Storage
Assembly
Microsoft.WindowsAzure.Storage.dll

Represents the context for a request operation against the storage service, and provides additional runtime information about its execution.

public sealed class OperationContext
Inheritance
OperationContext
Inherited Members

Constructors

OperationContext()

Initializes a new instance of the OperationContext class.

public OperationContext()

Properties

ClientRequestID

Gets or sets the client request ID.

public string ClientRequestID { get; set; }

Property Value

string

A string containing the client request ID.

CustomUserAgent

Gets or sets a custom UserAgent value to be prepended to the existing library UserAgent.

public string CustomUserAgent { get; set; }

Property Value

string

A string containing the specified UserAgent value.

Remarks

This value will be overridden if the UserAgent value is modified via SendingRequestEvent (per instance or global).

DefaultLogLevel

Gets or sets the default logging level to be used for subsequently created instances of the OperationContext class.

public static LogLevel DefaultLogLevel { get; set; }

Property Value

LogLevel

A value of type LogLevel that specifies which events are logged by default by instances of the OperationContext.

EndTime

Gets or sets the end time of the operation.

public DateTime EndTime { get; set; }

Property Value

DateTime

A DateTime value indicating the end time of the operation.

LastResult

Gets the last request result encountered for the operation.

public RequestResult LastResult { get; }

Property Value

RequestResult

A RequestResult object that represents the last request result.

LogLevel

Gets or sets the logging level to be used for an instance of the OperationContext class.

public LogLevel LogLevel { get; set; }

Property Value

LogLevel

A value of type LogLevel that specifies which events are logged by the OperationContext.

Proxy

Gets or sets proxy information for the request.

public IWebProxy Proxy { get; set; }

Property Value

IWebProxy

RequestResults

Gets or sets the set of request results that the current operation has created.

public IList<RequestResult> RequestResults { get; }

Property Value

IList<RequestResult>

An IList object that contains RequestResult objects that represent the request results created by the current operation.

StartTime

Gets or sets the start time of the operation.

public DateTime StartTime { get; set; }

Property Value

DateTime

A DateTime value indicating the start time of the operation.

UserHeaders

Gets or sets additional headers on the request, for example, for proxy or logging information.

public IDictionary<string, string> UserHeaders { get; set; }

Property Value

IDictionary<string, string>

A IDictionary<TKey, TValue> object containing additional header information.

Events

GlobalRequestCompleted

Occurs after a response has been fully received and processed.

public static event EventHandler<RequestEventArgs> GlobalRequestCompleted

Event Type

EventHandler<RequestEventArgs>

GlobalResponseReceived

Occurs when a response is received from the server, before any processing or downloading.

public static event EventHandler<RequestEventArgs> GlobalResponseReceived

Event Type

EventHandler<RequestEventArgs>

GlobalRetrying

Occurs before a request is retried

public static event EventHandler<RequestEventArgs> GlobalRetrying

Event Type

EventHandler<RequestEventArgs>

GlobalSendingRequest

Occurs immediately before a request is signed.

public static event EventHandler<RequestEventArgs> GlobalSendingRequest

Event Type

EventHandler<RequestEventArgs>

RequestCompleted

Occurs after a response has been fully received and processed.

public event EventHandler<RequestEventArgs> RequestCompleted

Event Type

EventHandler<RequestEventArgs>

ResponseReceived

Occurs when a response is received from the service, before any processing or downloading.

public event EventHandler<RequestEventArgs> ResponseReceived

Event Type

EventHandler<RequestEventArgs>

Retrying

Occurs before a request is retried

public event EventHandler<RequestEventArgs> Retrying

Event Type

EventHandler<RequestEventArgs>

SendingRequest

Occurs immediately before a request is signed.

public event EventHandler<RequestEventArgs> SendingRequest

Event Type

EventHandler<RequestEventArgs>