xml/Azure.Cosmos/ItemRequestOptions.xml (186 lines of code) (raw):

<Type Name="ItemRequestOptions" FullName="Azure.Cosmos.ItemRequestOptions"> <TypeSignature Language="C#" Value="public class ItemRequestOptions : Azure.Cosmos.RequestOptions" /> <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ItemRequestOptions extends Azure.Cosmos.RequestOptions" /> <TypeSignature Language="DocId" Value="T:Azure.Cosmos.ItemRequestOptions" /> <TypeSignature Language="VB.NET" Value="Public Class ItemRequestOptions&#xA;Inherits RequestOptions" /> <TypeSignature Language="F#" Value="type ItemRequestOptions = class&#xA; inherit RequestOptions" /> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <Base> <BaseTypeName>Azure.Cosmos.RequestOptions</BaseTypeName> </Base> <Interfaces /> <Docs> <summary> Cosmos item request options </summary> <remarks>To be added.</remarks> </Docs> <Members> <Member MemberName=".ctor"> <MemberSignature Language="C#" Value="public ItemRequestOptions ();" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.ItemRequestOptions.#ctor" /> <MemberSignature Language="VB.NET" Value="Public Sub New ()" /> <MemberType>Constructor</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <Parameters /> <Docs> <summary>To be added.</summary> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="ConsistencyLevel"> <MemberSignature Language="C#" Value="public Azure.Cosmos.ConsistencyLevel? ConsistencyLevel { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;valuetype Azure.Cosmos.ConsistencyLevel&gt; ConsistencyLevel" /> <MemberSignature Language="DocId" Value="P:Azure.Cosmos.ItemRequestOptions.ConsistencyLevel" /> <MemberSignature Language="VB.NET" Value="Public Property ConsistencyLevel As Nullable(Of ConsistencyLevel)" /> <MemberSignature Language="F#" Value="member this.ConsistencyLevel : Nullable&lt;Azure.Cosmos.ConsistencyLevel&gt; with get, set" Usage="Azure.Cosmos.ItemRequestOptions.ConsistencyLevel" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;Azure.Cosmos.ConsistencyLevel&gt;</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets the consistency level required for the request in the Azure Cosmos DB service. </summary> <value> The consistency level required for the request. </value> <remarks> Azure Cosmos DB offers 5 different consistency levels. Strong, Bounded Staleness, Session, Consistent Prefix and Eventual - in order of strongest to weakest consistency. <see cref="T:Microsoft.Azure.Cosmos.ConnectionPolicy" /><para> While this is set at a database account level, Azure Cosmos DB allows a developer to override the default consistency level for each individual request. </para></remarks> </Docs> </Member> <Member MemberName="IndexingDirective"> <MemberSignature Language="C#" Value="public Azure.Cosmos.IndexingDirective? IndexingDirective { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;valuetype Azure.Cosmos.IndexingDirective&gt; IndexingDirective" /> <MemberSignature Language="DocId" Value="P:Azure.Cosmos.ItemRequestOptions.IndexingDirective" /> <MemberSignature Language="VB.NET" Value="Public Property IndexingDirective As Nullable(Of IndexingDirective)" /> <MemberSignature Language="F#" Value="member this.IndexingDirective : Nullable&lt;Azure.Cosmos.IndexingDirective&gt; with get, set" Usage="Azure.Cosmos.ItemRequestOptions.IndexingDirective" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;Azure.Cosmos.IndexingDirective&gt;</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets the indexing directive (Include or Exclude) for the request in the Azure Cosmos DB service. </summary> <value> The indexing directive to use with a request. </value> <remarks>To be added.</remarks> <altmember cref="P:Azure.Cosmos.ItemRequestOptions.IndexingDirective" /> <altmember cref="T:Azure.Cosmos.IndexingPolicy" /> </Docs> </Member> <Member MemberName="PostTriggers"> <MemberSignature Language="C#" Value="public System.Collections.Generic.IEnumerable&lt;string&gt; PostTriggers { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IEnumerable`1&lt;string&gt; PostTriggers" /> <MemberSignature Language="DocId" Value="P:Azure.Cosmos.ItemRequestOptions.PostTriggers" /> <MemberSignature Language="VB.NET" Value="Public Property PostTriggers As IEnumerable(Of String)" /> <MemberSignature Language="F#" Value="member this.PostTriggers : seq&lt;string&gt; with get, set" Usage="Azure.Cosmos.ItemRequestOptions.PostTriggers" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Collections.Generic.IEnumerable&lt;System.String&gt;</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets the trigger to be invoked after the operation in the Azure Cosmos DB service. </summary> <value> The trigger to be invoked after the operation. </value> <remarks> Only valid when used with Create, Replace and Delete methods for documents. Currently only one PreTrigger is permitted per operation. </remarks> </Docs> </Member> <Member MemberName="PreTriggers"> <MemberSignature Language="C#" Value="public System.Collections.Generic.IEnumerable&lt;string&gt; PreTriggers { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IEnumerable`1&lt;string&gt; PreTriggers" /> <MemberSignature Language="DocId" Value="P:Azure.Cosmos.ItemRequestOptions.PreTriggers" /> <MemberSignature Language="VB.NET" Value="Public Property PreTriggers As IEnumerable(Of String)" /> <MemberSignature Language="F#" Value="member this.PreTriggers : seq&lt;string&gt; with get, set" Usage="Azure.Cosmos.ItemRequestOptions.PreTriggers" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Collections.Generic.IEnumerable&lt;System.String&gt;</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets the trigger to be invoked before the operation in the Azure Cosmos DB service. </summary> <value> The trigger to be invoked before the operation. </value> <remarks> Only valid when used with Create, Replace and Delete methods for documents. Currently only one PreTrigger is permitted per operation. </remarks> </Docs> </Member> <Member MemberName="SessionToken"> <MemberSignature Language="C#" Value="public string SessionToken { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance string SessionToken" /> <MemberSignature Language="DocId" Value="P:Azure.Cosmos.ItemRequestOptions.SessionToken" /> <MemberSignature Language="VB.NET" Value="Public Property SessionToken As String" /> <MemberSignature Language="F#" Value="member this.SessionToken : string with get, set" Usage="Azure.Cosmos.ItemRequestOptions.SessionToken" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets the token for use with session consistency in the Azure Cosmos DB service. </summary> <value> The token for use with session consistency. </value> <remarks> One of the <see cref="P:Azure.Cosmos.ItemRequestOptions.ConsistencyLevel" /> for Azure Cosmos DB is Session. In fact, this is the default level applied to accounts. <para> When working with Session consistency, each new write request to Azure Cosmos DB is assigned a new SessionToken. The DocumentClient will use this token internally with each read/query request to ensure that the set consistency level is maintained. <para> In some scenarios you need to manage this Session yourself; Consider a web application with multiple nodes, each node will have its own instance of <see cref="T:Azure.Cosmos.CosmosClient" /> If you wanted these nodes to participate in the same session (to be able read your own writes consistently across web tiers) you would have to send the SessionToken from the response of the write action on one node to the client tier, using a cookie or some other mechanism, and have that token flow back to the web tier for subsequent reads. If you are using a round-robin load balancer which does not maintain session affinity between requests, such as the Azure Load Balancer, the read could potentially land on a different node to the write request, where the session was created. </para><para> If you do not flow the Azure Cosmos DB SessionToken across as described above you could end up with inconsistent read results for a period of time. </para></para></remarks> </Docs> </Member> </Members> </Type>