Permalink
Fetching contributors…
Cannot retrieve contributors at this time
322 lines (321 sloc) 18.1 KB
<Type Name="MobileServiceContractResolver" FullName="Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver">
<TypeSignature Language="C#" Value="public class MobileServiceContractResolver : Newtonsoft.Json.Serialization.DefaultContractResolver" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit MobileServiceContractResolver extends Newtonsoft.Json.Serialization.DefaultContractResolver" />
<TypeSignature Language="DocId" Value="T:Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Mobile.Client</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Newtonsoft.Json.Serialization.DefaultContractResolver</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
An <see cref="T:Newtonsoft.Json.Serialization.IContractResolver" /> implementation that is used with the
<see cref="T:Microsoft.WindowsAzure.MobileServices.MobileServiceClient" />.
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public MobileServiceContractResolver ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver.#ctor" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyName>Microsoft.Azure.Mobile.Client</AssemblyName>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateMemberValueProvider">
<MemberSignature Language="C#" Value="protected override Newtonsoft.Json.Serialization.IValueProvider CreateMemberValueProvider (System.Reflection.MemberInfo member);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class Newtonsoft.Json.Serialization.IValueProvider CreateMemberValueProvider(class System.Reflection.MemberInfo member) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver.CreateMemberValueProvider(System.Reflection.MemberInfo)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyName>Microsoft.Azure.Mobile.Client</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Newtonsoft.Json.Serialization.IValueProvider</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="member" Type="System.Reflection.MemberInfo" />
</Parameters>
<Docs>
<param name="member">The member.</param>
<summary>
Creates the <see cref="T:Newtonsoft.Json.Serialization.IValueProvider" /> used by the serializer to get and set values from a member.
</summary>
<returns>The <see cref="T:Newtonsoft.Json.Serialization.IValueProvider" /> used by the serializer to get and set values from a member.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateObjectContract">
<MemberSignature Language="C#" Value="protected override Newtonsoft.Json.Serialization.JsonObjectContract CreateObjectContract (Type objectType);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class Newtonsoft.Json.Serialization.JsonObjectContract CreateObjectContract(class System.Type objectType) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver.CreateObjectContract(System.Type)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyName>Microsoft.Azure.Mobile.Client</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Newtonsoft.Json.Serialization.JsonObjectContract</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="objectType" Type="System.Type" />
</Parameters>
<Docs>
<param name="objectType">To be added.</param>
<summary>
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonObjectContract" /> that provides information about how
the given type should be serialized to JSON.
</summary>
<returns>
The <see cref="T:Newtonsoft.Json.Serialization.JsonObjectContract" /> for the type.
</returns>
<remarks>
This method is overridden in order to catch types that have
<see cref="T:System.Runtime.Serialization.DataMemberAttribute" /> on one or more members without having a
<see cref="T:System.Runtime.Serialization.DataContractAttribute" /> on the type itself. This used to be supported
but no longer is and therefore an exception must be thrown for such types. The exception
informs the developer about how to correctly attribute the type with the
<see cref="T:Newtonsoft.Json.JsonPropertyAttribute" /> instead of the <see cref="T:System.Runtime.Serialization.DataMemberAttribute" />.
</remarks>
</Docs>
</Member>
<Member MemberName="CreateProperties">
<MemberSignature Language="C#" Value="protected override System.Collections.Generic.IList&lt;Newtonsoft.Json.Serialization.JsonProperty&gt; CreateProperties (Type type, Newtonsoft.Json.MemberSerialization memberSerialization);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Collections.Generic.IList`1&lt;class Newtonsoft.Json.Serialization.JsonProperty&gt; CreateProperties(class System.Type type, valuetype Newtonsoft.Json.MemberSerialization memberSerialization) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver.CreateProperties(System.Type,Newtonsoft.Json.MemberSerialization)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyName>Microsoft.Azure.Mobile.Client</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IList&lt;Newtonsoft.Json.Serialization.JsonProperty&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="type" Type="System.Type" />
<Parameter Name="memberSerialization" Type="Newtonsoft.Json.MemberSerialization" />
</Parameters>
<Docs>
<param name="type">
The type for which to create the collection of <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> instances.
</param>
<param name="memberSerialization">
Specifies the member serialization options for the type.
</param>
<summary>
Creates a collection of <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> instances for the members of a given
type.
</summary>
<returns>
A collection of <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> instances for the members of a given
type.
</returns>
<remarks>
This method is overridden in order to handle the id property of the type. Because multiple
property names ("id" with different casings) are all treated as the id property, we must
ensure that there is one and only one id property for the type. Also, the id property
should be ignored when it is the default or null value and it should always serialize to JSON
with a lowercase 'id' name.
This method also checks for and applies and system property attributes.
</remarks>
</Docs>
</Member>
<Member MemberName="CreateProperty">
<MemberSignature Language="C#" Value="protected override Newtonsoft.Json.Serialization.JsonProperty CreateProperty (System.Reflection.MemberInfo member, Newtonsoft.Json.MemberSerialization memberSerialization);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class Newtonsoft.Json.Serialization.JsonProperty CreateProperty(class System.Reflection.MemberInfo member, valuetype Newtonsoft.Json.MemberSerialization memberSerialization) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver.CreateProperty(System.Reflection.MemberInfo,Newtonsoft.Json.MemberSerialization)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyName>Microsoft.Azure.Mobile.Client</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Newtonsoft.Json.Serialization.JsonProperty</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="member" Type="System.Reflection.MemberInfo" />
<Parameter Name="memberSerialization" Type="Newtonsoft.Json.MemberSerialization" />
</Parameters>
<Docs>
<param name="member">
The <see cref="T:System.Reflection.MemberInfo" /> for which to creat the <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" />.
</param>
<param name="memberSerialization">
Specifies the member serialization options for the member.
</param>
<summary>
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> for a given <see cref="T:System.Reflection.MemberInfo" /> instance.
</summary>
<returns>
A <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> for a given <see cref="T:System.Reflection.MemberInfo" /> instance.
</returns>
<remarks>
This method is overridden in order set specialized <see cref="T:Newtonsoft.Json.Serialization.IValueProvider" />
implementations for certain property types. The date types (<see cref="T:System.DateTime" />,
<see cref="T:System.DateTimeOffset" />) require conversion to UTC dates on serialization and to
local dates on deserialization. The numerical types (<see cref="T:System.Int64" />, <see cref="T:System.UInt64" />,
<see cref="T:System.Decimal" />) require checks to ensure that precision will not be lost on
the server.
</remarks>
</Docs>
</Member>
<Member MemberName="ResolveIdProperty">
<MemberSignature Language="C#" Value="public virtual Newtonsoft.Json.Serialization.JsonProperty ResolveIdProperty (Type type);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Newtonsoft.Json.Serialization.JsonProperty ResolveIdProperty(class System.Type type) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver.ResolveIdProperty(System.Type)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyName>Microsoft.Azure.Mobile.Client</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Newtonsoft.Json.Serialization.JsonProperty</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="type" Type="System.Type" />
</Parameters>
<Docs>
<param name="type">
The type for which to get the id <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" />.
</param>
<summary>
Returns the id <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> for the given type. The <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" />
can be used to get/set the id value of an instance of the given type.
</summary>
<returns>
The id <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" />.
</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ResolveProperty">
<MemberSignature Language="C#" Value="public virtual Newtonsoft.Json.Serialization.JsonProperty ResolveProperty (System.Reflection.MemberInfo member);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Newtonsoft.Json.Serialization.JsonProperty ResolveProperty(class System.Reflection.MemberInfo member) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver.ResolveProperty(System.Reflection.MemberInfo)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyName>Microsoft.Azure.Mobile.Client</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Newtonsoft.Json.Serialization.JsonProperty</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="member" Type="System.Reflection.MemberInfo" />
</Parameters>
<Docs>
<param name="member">
The <see cref="T:System.Reflection.MemberInfo" /> for which to get the <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" />.
</param>
<summary>
Returns the <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> for the given <see cref="T:System.Reflection.MemberInfo" /> instance.
The <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> can be used to get information about how the
<see cref="T:System.Reflection.MemberInfo" /> should be serialized.
</summary>
<returns>
The <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> for the given <see cref="T:System.Reflection.MemberInfo" /> instance.
</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ResolvePropertyName">
<MemberSignature Language="C#" Value="protected override string ResolvePropertyName (string propertyName);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance string ResolvePropertyName(string propertyName) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver.ResolvePropertyName(System.String)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyName>Microsoft.Azure.Mobile.Client</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="propertyName" Type="System.String" />
</Parameters>
<Docs>
<param name="propertyName">
The property name to be resolved.
</param>
<summary>
Returns the name that should be serialized into JSON for a given property name.
</summary>
<returns>
The resolved property name.
</returns>
<remarks>
This method is overridden to support camel-casing the property names.
</remarks>
</Docs>
</Member>
<Member MemberName="ResolveSystemProperties">
<MemberSignature Language="C#" Value="public virtual Microsoft.WindowsAzure.MobileServices.MobileServiceSystemProperties ResolveSystemProperties (Type type);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance valuetype Microsoft.WindowsAzure.MobileServices.MobileServiceSystemProperties ResolveSystemProperties(class System.Type type) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver.ResolveSystemProperties(System.Type)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyName>Microsoft.Azure.Mobile.Client</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.WindowsAzure.MobileServices.MobileServiceSystemProperties</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="type" Type="System.Type" />
</Parameters>
<Docs>
<param name="type">The type for which to get the system properties.</param>
<summary>
Returns the system properties as a comma seperated list for a
given type. Returns null if the type does not support system properties.
</summary>
<returns>
The system properties as a comma seperated list for the given type or null
if the type does not support system properties.
</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ResolveTableName">
<MemberSignature Language="C#" Value="public virtual string ResolveTableName (Type type);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance string ResolveTableName(class System.Type type) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.WindowsAzure.MobileServices.MobileServiceContractResolver.ResolveTableName(System.Type)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyName>Microsoft.Azure.Mobile.Client</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="type" Type="System.Type" />
</Parameters>
<Docs>
<param name="type">
The type for which to return the table name.
</param>
<summary>
Returns a table name for a type and accounts for table renaming
via the DataContractAttribute, DataTableAttribute and/or the JsonObjectAttribute.
</summary>
<returns>
The table name.
</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>