Permalink
Fetching contributors…
Cannot retrieve contributors at this time
231 lines (231 sloc) 12.7 KB
<Type Name="DocumentResponse&lt;TDocument&gt;" FullName="Microsoft.Azure.Documents.Client.DocumentResponse&lt;TDocument&gt;">
<TypeSignature Language="C#" Value="public sealed class DocumentResponse&lt;TDocument&gt; : Microsoft.Azure.Documents.Client.ResourceResponseBase, Microsoft.Azure.Documents.Client.IDocumentResponse&lt;TDocument&gt;" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit DocumentResponse`1&lt;TDocument&gt; extends Microsoft.Azure.Documents.Client.ResourceResponseBase implements class Microsoft.Azure.Documents.Client.IDocumentResponse`1&lt;!TDocument&gt;, class Microsoft.Azure.Documents.Client.IResourceResponseBase" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Documents.Client.DocumentResponse`1" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>1.14.0.0</AssemblyVersion>
<AssemblyVersion>1.16.0.0</AssemblyVersion>
<AssemblyVersion>1.17.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeParameters>
<TypeParameter Name="TDocument">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
</Constraints>
</TypeParameter>
</TypeParameters>
<Base>
<BaseTypeName>Microsoft.Azure.Documents.Client.ResourceResponseBase</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>Microsoft.Azure.Documents.Client.IDocumentResponse&lt;TDocument&gt;</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<typeparam name="TDocument">the document type.</typeparam>
<summary>
Represents the template class used by methods returning single objects in the Azure DocumentDB database service.
</summary>
<remarks>
Response from type-specific read of Document resource(ReadDocumentAsync{TDocument}) returns the response wrapped in a
DocumentResponse object. This contains the metadata from the response headers from the Azure DocumentDB call including
the request units (RequestCharge), activity ID, quotas/usage of resources and the typed document object(TDocument).
</remarks>
<example>
The following example extracts the CustomerName property, request units consumed, activity ID and StatusCode from a ReadDocumentAsync{Customer} call.
<code language="c#"><![CDATA[
DocumentResponse<Customer> response = await client.ReadDocumentAsync<Customer>(documentLink);
Console.WriteLine(response.Document.CustomerName);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the CustomerName property, request units consumed, activity ID and StatusCode from a ReadDocumentAsync{Customer} call.
<code language="c#"><![CDATA[
DocumentResponse<Customer> response = await client.ReadDocumentAsync<Customer>(documentLink);
Console.WriteLine(response.Document.CustomerName);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the CustomerName property, request units consumed, activity ID and StatusCode from a ReadDocumentAsync{Customer} call.
<code language="c#"><![CDATA[
DocumentResponse<Customer> response = await client.ReadDocumentAsync<Customer>(documentLink);
Console.WriteLine(response.Document.CustomerName);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the CustomerName property, request units consumed, activity ID and StatusCode from a ReadDocumentAsync{Customer} call.
<code language="c#"><![CDATA[
DocumentResponse<Customer> response = await client.ReadDocumentAsync<Customer>(documentLink);
Console.WriteLine(response.Document.CustomerName);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the CustomerName property, request units consumed, activity ID and StatusCode from a ReadDocumentAsync{Customer} call.
<code language="c#"><![CDATA[
DocumentResponse<Customer> response = await client.ReadDocumentAsync<Customer>(documentLink);
Console.WriteLine(response.Document.CustomerName);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the CustomerName property, request units consumed, activity ID and StatusCode from a ReadDocumentAsync{Customer} call.
<code language="c#"><![CDATA[
DocumentResponse<Customer> response = await client.ReadDocumentAsync<Customer>(documentLink);
Console.WriteLine(response.Document.CustomerName);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the CustomerName property, request units consumed, activity ID and StatusCode from a ReadDocumentAsync{Customer} call.
<code language="c#"><![CDATA[
DocumentResponse<Customer> response = await client.ReadDocumentAsync<Customer>(documentLink);
Console.WriteLine(response.Document.CustomerName);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the CustomerName property, request units consumed, activity ID and StatusCode from a ReadDocumentAsync{Customer} call.
<code language="c#"><![CDATA[
DocumentResponse<Customer> response = await client.ReadDocumentAsync<Customer>(documentLink);
Console.WriteLine(response.Document.CustomerName);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the CustomerName property, request units consumed, activity ID and StatusCode from a ReadDocumentAsync{Customer} call.
<code language="c#"><![CDATA[
DocumentResponse<Customer> response = await client.ReadDocumentAsync<Customer>(documentLink);
Console.WriteLine(response.Document.CustomerName);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentResponse ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentResponse`1.#ctor" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>1.14.0.0</AssemblyVersion>
<AssemblyVersion>1.16.0.0</AssemblyVersion>
<AssemblyVersion>1.17.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>
Constructor exposed for mocking purposes for the Azure DocumentDB database service.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentResponse (TDocument document);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(!TDocument document) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentResponse`1.#ctor(`0)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>1.14.0.0</AssemblyVersion>
<AssemblyVersion>1.16.0.0</AssemblyVersion>
<AssemblyVersion>1.17.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="document" Type="TDocument" />
</Parameters>
<Docs>
<param name="document"></param>
<summary>
Constructor exposed for mocking purposes for the Azure DocumentDB database service.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Document">
<MemberSignature Language="C#" Value="public TDocument Document { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance !TDocument Document" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.DocumentResponse`1.Document" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>1.14.0.0</AssemblyVersion>
<AssemblyVersion>1.16.0.0</AssemblyVersion>
<AssemblyVersion>1.17.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>TDocument</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the document returned in the response from the Azure DocumentDB database service.
</summary>
<value>
The document returned in the response.
</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="op_Implicit">
<MemberSignature Language="C#" Value="public static TDocument op_Implicit (Microsoft.Azure.Documents.Client.DocumentResponse&lt;TDocument&gt; source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname !TDocument op_Implicit(class Microsoft.Azure.Documents.Client.DocumentResponse`1&lt;!TDocument&gt; source) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentResponse`1.op_Implicit(Microsoft.Azure.Documents.Client.DocumentResponse{`0})~`0" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>1.14.0.0</AssemblyVersion>
<AssemblyVersion>1.16.0.0</AssemblyVersion>
<AssemblyVersion>1.17.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>TDocument</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="Microsoft.Azure.Documents.Client.DocumentResponse&lt;TDocument&gt;" />
</Parameters>
<Docs>
<param name="source">The DocumentResponse source.</param>
<summary>
Returns the document in the response implicitly from the Azure DocumentDB database service.
</summary>
<returns>The document object.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>