Permalink
Fetching contributors…
Cannot retrieve contributors at this time
225 lines (225 sloc) 12.2 KB
<Type Name="ResourceResponse&lt;TResource&gt;" FullName="Microsoft.Azure.Documents.Client.ResourceResponse&lt;TResource&gt;">
<TypeSignature Language="C#" Value="public class ResourceResponse&lt;TResource&gt; : Microsoft.Azure.Documents.Client.ResourceResponseBase, Microsoft.Azure.Documents.Client.IResourceResponse&lt;TResource&gt; where TResource : Resourcenew()" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ResourceResponse`1&lt;.ctor (class Microsoft.Azure.Documents.Resource) TResource&gt; extends Microsoft.Azure.Documents.Client.ResourceResponseBase implements class Microsoft.Azure.Documents.Client.IResourceResponse`1&lt;!TResource&gt;, class Microsoft.Azure.Documents.Client.IResourceResponseBase" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Documents.Client.ResourceResponse`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="TResource">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<BaseTypeName>Microsoft.Azure.Documents.Resource</BaseTypeName>
</Constraints>
</TypeParameter>
</TypeParameters>
<Base>
<BaseTypeName>Microsoft.Azure.Documents.Client.ResourceResponseBase</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>Microsoft.Azure.Documents.Client.IResourceResponse&lt;TResource&gt;</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<typeparam name="TResource">the resource type.</typeparam>
<summary>
Represents the template class used by methods returning single objects in the Azure DocumentDB database service.
</summary>
<remarks>
All responses from creates, reads, updates and deletes of Azure DocumentDB resources return the response wrapped in a
ResourceResponse object. This contains the metadata from the response headers from the Azure DocumentDB call including
the request units (RequestCharge), activity ID and quotas/usage of resources.
</remarks>
<example>
The following example extracts the request units consumed, activity ID and StatusCode from a CreateDocumentAsync call.
<code language="c#"><![CDATA[
ResourceResponse<Document> response = await client.CreateDocumentAsync(collectionLink, document);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<altmember cref="P:Microsoft.Azure.Documents.Client.ResourceResponse`1.Resource" />
<altmember cref="T:Microsoft.Azure.Documents.Client.FeedResponse`1" />
<example>
The following example extracts the request units consumed, activity ID and StatusCode from a CreateDocumentAsync call.
<code language="c#"><![CDATA[
ResourceResponse<Document> response = await client.CreateDocumentAsync(collectionLink, document);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the request units consumed, activity ID and StatusCode from a CreateDocumentAsync call.
<code language="c#"><![CDATA[
ResourceResponse<Document> response = await client.CreateDocumentAsync(collectionLink, document);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the request units consumed, activity ID and StatusCode from a CreateDocumentAsync call.
<code language="c#"><![CDATA[
ResourceResponse<Document> response = await client.CreateDocumentAsync(collectionLink, document);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the request units consumed, activity ID and StatusCode from a CreateDocumentAsync call.
<code language="c#"><![CDATA[
ResourceResponse<Document> response = await client.CreateDocumentAsync(collectionLink, document);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the request units consumed, activity ID and StatusCode from a CreateDocumentAsync call.
<code language="c#"><![CDATA[
ResourceResponse<Document> response = await client.CreateDocumentAsync(collectionLink, document);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the request units consumed, activity ID and StatusCode from a CreateDocumentAsync call.
<code language="c#"><![CDATA[
ResourceResponse<Document> response = await client.CreateDocumentAsync(collectionLink, document);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the request units consumed, activity ID and StatusCode from a CreateDocumentAsync call.
<code language="c#"><![CDATA[
ResourceResponse<Document> response = await client.CreateDocumentAsync(collectionLink, document);
Console.WriteLine(response.RequestCharge);
Console.WriteLine(response.ActivityId);
Console.WriteLine(response.StatusCode); // HttpStatusCode.Created or 201
]]></code></example>
<example>
The following example extracts the request units consumed, activity ID and StatusCode from a CreateDocumentAsync call.
<code language="c#"><![CDATA[
ResourceResponse<Document> response = await client.CreateDocumentAsync(collectionLink, document);
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 ResourceResponse ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.ResourceResponse`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 ResourceResponse (TResource resource);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(!TResource resource) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.ResourceResponse`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="resource" Type="TResource" />
</Parameters>
<Docs>
<param name="resource"></param>
<summary>
Constructor exposed for mocking purposes for the Azure DocumentDB database service.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="op_Implicit">
<MemberSignature Language="C#" Value="public static TResource op_Implicit (Microsoft.Azure.Documents.Client.ResourceResponse&lt;TResource&gt; source);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname !TResource op_Implicit(class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;!TResource&gt; source) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.ResourceResponse`1.op_Implicit(Microsoft.Azure.Documents.Client.ResourceResponse{`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>TResource</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="Microsoft.Azure.Documents.Client.ResourceResponse&lt;TResource&gt;" />
</Parameters>
<Docs>
<param name="source">The ResourceResponse source.</param>
<summary>
Returns the resource in the response implicitly from the Azure DocumentDB database service.
</summary>
<returns>The resource object.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Resource">
<MemberSignature Language="C#" Value="public TResource Resource { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance !TResource Resource" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.ResourceResponse`1.Resource" />
<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>TResource</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the resource returned in the response from the Azure DocumentDB database service.
</summary>
<value>
The resource returned in the response.
</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>