AccessCondition Class

 

Updated: June 30, 2017

Represents a set of access conditions to be used for operations in the Azure DocumentDB database service.

Namespace:   Microsoft.Azure.Documents.Client
Assembly:  Microsoft.Azure.Documents.Client (in Microsoft.Azure.Documents.Client.dll)

SystemObject
  Microsoft.Azure.Documents.ClientAccessCondition

No code example is currently available or this language may not be supported.

NameDescription
System_CAPS_pubproperty

Gets or sets the value of the condition in the Azure DocumentDB database service.

System_CAPS_pubproperty

Gets or sets the condition type in the Azure DocumentDB database service.

NameDescription
System_CAPS_pubmethodEquals

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode

(Inherited from Object.)

System_CAPS_pubmethodGetType

(Inherited from Object.)

System_CAPS_pubmethodToString

(Inherited from Object.)

NameDescription
System_CAPS_pubmethodIsDefined

Determines if a certain property is defined or not. (Defined by TypeCheckFunctionsExtensions.)

System_CAPS_pubmethodIsNull

Determines if a certain property is null or not. (Defined by TypeCheckFunctionsExtensions.)

System_CAPS_pubmethodIsPrimitive

Determines if a certain property is of premitive JSON type. (Defined by TypeCheckFunctionsExtensions.)

The following example shows how to use AccessCondition with DocumentClient.


// If ETag is current, then this will succeed. Otherwise the request will fail with HTTP 412 Precondition Failure
await client.ReplaceDocumentAsync(
    readCopyOfBook.SelfLink, 
    new Book { Title = "Moby Dick", Price = 14.99 },
    new RequestOptions 
    { 
        AccessCondition = new AccessCondition 
        { 
            Condition = readCopyOfBook.ETag, 
            Type = AccessConditionType.IfMatch 
        } 
     });

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: