This topic has not yet been rated - Rate this topic

DataServiceState.Serialize Method (DataServiceContext, Dictionary<String, Object>)

Windows Phone

March 22, 2012

Serializes a DataServiceContext object and a System.Collections.Generic.Dictionary{System.String,System.Object} of DataServiceCollection<T> objects.

Namespace:  System.Data.Services.Client
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)
public static string Serialize(
	DataServiceContext context,
	Dictionary<string, Object> collections
)

Parameters

context
Type: System.Data.Services.Client.DataServiceContext
A DataServiceContext object that is the root of any specified collections. A nullcontext indicates that all collections are non-tracked.
collections
Type: System.Collections.Generic.Dictionary<String, Object>
A Dictionary<TKey, TValue> of DataServiceCollection<T> objects. collections must be tracked by context when it is specified. Collections are not tracked when context is null. In the case of null collections, only the context will be serialized.

Return Value

Type: System.String
Returns a String that is the serialized equivalent of the specified DataServiceContext and DataServiceCollection<T> objects.

When a context and collections are specified, all collections must be tracked by the context or an InvalidOperationException exception will be thrown.

Windows Phone OS

Supported in: 7.1

Windows Phone

Did you find this helpful?
(1500 characters remaining)