Microsoft.Data.Services.Client
Class with utility methods to help with debug only code.
Checks that the method which called this helper method
was not called by any code outside of the Microsoft.Data.OData.dll.
The method is only called when in DEBUG builds, since it's quite expensive and we expect
all our external callers to run DEBUG builds at least sometimes.
The method is also called when compiling for FxCop analysis, as we run our official FxCop
pass on RET build and we need to check that all internal methods call this one to check for accessibility
even though only in debug builds.
Checks that the method which called this helper method
was not called by any code outside of the Microsoft.Data.OData.dll.
Set to true if this check is called from a public method which should also be checked for non-external callers.
In that case, make sure that the calling method will not get inlined!
The method is only called when in DEBUG builds, since it's quite expensive and we expect
all our external callers to run DEBUG builds at least sometimes.
The method is also called when compiling for FxCop analysis, as we run our official FxCop
pass on RET build and we need to check that all internal methods call this one to check for accessibility
even though only in debug builds.
Class with utility methods to deal with EDM values
Converts a primitive OData value to the corresponding .
The primitive OData value to convert.
The for the primitive value (if available).
An for the .
Gets the clr value of the edm value based on its type.
The edm value.
The clr value
Converts a floating-point edm value to a clr value
The edm floating-point value.
Kind of the primitive.
The converted value
Converts an integer edm value to a clr value.
The integer value.
Kind of the primitive.
The converted value
Convert a primitive value which didn't match any of the known values of the enumeration.
The value to convert.
The expected primitive type or null.
The converted value.
Tries to convert the given value if it is of a type specific to the client library but still able to be mapped to EDM.
The value to convert.
The expected type of the value or null.
The converted value, if conversion was possible.
Whether or not conversion was possible.
Ensures a primitive type reference for a given primitive type kind.
The possibly null type reference.
The primitive type kind to ensure.
An instance created for the
if is null; if is not null, validates it and then returns it.
Extensibility point for customizing how OData entity metadata (edit-links, IDs, ETags, etc) is built.
Gets the edit link of the entity.
The absolute URI of the edit link for the entity.
Or null if it is not possible to determine the edit link.
Gets the read link of the entity.
The absolute URI of the read link for the entity.
Or null if it is not possible to determine the read link.
Gets the ID of the entity.
The ID for the entity.
Or null if it is not possible to determine the ID.
Gets the ETag of the entity.
The ETag for the entity.
Or null if it is not possible to determine the ETag.
Gets the edit link of a stream value.
The name of the stream property the edit link is computed for;
or null for the default media resource.
The absolute URI of the edit link for the specified stream property or the default media resource.
Or null if it is not possible to determine the stream edit link.
Gets the read link of a stream value.
The name of the stream property the read link is computed for;
or null for the default media resource.
The absolute URI of the read link for the specified stream property or the default media resource.
Or null if it is not possible to determine the stream read link.
Gets the navigation link URI for the specified navigation property.
The name of the navigation property to get the navigation link URI for.
The value of the link URI as seen on the wire or provided explicitly by the user or previously returned by the metadata builder, which may be null.
true if the value of the was seen on the wire or provided explicitly by the user or previously returned by
the metadata builder, false otherwise. This flag allows the metadata builder to determine whether a null navigation link url is an uninitialized value or a value that was set explicitly.
The navigation link URI for the navigation property.
null if its not possible to determine the navigation link for the specified navigation property.
Gets the association link URI for the specified navigation property.
The name of the navigation property to get the association link URI for.
The value of the link URI as seen on the wire or provided explicitly by the user or previously returned by the metadata builder, which may be null.
true if the value of the was seen on the wire or provided explicitly by the user or previously returned by
the metadata builder, false otherwise. This flag allows the metadata builder to determine whether a null association link url is an uninitialized value or a value that was set explicitly.
The association link URI for the navigation property.
null if its not possible to determine the association link for the specified navigation property.
Get the operation target URI for the specified .
The fully qualified name of the operation for which to get the target URI.
The binding parameter type name to include in the target, or null/empty if there is none.
The target URI for the operation.
null if it is not possible to determine the target URI for the specified operation.
Get the operation title for the specified .
The fully qualified name of the operation for which to get the target URI.
The title for the operation.
null if it is not possible to determine the title for the specified operation.
Extensibility point for customizing how OData uri's are built.
Builds the base URI for the entity container.
The base URI for the entity container.
This can be either an absolute URI,
or relative URI which will be combined with the URI of the metadata document for the service.
null if the model doesn't have the service base URI annotation.
Builds the URI for an entity set.
The URI to append to.
The entity set name.
The entity set URI.
Appends to create the entity instance URI for the specified .
The URI to append to
The entity instance to use.
The entity instance URI.
Builds the edit link for a stream property.
The URI to append to.
The name of the stream property the link is computed for;
or null for the default media resource.
The edit link for the stream.
Builds the read link for a stream property.
The URI to append to.
The name of the stream property the link is computed for;
or null for the default media resource.
The read link for the stream.
Builds the navigation link for the navigation property.
The URI to append to.
The name of the navigation property to get the navigation link URI for.
The navigation link URI for the navigation property.
Builds the association link for the navigation property.
The URI to append to.
The name of the navigation property to get the association link URI for.
The association link URI for the navigation property.
Builds the operation target URI for the specified .
The URI to append to.
The fully qualified name of the operation for which to get the target URI.
The binding parameter type name to include in the target, or null/empty if there is none.
The target URI for the operation.
Builds a URI with the given type name appended as a new segment on the base URI.
The URI to append to.
The fully qualified type name to append.
The URI with the type segment appended.
Shared JSON util code for ODataLib and Server.
Determines if the given double is serialized as a string in JSON.
The value to check.
true if the value should be written as a string, false if should be written as a JSON number.
Determines if the given primitive value is of a basic type where we can rely on just the JSON representation to convey type information.
If so, we don't have to write the type name.
The primitive value in question.
The type of the primitive value.
true if the given primitive value is of a basic JSON type, false otherwise.
A simple implementation of LazyOfT since the framework version is not available in all platforms we compile this code in...
Type to lazy create.
For thread safty in creating the value.
The factory method to create the lazy instance.
Holds the lazy instance to create.
true if the factory method has been called, false otherwise.
Creates an instance of ODataLazyOfT.
The factory method to create the lazy instance.
Creates an instance of ODataLazyOfT.
The factory method to create the lazy instance.
true if the value will be created in a thread safety, false assume single thread access to Value.
Creates the value.
Creates the value if it hasn't already been created and returns the created value.
Common defintions and functions for ALL product assemblies
Common defintions and functions for the server and client lib
Type of OutOfMemoryException.
Type of StackOverflowException.
Type of ThreadAbortException.
Determines whether the specified exception can be caught and
handled, or whether it should be allowed to continue unwinding.
to test.
true if the specified exception can be caught and handled;
false otherwise.
List of types unsupported by the client
Test whether a type is unsupported by the client lib
The type to test
Returns true if the type is not supported
Returns collection item type name or null if the provided type name is not a collection.
Collection type name read from payload.
Whether it is a nested (recursive) call.
Collection element type name or null if not a collection.
The following rules are used for collection type names:
- it has to start with "Collection(" and end with ")" - trailing and leading whitespaces make the type not to be recognized as collection.
- there is to be no characters (including whitespaces) between "Collection" and "(" - otherwise it won't be recognized as collection
- collection item type name has to be a non-empty string - i.e. "Collection()" won't be recognized as collection
- nested collection - e.g. "Collection(Collection(Edm.Int32))" - are not supported - we will throw
Note the following are examples of valid type names which are not collection:
- "Collection()"
- " Collection(Edm.Int32)"
- "Collection (Edm.Int32)"
- "Collection("
If the type name is not recognized as a collection it will be eventually passed to type resolver if it is not a known primitive type.
Convert the DataServiceProtocolVersion to ODataVersion.
DataServiceProtocolVersion value to convert.
an ODataVersion value for the given DataServiceProtocolVersion value.
Converts the given version instance to ODataVersion enum.
Version instance containing the response payload.
ODataVersion enum value for the given version.
Gets the type name (without namespace) of the specified ,
appropriate as an externally-visible type name.
Type to get name for.
The type name for .
Gets the type namespace of the specified ,
appropriate as an externally-visible type name.
Type to get namespace for.
The namespace for .
Tries to read a WCF Data Service version string.
Text to read.
Parsed version and trailing text.
true if the version was read successfully; false otherwise.
Set the message quota limits for WCF Data services server.
Instance of ODataMessageQuotas.
Provides helper methods for processing HTTP requests.
UTF-8 encoding, without the BOM preamble.
While a BOM preamble on UTF8 is generally benign, it seems that some MIME handlers under IE6 will not
process the payload correctly when included.
Because the data service should include the encoding as part of the Content-Type in the response,
there should be no ambiguity as to what encoding is being used.
For further information, see http://www.unicode.org/faq/utf_bom.html#BOM.
Reads a Content-Type header and extracts the MIME type/subtype.
The Content-Type header.
The MIME type in standard type/subtype form, without parameters.
parameters of content type
Builds a Content-Type given the mime type and all the parameters.
The MIME type in standard type/subtype form, without parameters.
Parameters to be appended in the mime type.
content type containing the mime type and all the parameters.
Reads a Content-Type header and extracts the MIME type/subtype and encoding.
The Content-Type header.
The MIME type in standard type/subtype form, without parameters.
Encoding (possibly null).
parameters of content type
Gets the named encoding if specified.
Name (possibly null or empty).
The named encoding if specified; the encoding for HTTP missing
charset specification otherwise.
See http://tools.ietf.org/html/rfc2616#section-3.4.1 for details.
Reads the type and subtype specifications for a MIME type.
Text in which specification exists.
Pointer into text.
Type of media found.
Subtype of media found.
Reads a media type definition as used in a Content-Type header.
Text to read.
The defined by the specified
All syntactic errors will produce a 400 - Bad Request status code.
Reads a token on the specified text by advancing an index on it.
Text to read token from.
Index for the position being scanned on text.
true if the end of the text was reached; false otherwise.
Skips whitespace in the specified text by advancing an index to
the next non-whitespace character.
Text to scan.
Index to begin scanning from.
true if the end of the string was reached, false otherwise.
Read a parameter for a media type/range.
Text to read from.
Pointer in text.
Array with parameters to grow as necessary.
Reads Mime type parameter value for a particular parameter in the Content-Type/Accept headers.
Name of parameter.
Header text.
Parsing index in .
String representing the value of the parameter.
Determines whether the specified character is a valid HTTP separator.
Character to verify.
true if c is a separator; false otherwise.
See RFC 2616 2.2 for further information.
Determines whether the specified character is a valid HTTP header token character.
Character to verify.
true if c is a valid HTTP header token character; false otherwise.
Encoding to fall back to an appropriate encoding is not available.
Encoding implied by an unspecified encoding value.
See http://tools.ietf.org/html/rfc2616#section-3.4.1 for details.
Class to store media parameter information.
Creates a new instance of MediaParameter.
Name of the parameter.
Value of the parameter.
True if the value of the parameter is quoted, otherwise false.
Gets the original value of the parameter.
the original value of the parameter.
Gets the name of the parameter.
Value of the parameter.
true if the value is quoted, otherwise false.
Use this class to represent a media type definition.
Parameters specified on the media type.
Sub-type specification (for example, 'plain').
Type specification (for example, 'text').
Initializes a new read-only instance.
Type specification (for example, 'text').
Sub-type specification (for example, 'plain').
Parameters specified on the media type.
Selects the encoding appropriate for this media type specification
(possibly null).
The encoding explicitly defined on the media type specification, or
the default encoding for well-known media types.
As per http://tools.ietf.org/html/rfc2616#section-3.7, the type,
subtype and parameter name attributes are case-insensitive.
Returns the MIME type in standard type/subtype form, without parameters.
media type parameters
Component for formatting literals for use in URIs, ETags, and skip-tokens.
Constant table of nibble-to-hex convertion values.
Default singleton instance for parenthetical keys, etags, or skiptokens.
Default singleton instance for keys formatted as segments.
Gets the literal formatter for keys.
if set to true then the key is going to be written as a segment, rather than in parentheses.
The literal formatter for keys.
Converts the specified value to an encoded, serializable string for URI key.
Non-null value to convert.
value converted to a serializable string for URI key.
Escapes the result accoridng to URI escaping rules.
The result to escape.
The escaped string.
Converts the given byte[] into string.
byte[] that needs to be converted.
String containing hex values representing the byte[].
Formats the literal without a type prefix, quotes, or escaping.
The non-null value to format.
The formatted literal, without type marker or quotes.
Formats the literal without a type prefix or quotes, but does escape it.
The non-null value to format.
The formatted literal, without type marker or quotes.
Gets the literal formatter for URL constants.
Helper utilities that capture any deltas between ODL, the WCF DS Client, and the WCF DS Server.
Creates a new exception instance to be thrown if the value is not a type that can be formatted as a literal.
DEVNOTE: Will return a different exception depending on whether this is ODataLib, the WCF DS Server, or the WCF DS client.
The literal value that could not be converted.
The exception that should be thrown.
Tries to convert the given value to one of the standard recognized types. Used specifically for handling XML and binary types.
The original value.
The value converted to one of the standard types.
Whether or not the value was converted.
Appends the decimal marker to string form of double value if necessary.
DEVNOTE: Only used by the client and ODL, for legacy/back-compat reasons.
Input string.
String with decimal marker optionally added.
Returns whether a 'd' literal suffix to a double value based on its value.
DEVNOTE: The WCF DS client never added the 'd', but WCF DS Server and ODL do.
The value itself.
Whether or not to append the 'd' suffix.
Tries to convert an instance of System.Data.Linq.Binary to a byte array.
The original value which might be an instance of System.Data.Linq.Binary.
The converted byte array, if it was converted.
Whether or not the value was converted.
Default literal formatter implementation.
If true, literals will not be URL encoded.
Creates a new instance of .
Creates a new instance of .
If true, literals will not be URL encoded.
Converts the specified value to an encoded, serializable string for URI key.
Non-null value to convert.
value converted to a serializable string for URI key.
Escapes the result accoridng to URI escaping rules.
The result to escape.
The escaped string.
Formats the literal with a type prefix and quotes (if the type requires it).
The value to format.
The formatted literal, with type marker if needed.
Literal formatter for keys which are written as URI segments.
Very similar to the default, but it never puts the type markers or single quotes around the value.
Creates a new instance of .
Converts the specified value to an encoded, serializable string for URI key.
Non-null value to convert.
value converted to a serializable string for URI key.
If the string starts with a '$', prepends another '$' to escape it.
The string value.
The string value with a leading '$' escaped, if one was present.
An implementation that supports delay-loading of properties.
The lock object for the delayed property loading.
An action that is used to create the properties for this type.
Initializes a new instance of the EdmComplexTypeWithDelayLoadedProperties class.
Namespace the entity belongs to.
Name of the entity.
The base type of this entity type.
Denotes an entity that cannot be instantiated.
An action that is used to create the properties for this type.
Ensures that the properties have been loaded and can be used.
Gets the properties declared immediately within this type.
An implementation that supports delay-loading of properties.
The lock object for the delayed property loading.
An action that is used to create the properties for this type.
Initializes a new instance of the EdmEntityTypeWithDelayLoadedProperties class.
Namespace the entity belongs to.
Name of the entity.
The base type of this entity type.
Denotes an entity that cannot be instantiated.
Denotes if the type is open.
An action that is used to create the properties for this type.
Ensures that the properties have been loaded and can be used.
Gets or sets the structural properties of the entity type that make up the entity key.
Gets the properties declared immediately within this type.
Component for serializing entity key values for building identities, edit links, etc.
Singleton instance of the default serializer.
Singleton instance of the segment-based serializer.
Creates a new key serializer.
The url convention to use.
A new key serializer.
Appends the key expression for an entity to the given
The type used to represent properties.
The builder to append onto.
The key properties.
The callback to get each property's name.
The callback to get each property's value.
Gets the value of the key property and serializes it to a string.
The type used to represent properties.
The callback to get the value for a property.
The key property.
The literal formatter to use.
The serialized key property value.
Appends the key using the parentheses-based syntax (e.g. Customers(1)) onto the given .
The builder to append onto.
The type used to represent properties.
The key properties.
The callback to get each property's name.
The callback to get each property's value.
Default implementation of the key serializer which uses parentheses (e.g. Customers(1)).
Appends the key expression for an entity to the given
The builder to append onto.
The type used to represent properties.
The key properties.
The callback to get each property's name.
The callback to get each property's value.
Implementation of the key serializer which uses segments (e.g. Customers/1).
Creates a new instance of .
Appends the key expression for an entity to the given
The builder to append onto.
The type used to represent properties.
The key properties.
The callback to get each property's name.
The callback to get each property's value.
Appends the key for the current resource using segment-based syntax (e.g. Customers/1) onto the given .
The builder to append onto.
The type used to represent properties.
The key properties.
The callback to get each property's value.
Component for representing the url convention in use by the server, client, or codegen.
The namespace of the term to use when building value annotations for indicating the conventions used.
The name of the term to use when building value annotations for indicating the conventions used.
The string value for indicating that the key-as-segment convention is being used in annotations and headers.
The name of the request header for indicating what conventions are being used.
Whether to generate entity keys as '/'-delimited segments instead of using parenthesis.
Prevents a default instance of the class from being created.
Whether keys should be generated as segments.
Helper for creating an instance with explicit value. Should only be called from unit tests.
Whether keys should be generated as segments.
A new UrlConvention instance with the given value.
Adds the required headers for the url convention.
The request headers to add to.
Whether to generate entity keys as '/'-delimited segments instead of using parenthesis.
Class that contains all the constants for various schemas.
"InitializeService" method name for service initialize.
id of the corresponding body
byte-length of the corresponding body
mime-type of the corresponding body
content disposition of the response (a hint how to handle the response)
'DataServiceVersion' - HTTP header name for data service version.
'MaxDataServiceVersion' - HTTP header name for maximum understood data service version.
'Prefer' - HTTP request header name for client preferences.
Refer to: http://tools.ietf.org/id/draft-snell-http-prefer-02.txt for details.
Return no content Prefer header hint value.
Return content Prefer header hint value.
'no-cache' - HTTP value for Cache-Control header.
'charset' - HTTP parameter name.
HTTP method name for GET requests.
HTTP method name for POST requests.
Http Put Method name - basically used for updating resource.
HTTP method name for delete requests.
HTTP method name for MERGE requests.
HTTP method name for PATCH requests.
HTTP query string parameter value for expand.
HTTP query string parameter value for filtering.
HTTP query string parameter value for ordering.
HTTP query string parameter value for skipping elements.
HTTP query string parameter value for limiting the number of elements.
HTTP query string parameter value for counting query result set
HTTP query string parameter value for skipping results based on paging.
Property prefix for the skip token property in expanded results for a skip token
HTTP query string parameter value for counting query result set
HTTP query string parameter value for projection.
HTTP query string parameter for specifying the requested content-type of the response.
HTTP query string parameter for specifying the a callback function name for JSONP (JSON padding).
'q' - HTTP q-value parameter name.
'X-HTTP-Method' - HTTP header name for requests that want to tunnel a method through POST.
HTTP name for Accept header
HTTP name for Accept-Charset header
HTTP name for If-Match header
HTTP name for If-None-Match header
HTTP name for User-Agent header
multi-part keyword in content-type to identify batch separator
'X-Content-Type-Options' - HTTP header for Internet Explorer 8 and 9 to specify options for content-type handling.
An 'X-Content-Type-Options' HTTP header argument to instruct IE8/9 not to sniff the content and instead display it according to the content-type header.
multi-part mixed batch separator
multi-part mixed changeset separator
'Allow' - HTTP response header for allowed verbs.
HTTP name for Cache-Control header.
HTTP name for ETag header
HTTP name for location header
HTTP name for DataServiceId header
HTTP name for Status-Code header
multi-part mixed batch separator for response stream
multi-part mixed changeset separator
Content-Transfer-Encoding header for batch requests.
Http Version in batching requests and response.
To checks if the resource exists or not.
Weak etags in HTTP must start with W/.
Look in http://www.ietf.org/rfc/rfc2616.txt?number=2616 section 14.19 for more information.
The mime type that client wants the response to be in.
The character set the client wants the response to be in.
The name of the Cookie HTTP header
The Slug header name. Used by ATOM to hint the server on which MR is being POSTed.
MIME type for requesting any media type.
MIME type general binary bodies (http://www.iana.org/assignments/media-types/application/).
'application' - MIME type for application types.
'json' - constant for MIME JSON subtypes.
'xml' - constant for MIME xml subtypes.
'odata' - parameter name for JSON MIME types.
MIME type for changeset multipart/mixed
MIME type for plain text bodies.
'text' - MIME type for text subtypes.
MIME type for XML bodies (deprecated).
Content-Transfer-Encoding value for batch requests.
Default encoding used for writing textual media link entries
A prefix that turns an absolute-path URI into an absolute-URI.
A segment name in a URI that indicates metadata is being requested.
A segment name in a URI that indicates a plain primitive value is being requested.
A segment name in a URI that indicates metadata is being requested.
A segment name in a URI that indicates that this is a link operation.
A segment name in a URI that indicates that this is a count operation.
A const value for the query parameter $inlinecount to set counting mode to inline
A const value for the query parameter $inlinecount to set counting mode to none
Uri method name for Enumerable.Any().
Uri method name for Enumerable.All().
Implicit parameter "it" used for Queryable.Where lambda.
"Binary" - WCF element name for binary content in XML-wrapping streams.
Schema Namespace prefix for atom.
XML element name to mark content element in Atom.
XML element name to mark entry element in Atom.
XML element name to mark feed element in Atom.
'author' - XML element name for ATOM 'author' element for entries.
'contributor' - XML element name for ATOM 'author' element for entries.
'category' - XML element name for ATOM 'category' element for entries.
XML element name to mark link element in Atom.
'scheme' - XML attribute name for ATOM 'scheme' attribute for categories.
'term' - XML attribute name for ATOM 'term' attribute for categories.
XML element name to mark id element in Atom.
XML element name to mark link relation attribute in Atom.
Atom attribute that indicates the actual location for an entry's content.
XML element string for "next" links: [atom:link rel="next"]
Type of content for syndication property which can be one of Plaintext, Html or XHtml
Whether to keep the property value in the content section
TargetNamespace prefix for non-syndication mapping
TargetNamespace URI for non-syndication mapping
Target element or attribute name
Source property name
author/email
author/name
author/uri
published
rights
summary
title
'updated' - XML element name for ATOM 'updated' element for entries.
contributor/email
contributor/name
contributor/uri
updated
Plaintext
HTML
XHTML
XML element name to mark href attribute element in Atom.
XML attribute name to mark the hreflang attribute in Atom.
XML element name to mark summary element in Atom.
XML element name to mark author/name or contributor/name element in Atom.
XML element name to mark author/email or contributor/email element in Atom.
XML element name to mark author/uri or contributor/uri element in Atom.
XML element name to mark published element in Atom.
XML element name to mark rights element in Atom.
XML element name to mark 'collection' element in APP.
XML element name to mark 'service' element in APP.
XML value for a default workspace in APP.
XML element name to mark 'workspace' element in APP.
XML element name to mark title element in Atom.
XML attribute name to specify the type of the element.
Atom link relation attribute value for self links.
Atom link relation attribute value for edit links.
Atom link relation attribute value for edit-media links.
Link relation: alternate - refers to a substitute for this context.
Link relation: related - identifies a related resource.
Link relation: enclosure - identifies a related resource that is potentially large and might require special handling.
Link relation: via - identifies a resource that is the source of the information in the link's context.
Link relation: describedby - refers to a resource providing information about the link's context.
Link relation: service - indicates a URI that can be used to retrieve a service document.
Atom attribute which indicates the null value for the element.
Atom attribute which indicates the etag value for the declaring entry element.
'Inline' - wrapping element for inlined entry/feed content.
Element containing property values when 'content' is used for media link entries
'count' element
'element', the XML element name for items in enumerations.
XML element name for an error.
XML element name for an error code.
XML element name for the inner error details.
XML element name for an internal exception.
XML element name for an exception type.
XML element name for an exception stack trace.
XML element name for an error message.
'false' literal, as used in XML.
'true' literal, as used in XML.
XML attribute value to indicate the base URI for a document or element.
'lang' XML attribute name for annotation language.
XML attribute name for whitespace parsing control.
XML attribute value to indicate whitespace should be preserved.
XML attribute name to pass to the XMLReader.GetValue API to get the xml:base attribute value.
Schema Namespace For Edm.
Schema Namespace For Edm 1.1.
Schema Namespace For Edm 1.2.
XML namespace for annotations in EDM such as 'StoreGeneratedPattern'
XML namespace for data services.
XML namespace for data service annotations.
XML namespace for data service links.
XML namespace for data service related $links.
XML namespace for data service named media resources.
XML namespace for data service edit-media link for named media resources.
ATOM Scheme Namespace For DataWeb.
Schema Namespace for Atom Publishing Protocol.
Schema Namespace For Atom.
Schema Namespace prefix For xmlns.
Schema Namespace prefix For xml.
Schema Namespace Prefix For DataWeb.
'adsm' - namespace prefix for DataWebMetadataNamespace.
'http://www.w3.org/2000/xmlns/' - namespace for namespace declarations.
Edmx namespace in metadata document.
Prefix for Edmx Namespace in metadata document.
IANA link relations namespace.
The empty namespace.
Association Element Name in csdl.
AssociationSet Element Name in csdl.
ComplexType Element Name in csdl.
Dependent Element Name in csdl.
The name of the EDM collection type.
Attribute name used to indicate the real type of an EDM property or parameter, in cases where it needs to be different
from the Type attribute of the Property or Parameter element. This is used to support collection types and binary keys,
which are incompatible with EDM 1.1, which we are currently using for validation purposes.
This attribute is inserted into the CSDL in memory while codegen is processing properties that require special
type handling and should only be used in that scenario. This is not a real EDM or Data Services attribute.
TypeRef element name in CSDL document.
EntitySet attribute name in CSDL documents.
EntitySetPath attribute name in CSDL documents.
ExtensionMethod attribute name in CSDL documents.
Composable attribute name in CSDL documents.
SideEffecting attribute name in CSDL documents.
FunctionImport element name in CSDL documents.
Mode attribute name in CSDL documents.
Mode attribute value for 'in' direction in CSDL documents.
Parameter element name in CSDL documents.
ReturnType attribute name in CSDL documents.
Attribute name used to indicate the real type of an EDM function import return type, in cases where it needs to be different
from the ReturnType attribute of the function import element. This is used to support special primitive types,
which are incompatible with EDM 1.1, which we are currently using for validation purposes.
This attribute is inserted into the CSDL in memory while codegen is processing function imports that require special
type handling and should only be used in that scenario. This is not a real EDM or Data Services attribute.
End Element Name in csdl.
EntityType Element Name in csdl.
EntityContainer Element Name in csdl.
Key Element Name in csdl.
NavigationProperty Element Name in csdl.
OnDelete Element Name in csdl.
Principal Element Name in csdl.
Property Element Name in csdl.
PropetyRef Element Name in csdl.
ReferentialConstraint Element Name in csdl.
Role Element Name in csdl.
Schema Element Name in csdl.
Edmx Element Name in the metadata document.
Edmx DataServices Element Name in the metadata document.
Version attribute for the root Edmx Element in the metadata document.
Value of the version attribute in the root edmx element in metadata document.
Element name for m:action.
Element name for m:function
maps to m:action|m:function\@metadata
maps to m:action|m:function\@target
maps to m:action|m:function\@title
BaseType attribute Name in csdl.
EntitySet attribute and Element Name in csdl.
EntitySetPath attribute and Element Name in csdl.
FromRole attribute Name in csdl.
Abstract attribute Name in csdl.
Multiplicity attribute Name in csdl.
Name attribute Name in csdl.
Namespace attribute Element Name in csdl.
ToRole attribute Name in csdl.
Type attribute Name in csdl.
Relationship attribute Name in csdl.
Using element Name in csdl.
Value for Many multiplicity in csdl.
Value for One multiplicity in csdl.
Value for ZeroOrOne multiplicity in csdl.
Nullable facet name in CSDL.
The attribute name of the 'Precision' facet.
The attribute name of the 'Scale' facet.
The attribute name of the 'MaxLength' facet.
The attribute name of the 'FixedLength' facet.
The attribute name of the 'Unicode' facet.
The attribute name of the 'Collation' facet.
The attribute name of the 'SRID' facet.
Name of the concurrency attribute.
Name of the default value attribute.
The special value for the 'MaxLength' facet to indicate that it has the max length.
The attribute name of the 'StoreGeneratedPattern' annotation
The 'Computed' value for the 'StoreGeneratedPattern' annotation
The 'Identity' value for the 'StoreGeneratedPattern' annotation
'MimeType' - attribute name for property MIME type attributes.
'OpenType' - attribute name to indicate a type is an OpenType property.
'HasStream' - attribute name to indicate a type has a default stream property.
'true' - attribute value to indicate a type has a default stream property.
Attribute to indicate whether this is a default entity container or not.
Attribute name in the csdl to indicate whether the service operation must be called using POST or GET verb.
uri element name for link bind/unbind operations
next element name for link paging
XML element name for writing out collection of links.
JSON property name for an error.
JSON property name for an error code.
JSON property name for the inner error details.
JSON property name for an internal exception.
JSON property name for an error message.
JSON property name for an exception stack trace.
JSON property name for an exception type.
JSON property name for an error message value.
namespace for edm primitive types.
edm binary primitive type name
edm boolean primitive type name
edm byte primitive type name
edm datetime primitive type name
edm decimal primitive type name
edm double primitive type name
edm guid primitive type name
edm single primitive type name
edm sbyte primitive type name
edm int16 primitive type name
edm int32 primitive type name
edm int64 primitive type name
edm string primitive type name
edm stream primitive type name
edm string indicating that the value may be collection.
Edm Geography type name
Edm Geodetic point type name
Edm Geodetic linestring type name
Represents a geography Polygon type.
Represents a geography GeomCollection type.
Represents a geography MultiPolygon type.
Represents a geography MultiLineString type.
Represents a geography MultiPoint type.
Represents an arbitrary Geometry type.
Represents a geometry Point type.
Represents a geometry LineString type.
Represents a geometry Polygon type.
Represents a geometry GeomCollection type.
Represents a geometry MultiPolygon type.
Represents a geometry MultiLineString type.
Represents a geometry MultiPoint type.
edm string primitive type name
edm string primitive type name
'1.0' - the version 1.0 text for a data service.
'2.0' - the version 2.0 text for a data service.
'3.0' - the version 3.0 text for a data service.
'2.0;' - the text for the current server version text.
1 - the version 1 text for a data service.
0 - the current minor version for a data service.
'binary' constant prefixed to binary literals.
'datetime' constant prefixed to datetime literals.
'guid' constant prefixed to guid literals.
'geography' constant prefixed to geography literals.
'geometry' constant prefixed to geometry literals.
'guid' constant prefixed to guid literals.
'guid' constant prefixed to guid literals.
'X': Prefix to binary type string representation.
'M': Suffix for decimal type's string representation
'L': Suffix for long (int64) type's string representation
'f': Suffix for float (single) type's string representation
'D': Suffix for double (Real) type's string representation
null liternal that needs to be return in ETag value when the value is null
Incoming message property name for the original reqeust uri
Incoming message property name for the original root service uri
GeoRss namespace
The "georss" prefix
Gml Namespace
Gml Prefix
Embedded Gml tag inside Georss
GeoRss representation of a point
GeoRss representation of a line
Gml representation of a point
Gml representation of a point array
Gml representation of a linestring
Tree representing the sourceName properties in all the EntityPropertyMappingAttributes for a resource type
Root of the tree
corresponding to this tree
Default constructor creates a null root
Target xml tree
Adds a path to the source and target tree which is obtained by looking at the EntityPropertyMappingAttribute in the
EnitityPropertyMappingInfo holding the source path
Validates the source tree.
The resource type for which the validation is performed.
Validates the specified segment and all its subsegments.
The path segment to validate.
The resource type of the property represented by this segment (null for open properties).
Returns a client type of the property on the specified resource type.
The client type to look for the property on.
The name of the property to look for.
The type of the property specified. Note that for collection properties this returns the type of the item of the collection property.
Root of the tree
Representation of each node in the
Name of the property under the parent resource type
This fields is used to diferentiate between some special node types as well.
- null - this is the root node of the source tree.
- "" (empty string) - this is a node representing a value of a primitive item in a collection property.
- anything else - this is a node representing a property with the name of this field.
List of sub-properties if this segment corresponds to a complex type
Constructor creates a root source path segment
Constructor creates a source path segment with the name set to
Segment property name
Name of the property under the parent resource type
This property is used to diferentiate between some special node types as well.
- null - this is the root node of the source tree.
- "" (empty string) - this is a node representing a value of a primitive item in a collection property.
- anything else - this is a node representing a property with the name of this property.
These values should not be compared directly, instead use the IsCollectionItemValue property to differentiate between the last two.
The root node itself should never be accessed directly so far.
List of sub-properties if this segment corresponds to a complex type
Corresponding EntityPropertyMappingInfo
Tree representing the targetName properties in all the EntityPropertyMappingAttributes for a resource type
Number of properties that have V2 mapping with KeepInContent false
Initializes the sub-trees for syndication and non-syndication content
Adds a path to the tree which is obtained by looking at the EntityPropertyMappingAttribute in the
EnitityPropertyMappingInfo holding the target path
Removes a path in the tree which is obtained by looking at the EntityPropertyMappingAttribute in the
EnitityPropertyMappingInfo holding the target path
Validates the target tree.
This also cleans up the tree if necessary.
Checks if mappings could potentially result in mixed content and dis-allows it.
Segment being processed.
Does any of the ancestors have content.
boolean indicating if the tree is valid or not.
Given an gives the correct target path for it
Given
String with the correct value for the target path
Root of the sub-tree for syndication content
Root of the sub-tree for custom content
Minimum DSPV required to serialize this target tree.
Representation of each node in the
Name of the xml element/attribute
This field is used to differentiate between special nodes as well.
- null - this is the root of the target tree.
- anything else (doesn't start with @) - this node represents an element with the specified name.
- anything else (starts with @) - this node represents an attribute with the specified name.
URI of the namespace to which the belongs
If this is a non-leaf element, the child elements/attributes collection
Parent element of this element/attribute
Constructor initializes the list of sub-nodes to be empty, used for creating root nodes
in the
Used for creating non-root nodes in the syndication/custom trees
Name of xml element/attribute
URI of the namespace for
Reference to the parent node if this is a sub-node, useful for traversals in visitors
Name of the xml element/attribute
This property is used to differentiate between special nodes as well.
- null - this is the root of the target tree.
- anything else (doesn't start with @) - this node represents an element with the specified name.
- anything else (starts with @) - this node represents an attribute with the specified name.
The value of the proeprty should not be compared directly to differentiate between these cases, instead
properties IsAttribute and IsElementContentSegment should be used. The root not should not be accessed directly
from anywhere so far.
URI of the namespace to which the belongs
EntityPropertyMappingInfo corresponding to current segement
Whether this node corresponds to ResourceType or ClientType property values
Does this node correspond to xml attribute
Parent node in the tree (always an element if present)
Sub-nodes of this node. Only exist if current node is an element node
Holds information needed during content serialization/deserialization for
each EntityPropertyMappingAttribute
Private field backing Attribute property.
Private field backing DefiningType property
Type whose property is to be read. This property is of ClientType type on the client and of ResourceType type on the server.
Path to the property value. Stored as an array of property names to access on each other.
If this mapping is for a non-collection property or for the collection property itself, this path starts at the entity resource.
If this mapping is for a collection item property, this path starts at the collection item. In this case empty path is allowed, meaning the item itself.
Set to true if this info describes mapping to a syndication item, or false if it describes a custom mapping
Creates instance of EntityPropertyMappingInfo class.
The corresponding to this object
Type the was defined on.
ClientType whose property is to be read.
Compares the defining type of this info and other EpmInfo object.
The other EpmInfo object to compare to.
true if the defining types are the same
The corresponding to this object
Type that has the
Type whose property is to be read. This property is of ClientType type on the client and of ResourceType type on the server.
Path to the property value. Stored as an array of property names to access on each other.
If this mapping is for a non-collection property or for the collection property itself, this path starts at the entity resource.
If this mapping is for a collection item property, this path starts at the collection item. In this case empty path is allowed, meaning the item itself.
Set to true if this info describes mapping to a syndication item, or false if it describes a custom mapping
Take a URI string and escape the data portion of it
Sensitive characters that we should always skip
This should be the set of Http control characters intersecting with
the set of characters OData literal format allows outside of strings
(In V3: only +, as used in double literals ex. 3E+8)
input string
output string
the current index
current quoted data string
constructor
The string to be escaped.
Escape a URI string's data string portion
The input string
The escaped string
Build a new escaped string
The escaped string
Read quoted string
The character that started the quote
Class with code that will eventually live in EdmLib.
This class should go away completely when the EdmLib integration is fully done.
The qualifier to turn a type name into a Collection type name.
Format string to describe a Collection of a given type.
Map of CLR primitive type to EDM primitive type reference. Doesn't include spatial types since they need assignability and not equality.
Type reference for Edm.Boolean.
Type reference for Edm.Byte.
Type reference for Edm.DateTime.
Type reference for Edm.Decimal.
Type reference for Edm.Double.
Type reference for Edm.Int16.
Type reference for Edm.Int32.
Type reference for Edm.Int64.
Type reference for Edm.SByte.
Type reference for Edm.String.
Type reference for Edm.Float.
Constructor.
Returns the fully qualified name of an entity container element.
The container element to get the full name for.
The full name of the owning entity container, slash, name of the container element.
Turns a into the corresponding .
The type to convert.
true if the returned type reference should be nullable; otherwise false.
A type reference for the .
Creates the EDM type name for a collection of the specified item type name. E.g. Collection(Edm.String)
Type name of the items in the collection.
Type name for a collection of the specified item type name.
Finds the entity set with the specified container and name.
The model to find the entity set in.
The container qualified name of the entity set.
The with the specified name or null if no such entity set exists.
Gets a reference to a primitive kind definition of the appropriate kind.
Primitive type to create a reference for.
Flag specifying if the referenced type should be nullable per default.
A new primitive type reference.
Gets the single entity container or the default one if there are multiple containers.
Model to find entity containers in.
Single container that was found.
Entity Container found in the model
Finds the container elements with the specified container and name.
The model to find the element in.
The container qualified name of the elements.
The resolver method to resolve the elements.
The enumeration of with the specified name or null if no such element exists.
An enumeration that lists the internal errors that are shared between the OData library and the query library.
Unreachable codepath in EdmLibraryExtensions.ToTypeReference (unsupported type kind).
Unreachable codepath in EdmLibraryExtensions.ToClrType (unsupported type kind).
Unreachable codepath in EdmLibraryExtensions.PrimitiveTypeReference (unsupported primitive type kind).
Unreachable codepath in EdmLibraryExtensions.IsAssignableFrom(IEdmPrimitiveType, IEdmPrimitiveType).
Unreachable codepath in EdmLibraryExtensions.IsAssignableFrom(IEdmType, IEdmType).
Unreachable codepath in EdmLibraryExtensions.BaseType.
Unreachable codepath in EdmLibraryExtensions.Clone for unexpected type kind.
Unreachable codepath in EdmLibraryExtensions.Clone for unexpected primitive type kind.
Holds information about a ServiceAction.
Holds information about a service operation.
Abstract class from which is derived.
change order
was content generated for the entity
was this entity save result processed
0 - no processed, otherwise reflects the previous state
last save exception per entry
State of the modified entity or link.
constructor
entity state
Clear all the changes associated with this descriptor
This method is called when the client is done with sending all the pending requests.
When overridden in a derived class, gets the state of the object at the time this instance was constructed.
An of the object returned at the time this instance was constructed.
true if resource, false if link
changeOrder
was content generated for the entity
was this entity save result processed
last save exception per entry
Returns true if the entry has been modified (and thus should participate in SaveChanges).
Maps to m:action\@title. Human-readable description of the service operation.
maps to m:action\@metadata. Identifies the service operation.
maps to m:action\@target. The URI to invoke the service operation.
Creates a new instance of the Operation descriptor.
Nothing to clear in case of operation descriptor.
Human-readable description of the service operation.
Identifies the service operation.
The URI to invoke the service operation.
this is an operation descriptor.
Base class for building the request and handling the response
Implementation of IAsyncResult
The int equivalent for true.
The int equivalent for false.
Originating object, used to validate End*
Originating method on source, to differentiate between different methods from same source
wrapped request
User callback passed to Begin*
User state passed to Begin*
wait handle for user to wait until done, we only use this within lock of asyncWaitDisposeLock.
Holding exception to throw as a nested exception during to End*
Abortable request
true unless something completes asynchronously
true when really completed for the user
true when no more changes are pending, 0 false, 1 completed, 2 aborted
verify we only invoke the user callback once, 0 false, 1 true
non-zero after End*, 0 false, 1, true
true if the AsyncWaitHandle has already been disposed.
delay created object to lock to prevent using disposed asyncWait handle.
ctor
source object of async request
async method name on source object
user callback to invoke when complete
user state
common handler for EndExecuteBatch & EndSaveChanges
derived type of the AsyncResult
source object of async request
async method name on source object
the asyncResult being ended
data service response for batch
Due to the unexpected behaviors of IAsyncResult.CompletedSynchronously in the System.Net networking stack, we have to make
async calls to their APIs using the specific pattern they've prescribed. This method runs in the caller thread and invokes
the BeginXXX methods. It then checks IAsyncResult.CompletedSynchronously and if it is true, we invoke the callback in the
caller thread.
This is the action that invokes the BeginXXX method. Note we MUST use our special callback from GetDataServiceAsyncCallback()
when invoking the async call.
async callback to be called when the operation is complete
A user-provided object that distinguishes this particular asynchronous request from other requests.
Returns the async result from the BeginXXX method.
CompletedSynchronously (for System.Net networking stack) means "was the operation completed before the first time
that somebody asked if it was completed synchronously"? They do this because some of their asynchronous operations
(particularly those in the Socket class) will avoid the cost of capturing and transferring the ExecutionContext
to the callback thread by checking CompletedSynchronously, and calling the callback from within BeginXxx instead of
on the completion port thread if the native winsock call completes quickly.
For other operations however (notably those in HttpWebRequest), they use the same underlying IAsyncResult implementation,
but do NOT check CompletedSynchronously before returning from BeginXxx. That means that CompletedSynchronously will
be false if and only if you checked it from the thread which called BeginXxx BEFORE the operation completed. It will
then continue to be false even after IsCompleted becomes true.
Note that CompletedSynchronously == true does not guarantee anything about how much of your callback has executed.
The usual pattern for handling synchronous completion is that both the caller and callback should check CompletedSynchronously.
If its true, the callback should do nothing and the caller should call EndRead and process the result.
This guarantees that the caller and callback are not accessing the stream or buffer concurrently without the need
for explicit synchronization between the two.
Due to the unexpected behaviors of IAsyncResult.CompletedSynchronously in the System.Net networking stack, we have to make
async calls to their APIs using the specific pattern they've prescribed. This method runs in the caller thread and invokes
the BeginXXX methods. It then checks IAsyncResult.CompletedSynchronously and if it is true, we invoke the callback in the
caller thread.
This is the action that invokes the BeginXXX method. Note we MUST use our special callback from GetDataServiceAsyncCallback()
when invoking the async call.
buffer to transfer the data
byte offset in buffer
max number of bytes in the buffer
async callback to be called when the operation is complete
A user-provided object that distinguishes this particular asynchronous request from other requests.
An IAsyncResult that represents the asynchronous operation, which could still be pending
Please see remarks on the other InvokeAsync() overload.
Also note that the InvokeTask method above is a Win8 version of this method, so it should be kept in sync with any changes that occur here.
Sets the CompletedSynchronously property.
true if the async operation was completed synchronously, false otherwise.
Set the AsyncWait and invoke the user callback.
If the background thread gets a ThreadAbort, the userCallback will never be invoked.
This is why it's generally important to never wait forever, but to have more specific
time limit. Also then cancel the operation, to make sure its stopped, to avoid
multi-threading if your wait time limit was just too short.
Cache the exception that happened on the background thread for the caller of EndSaveChanges.
exception object from background thread
true if the exception (like StackOverflow or ThreadAbort) should be rethrown
Set the async result as completed and aborted.
Set the async result as completed.
verify they have the same reference
the actual thing
the expected thing
error code if they are not
invoked for derived classes to cleanup before callback is invoked
Disposes the request object if it is not null. Invokes the user callback
the request object
handle request.BeginGetResponse with request.EndGetResponse and then copy response stream
async result
verify non-null and not completed
the request in progress
error code if null or completed
Read and store response data for the current change, and try to start the next one
the completed per request object
Cache the exception that happened on the background thread for the caller of EndSaveChanges.
the request object
exception object from background thread
true if the exception should be rethrown
handle request.BeginGetRequestStream with request.EndGetRequestStream and then write out request stream
async result
Due to the unexpected behaviors of IAsyncResult.CompletedSynchronously in the System.Net networking stack, we have to make
async calls to their APIs using the specific pattern they've prescribed. This method runs in the caller thread after the
BeginXXX method returns. It checks IAsyncResult.CompletedSynchronously and if it is true, we invoke the callback in the
caller thread.
The IAsyncResult that represents the asynchronous operation we just called, which could still be pending
Callback to be invoked when IAsyncResult.CompletedSynchronously is true.
Returns an IAsyncResult that represents the asynchronous operation we just called, which could still be pending
Please see remarks on BaseAsyncResult.InvokeAsync().
Also note that PostInvokeTask below is a Win8 version of this method, so it should be kept in sync with any changes that occur here.
Due to the unexpected behaviors of IAsyncResult.CompletedSynchronously in the System.Net networking stack, we have to make
async calls to their APIs using the specific pattern they've prescribed. This method returns an AsyncCallback which we can pass
to the BeginXXX methods in the caller thread. The returned callback will only run the wrapped callback if
IAsyncResult.CompletedSynchronously is false, otherwise it returns immediately.
callback to be wrapped
Returnes a callback which will only run the wrapped callback if IAsyncResult.CompletedSynchronously is false, otherwise it returns immediately.
Please see remarks on BaseAsyncResult.InvokeAsync().
Also note that the GetDataServiceTaskCallback method below is a Win8 version of this method, so it should be kept in sync with any changes that occur here.
Sets the async wait handle
Callback for Stream.BeginRead on the request content input stream. Calls request content output stream BeginWrite
and in case of synchronous also the next BeginRead.
The asynchronous result associated with the completed operation.
handle requestStream.BeginWrite with requestStream.EndWrite then BeginGetResponse.
async result
user state object parameter
wait handle for when waiting is required
if displayed by debugger, it undesirable to create the WaitHandle
did the result complete synchronously?
is the result complete?
is the result complete?
abort the result
WebRequest available for DataServiceContext.CancelRequest
first exception that happened
This delegate exists to workaround limitations in the WP7 runtime.
When limitations on the number of parameters to Func<> are resolved, this can be subsumed by the following:
Func<byte[], int, int, AsyncCallback, object, IAsyncResult>
buffer to transfer the data
byte offset in buffer
max number of bytes in the buffer
async callback to be called when the operation is complete
A user-provided object that distinguishes this particular asynchronous request from other requests.
An IAsyncResult that represents the asynchronous operation, which could still be pending
Wraps PerRequest and context reference together to save state information.
Used instead of KeyValuePair in order to avoid FxCop CA908.
the request wrapper.
Constructor for the state object
See PerRequest field.
wrap the full request
The int equivalent for true.
The int equivalent for false.
did the sequence (BeginGetRequest, EndGetRequest, ... complete. 0 = In Progress, 1 = Completed, 2 = Aborted
Buffer used when pumping data from the write stream to the request content stream
True if Dispose is called.
Synchronize the Dispose method calls.
Did the request complete all of its steps synchronously? 1 represents true and 0 represents false.
Note that there is no overload for Interlocked.CompareExchange that takes booleans, we workaround using the overload for int.
ctor
Sets the RequestCompletedSynchronously property.
true if the async operation was completed synchronously, false otherwise.
Change the request status to completed
Change the request status to aborted
dispose of the request object
active web request
active web request stream
content to write to request stream
web response
async web response stream
did the request complete all of its steps synchronously?
Short cut for testing if request has finished (either completed or aborted)
Short cut for testing request status is 2 (Aborted)
Buffer used when pumping data from the write stream to the request content stream
The length of the valid content in the RequestContentBuffer
Once the data is read from the request content stream into the RequestContent buffer
this length is set to the amount of data read.
When the data is written into the request stream it is set back to 0.
where to pull the changes from
serializer to serialize the request data.
sorted list of entries by change order
option in use for SaveChanges
batch web response
The ResourceBox or RelatedEnd currently in flight
what kind of request are we processing - POST MR or PUT MR
If the is set to anything but None,
this field holds a stream needs to be send in the request.
This can be null in the case where the content of MR is empty. (In which case
we will not try to open the request stream and thus avoid additional async call).
temporary buffer when cache results from CUD op in non-batching save changes
constructor for operations
context
method
queries
options
user callback
user state object
factory method for SaveResult
context
method
queries
options
user callback
user state object
a new instance of SaveResult or BatchSaveResult, depending on the options value.
Handle response by looking at status and possibly throwing an exception.
The request info.
response status code
Version string on the response header; possibly null.
delegate to get response stream
throw or return on failure
Parsed response version (null if no version was specified).
exception on failure
get the response text into a string
method to get response stream
status code
text
process the batch
data service response
Get the value of HttpMethod enum from link resource state
Instance of LinkDescriptor containing the link state and type of link.
HttpMethod enum value for the link descriptor state.
Apply the response preferences for the client.
Headers to which preferences will be added.
HTTP method.
Response preference.
Request version so far for the request. The method may modify it.
Handle response.
an instance of the DataServiceResponse.
Returns the request message to write the headers and payload into.
Http method for the request.
Base Uri for the request.
Request headers.
HttpStack to use.
Descriptor for the request, if there is one.
an instance of IODataRequestMessage.
Get the value of the HttpMethod enum from entity resource state
resource state
The version of the request determined so far. The method may modify this if needed.
HttpMethod value from the entity resource state.
Create request message for the descriptor at the given index.
Index into changed entries
IODataRequestMessage that needs to be used for writing the payload.
true, if any request payload was generated, else false.
Set the AsyncWait and invoke the user callback.
the request object
handle request.BeginGetResponse with request.EndGetResponse and then copy response stream
async result
IODataResponseMessage contain response for the operation.
IODataResponseMessage instance.
operation with HttpWebResponse
status code of the response.
response headers.
Handle operation response
descriptor whose response is getting processed.
content headers as returned in the response.
Get the materializer to process the response.
entity descriptor whose response is getting materialized.
information about the response to be materialized.
an instance of MaterializeAtom, that can be used to materialize the response.
cleanup work to do once the batch / savechanges is complete
Create the response info instance to be passed to the materializer.
entity descriptor whose response is getting handled.
instance of the response info class.
enumerate the related Modified/Unchanged links for an added item
entity
related links
During a non-batch SaveChanges, an Added entity can become an Unchanged entity
and should be included in the set of related links for the second Added entity.
flag results as being processed
result descriptor being processed
count of related links that were also processed
Generate the link payload.
binding
An instance of ODataRequestMessage for the link request.
Create ODataRequestMessage for the given entity.
resource
An instance of ODataRequestMessage for the given entity.
Returns the request message to write the headers and payload into.
Http method for the request.
Base Uri for the request.
Request headers.
HttpStack to use.
Descriptor for the request, if there is one.
an instance of IODataRequestMessage.
Figures out value to be written in DataServiceVersion HTTP header for the given entity based on features used in this entity.
Entity type for which data service version needs to be determined.
The resource state for the entity.
Data service version for the given entity and state.
Checks whether a WCF Data Service version string can be handled.
Version string on the response header; possibly null.
The response version parsed into a instance
if the version was valid and can be handled, otherwise null.
true if the version can be handled; false otherwise.
Handle changeset response.
headers of changeset response
Validates that the link descriptor source and target have identities.
The binding.
The source resource.
The target resource.
Serialize supported data service versions to a string that will be used in the exception message.
The string contains versions in single quotes separated by comma followed by a single space (e.g. "'1.0', '2.0'").
Supported data service versions in single quotes separated by comma followed by a space.
Appends the target entity key to the uri if the binding is in the deleted state and the property is a collection.
The link URI so far.
The binding.
The target's entity descriptor.
The original link uri or one with the target entity key appended.
Generate a request for the given entity.
Instance of EntityDescriptor.
Instance of IODataRequestMessage to be used to generate the payload.
True if the payload was generated, otherwise false.
Generate a request for the given link.
Instance of LinkDescriptor.
Instance of IODataRequestMessage to be used to generate the payload.
Handle changeset response.
descriptor whose response is getting handled.
response headers.
Handle changeset response for the given entity descriptor.
entity descriptor whose response is getting handled.
ETag header value from the server response (or null if no etag or if there is an actual response)
Handle the PUT response sent by the server
descriptor, whose response is getting handled.
response headers.
Handle response to deleted entity.
deleted entity
handle responseStream.BeginRead with responseStream.EndRead
async result
Materialize the response payload.
entity descriptor whose response is getting materialized.
information about the response to be materialized.
etag value, if specified in the response header.
returns true if its a batch, otherwise returns false.
In async case, this is a memory stream used to cache responses, as we are reading async from the underlying http web response stream.
In sync case, this is the actual response stream, as returned by the http request.
returns true if the response payload needs to be processed.
enum which says what kind of request we are currently processing
This request doesn't involve Media Resource or named stream.
This request is a POST to a MLE and the body contains the content of the MR.
This request is a PUT to MR and the body contains the content of the MR.
Async read state
PerRequest class which tracks the request and response stream
total number of byte copied.
constructor
Perrequest class
Returns the total number of byte copied till now.
Handles the batch requests and responses (both sync and async)
The size of the copy buffer to create.
Array of queries being executed
Response stream containing the entire batch response.
Instance of ODataBatchWriter used to write current batch request.
The message reader used to read the batch response.
Object representing the current operation response.
Buffer used for caching operation response body streams.
constructor for BatchSaveResult
context
method
queries
options
user callback
user state object
initial the async batch save changeset
Synchronous batch request
Read and store response data for the current change
The completed per request object
This is called only from the async code paths, when the response to the batch has been read fully.
IODataResponseMessage contain response for the operation.
IODataResponseMessage instance.
Handle response.
an instance of the DataServiceResponse, containing individual operation responses for this batch request.
Get the materializer to process the response.
entity descriptor whose response is getting materialized.
information about the response to be materialized.
an instance of MaterializeAtom, that can be used to materialize the response.
This can only be called from inside the HandleBatchResponse or during enumeration of the responses.
This is used when processing responses for update operations.
Returns the request message to write the headers and payload into.
Http method for the request.
Base Uri for the request.
Request headers.
HttpStack to use.
Descriptor for the request, if there is one.
an instance of IODataRequestMessage.
Creates the type of the multi part MIME content.
A multipart mime header with a generated batch boundary
Creates a ODataRequestMessage for batch request.
Returns an instance of ODataRequestMessage for the batch request.
Generate the batch request for all changes to save.
Returns the instance of ODataRequestMessage containing all the headers and payload for the batch request.
process the batch response
an instance of the DataServiceResponse, containing individual operation responses for this batch request.
process the batch response
The batch reader to use for reading the batch response.
an instance of the DataServiceResponse, containing individual operation responses for this batch request.
The message reader for the entire batch response is stored in the this.batchMessageReader.
The message reader is disposable, but this method should not dispose it itself. It will be either disposed by the caller (in case of exception)
or the ownership will be passed to the returned response object (in case of success).
In could also be diposed indirectly by this method when it enumerates through the responses.
process the batch response
The batch reader to use for reading the batch response.
enumerable of QueryResponse or null
The batch message reader for the entire batch response is stored in this.batchMessageReader.
Note that this method takes over the ownership of this reader and must Dispose it if it successfully returns.
Processed the operation response reported by the batch reader.
This is a side-effecting method that is tied deeply to how it is used in the batch processing pipeline.
The batch reader to get the operation response from.
True if the current operation is inside a changeset (implying CUD, not query)
An exception if the operation response is an error response, null for success response.
Validate the content-id.
The response headers for the operation response being processed.
Returns the correct ChangedEntries index.
returns true since this class handles batch requests.
In async case, this is a memory stream used to cache responses, as we are reading async from the underlying http web response stream.
In non-async case, this is the actual response stream, as returned by the http request.
This is the stream which holds the entire batch response, when we process any given part those streams are enumerated through
a different field (currentOperationResponseContentStream).
returns true if the response payload needs to be processed.
Stores information about the currenly processed operation response.
The HTTP response status code for the current operation response.
The HTTP headers for the current operation response.
The content stream for the current operation response.
Constructor.
The status code of the response.
The response headers.
An in-memory copy of the response stream.
Creates IODataResponseMessage for the operation response.
IODataResponseMessage for the operation response.
null if the operation response has empty content.
The status code of the operation response.
The content stream of the operation response.
true if the content stream is empty, false otherwise.
The response headers for the operation response.
Represents a parameter associated with a service action.
Represents a parameter passed to a service action, service function or a service operation when it is Executed.
The name of the operation parameter.
The value of the operation parameter.
Initializes a new instance of the class.
The name of the operation parameter.
The value of the operation parameter.
Gets the name of the operation parameter.
The name of the operation parameter.
Gets the value of the operation parameter.
The value of the operation parameter.
Instantiates a new BodyOperationParameter
The name of the body operation parameter.
The value of the body operation parameter.
EventArgs for the BuildingRequest event.
Uri of the outgoing request.
Initializes a new instance of the class.
The method.
The request URI.
The request headers.
Descriptor for this request; or null if there isn't one.
The http stack.
Retrieves a new RequestMessageArgs with any custom query parameters added.
A new RequestMessageArgs instance that takes new custom query options into account.
Gets the Request HTTP Method that the outgoing request will use.
The Uri of the outgoing request. The Uri may be altered. No error checking will be performed against any changes made.
The headers for this request. Adding new custom headers is supported. Behavior is undefined for changing existing headers or adding
system headers. No error checking will be performed against any changes made.
Descriptor for this request if there is one; null otherwise.
Gets the http stack.
The reason for having this property is that this is request specific
and cannot be taken from the context. For e.g. In silverlight, irrespective
of the value of HttpStack property, for stream requests (get or update), we
use ClientHttp.
Returns the set of headers as HeaderCollection instance.
Implementation of which wraps client-side objects.
Initializes a new instance of the class.
The type of the collection.
The elements of the collection.
Gets the type of this value.
Gets the kind of this value.
Gets the values stored in this collection.
Non-delayed implementation of
Initializes a new instance of the class.
The value.
Gets the data stored in this value.
EdmModel describing the client metadata
A cache that maps a client Clr type to it corresponding Edm type.
A cache that maps a client type name to the corresponding client type annotation.
The annotations manager.
The max protocol version this Edm model is created for.
Referenced core model.
Constructor.
The protocol version this Edm model is created for.
Return the entity container with the given name.
Name of the entity container.
EntityContainer with the given name.
Searches for a schema element with the given name in this model and returns null if no such schema element exists.
The qualified name of the schema element being found.
The requested schema element, or null if no such schema element exists.
Searches for functions with the given name in this model and returns null if no such function exists.
The qualified name of the function being found.
A set functions sharing the specified qualified name, or an empty enumerable if no such function exists.
Searches for a value term with the given name in this model and returns null if no such value term exists.
The qualified name of the value term being found.
The requested value term, or null if no such value term exists.
Finds a list of types that derive directly from the supplied type.
The base type that derived types are being searched for.
A list of types that derive directly from the type.
Searches for vocabulary annotations specified by this model or a referenced model for a given element.
The annotated element.
The vocabulary annotations for the element.
Get or create a client EDM type instance.
type to wrap
client type
Get the client type annotation for the given name.
Name of the type.
An instance of ClientTypeAnnotation for the type with the given name.
Returns and its base types, in the order of most base type first and last.
Type instance in question.
Returns the list of key properties if is an entity type; null otherwise.
true if has any (declared or inherited) properties; otherwise false.
Returns and its base types, in the order of most base type first and last.
Find properties with dynamic MIME type related properties and
set the references from each ClientProperty to its related MIME type property
Client edm type instance to wire up the mime type properties.
Get or create a client EDM type instance.
type to wrap
client type
Get or create a client EDM type instance.
The base type of this structured type.
type to wrap
List of key properties to add to if the type is an entity type; null otherwise.
true if is an entity type; false otherwise.
true if the is known to have properties; false if is known to have no properties; null if nothing is known about the properties.
client type
Creates an Edm property.
Type declaring this property.
PropertyInfo instance for this property.
Returns a new instance of Edm property.
Gets or creates client type annotation.
The EdmType to use for creating client type annotation
The Clr type to create client type annotation for.
Client type annotation
Returns all the vocabulary annotations defined in the model.
Returns all the referenced models.
Returns all the schema elements.
Returns the model's annotations manager.
Gets the max protocol version of the model.
Cache value for the type cache.
The cached EDM type.
true if the Clr type this EDM type is based on has settable properties; otherwise false.
Creates a new instance of the EDM type cache value.
The cached EDM type.
true if the Clr type this EDM type is based on has settable properties; otherwise false.
The cached EDM type.
true if the Clr type this EDM type is based on has settable properties; otherwise false.
Implementation of which wraps client-side objects.
The structured value this instance is wrapping.
The client-side metadata about this value.
The model.
Initializes a new instance of the class.
The structured value.
The model.
The client type annotation.
Finds the value corresponding to the provided property name.
Property to find the value of.
The found property, or null if no property was found.
Builds an edm property value from the given annotation.
The property annotation.
The property value
Converts a clr value to an edm value.
The property value.
Type of the property.
The converted value
Gets the type of this value.
Gets the kind of this value.
Gets the property values of this structured value.
Helper class to wrap the stream with the content of the request.
We need to remember if the stream came from us (IsKnownMemoryStream is true)
or if it came from outside. For backward compatibility we set the Content-Length for our streams
since they are always MemoryStream and thus know their length.
For outside streams (content of the MR requests) we don't set Content-Length since the stream
might not be able to answer to the Length call.
The stream with the content of the request
Set to true if the stream is a MemoryStream and we produced it (so it does have the buffer accesible)
Constructor
The stream with the request content
The stream was create by us and it's a MemoryStream
The stream with the content of the request
Set to true if the stream is a MemoryStream and we produced it (so it does have the buffer accesible)
Implementation of which uses OData conventions.
The entity instance to build metadata for.
The name of the set the entity instance belongs to.
The base uri of the service.
The convention-based uri builder to use.
Initializes a new instance of the class.
The base URI of the service.
Name of the entity set the entity belongs to.
The entity instance to build metadata for.
The user-specified conventions to use.
Initializes a new instance of the class.
The URI resolver to use.
Name of the entity set the entity belongs to.
The entity instance to build metadata for.
The user-specified conventions to use.
Gets the edit link of the entity.
The absolute URI of the edit link for the entity.
Or null if it is not possible to determine the edit link.
Gets the ID of the entity.
The ID for the entity.
Or null if it is not possible to determine the ID.
Gets the ETag of the entity.
The ETag for the entity.
Or null if it is not possible to determine the ETag.
Gets the read link of the entity.
The absolute URI of the read link for the entity.
Or null if it is not possible to determine the read link.
Implementation of that uses conventions.
The uri resolver to use for entity sets.
The user specified conventions.
Initializes a new instance of the class.
The uri resolver to use.
The user specified conventions to use.
Appends to create the URI for an entity set.
The URI to append to
The entity set name.
The entity set URI.
Appends to create the entity instance URI for the specified .
The URI to append to
The entity instance to use.
The entity instance URI.
Client writer settings shim class to restrict settings to the base for OData message writers.
The settings.
Initializes a new instance of the class.
The settings.
Flag to control whether the writer should use indentation or not.
Flag to control whether the writer should check for valid Xml characters or not.
Quotas to use for limiting resource consumption when writing an OData message.
Client reader settings shim class to restrict settings to the base for OData message reader.
The settings.
Initializes a new instance of the class.
The settings.
Flag to control whether ATOM metadata is read in ATOM payloads.
Flag to control whether the writer should check for valid Xml characters or not.
Quotas to use for limiting resource consumption when writing an OData message.
Func to evaluate whether an instance annotation should be read or skipped by the reader. The func should return true if the instance annotation should
be read and false if the instance annotation should be skipped.
Materializer for LoadProperty API call for navigation properties.
Materializes feeds and entities from an ODataReader
Used to materialize entities from a objects.
Use this class to materialize objects provided from an .
Empty navigation links collection
Empty property collection
Collection->Next Link Table for nested links
The collection value materialization policy.
The complex value materializer policy.
The materialization policy used to materialize primitive values.
The converter to use when assigning values of primitive properties.
Initializes a new instance of the class.
The materializer context.
The expected type.
Creates an for a response.
The response message.
The response context.
The type to materialize.
The query components for the request.
The projection plan.
expected payload kind.
A materializer specialized for the given response.
Reads the next value from the input content.
true if another value is available after reading; false otherwise.
After invocation, the currentValue field (and CurrentValue property) will
reflect the value materialized from the parser; possibly null if the
result is true (for null values); always null if the result is false.
Disposes the materializer
Clears the materialization log of activity.
Applies the materialization log to the context.
Creates an for a given message and context using
WCF DS client settings.
The response message
The response context
Type of the message.
The message reader.
Verifies that the object is not disposed.
Implementation of .
Return value of
Called when IDisposable.Dispose is called.
Current value being materialized; possibly null.
This will typically be an entity if
is assigned, but may contain a string for example if a top-level
primitive of type string is found.
Feed being materialized; possibly null.
Entry being materialized; possibly null.
Table storing the next links assoicated with the current payload
Whether we have finished processing the current data stream.
Returns true if the underlying object used for counting is available
The count tag's value, if requested
The count value returned from the server
Function to materialize an entry and produce a value.
Gets the materializer context
Returns true if the materializer has been disposed
Gets the expected type.
The expected type.
Gets the collection value materialization policy.
Gets the complex value materialization policy.
The converter to use when assigning values of primitive properties.
The policy used to materialize primitive values.
The format of the response being materialized.
The value of the current materialized entity.
The materializer plan.
The entry value materializer policy.
Initializes a new instance of the class.
The materializer context.
The entity tracking adapter.
The query components.
The expected type.
The materialize entry plan.
Enumerates casting each element to a type.
Element type to enumerate over.
Element source.
An IEnumerable<T> that iterates over the specified .
This method should be unnecessary with .NET 4.0 covariance support.
Enumerates casting each element to a type.
Element type to enumerate over.
Element source.
An IEnumerable<T> that iterates over the specified .
This method should be unnecessary with .NET 4.0 covariance support.
Creates a list to a target element type.
Materializer used to flow link tracking.
Element type to enumerate over.
Element type for list.
Element source.
An IEnumerable<T> that iterates over the specified .
This method should be unnecessary with .NET 4.0 covariance support.
Creates an entry materialization plan that is payload-driven.
Segment type for the entry to materialize (typically last of URI in query).
A payload-driven materialization plan.
Creates an entry materialization plan that is payload-driven and does not traverse expanded links.
Segment type for the entry to materialize (typically last of URI in query).
A payload-driven materialization plan.
Checks whether the entity on the specified is null.
Root entry for paths.
Expected type for .
Path to pull value for.
Whether the specified is null.
This method will not instantiate entity types on the path.
Note that if the target is a collection, the result is always false,
as the model does not allow null feeds (but instead gets an empty
collection, possibly with continuation tokens and such).
Provides support for Select invocations for projections.
Materializer under which projection is taking place.
Root entry for paths.
Expected type for .
Expected result type.
Path to traverse.
Selector callback.
An enumerable with the select results.
Provides support for getting payload entries during projections.
Entry to get sub-entry from.
Name of sub-entry.
The sub-entry (never null).
Initializes a projection-driven entry (with a specific type and specific properties).
Materializer under which projection is taking place.
Root entry for paths.
Expected type for .
Expected result type.
Properties to materialize.
Functions to get values for functions.
The initialized entry.
Ensures that an entry of is
available on the specified .
Materilizer used for logging.
Entry to ensure.
Required type.
As the 'Projection' suffix suggests, this method should only
be used during projection operations; it purposefully avoid
"source tree" type usage and POST reply entry resolution.
Materializes an entry with no special selection.
Materializer under which materialization should take place.
Entry with object to materialize.
Expected type for the entry.
The materialized instance.
Materializes an entry without including in-lined expanded links.
Materializer under which materialization should take place.
Entry with object to materialize.
Expected type for the entry.
The materialized instance.
Projects a simple value from the specified .
Root entry for paths.
Expected type for .
Path to pull value for.
The value for the specified .
This method will not instantiate entity types, except to satisfy requests
for payload-driven feeds or leaf entities.
Clears the materialization log of activity.
Applies the materialization log to the context.
Helper method for constructor of DataServiceCollection.
Element type for collection.
The enumerable which has the continuation on it.
The DataServiceCollection to apply the continuation to.
Implementation of Read/>.
Return value of Read/>
Reads the next feed or entry.
True if an entry was read, otherwise false
Checks that the specified isn't null.
Entry to check.
Name of entry being accessed.
Creates an entry materialization plan for a given projection.
Query components for plan to materialize.
A materialization plan.
Materializes the result of a projection into a list.
Materializer to use for the operation.
Target list.
Expected type for nested object.
Entries to materialize from.
This method supports projections and as such does shallow payload-driven
materialization of entities.
Gets a property from the specified list, throwing if not found.
List to get value from.
Property name to look up.
The specified property (never null).
Merges a list into the property of a given .
Entry to merge into.
Property on entry to merge into.
List of materialized values.
Next link for feed from which the materialized values come from.
Projection plan for the list.
This method will handle entries that shouldn't be updated correctly.
Gets the Entity Materializer Context
Target instance that the materializer expects to update.
Current value being materialized; possibly null.
Function to materialize an entry and produce a value.
Gets the entry value materialization policy.
The entry value materialization policy.
The enty or feed reader.
The message reader.
Initializes a new instance of the class.
The odata message reader.
The reader.
The materializer context.
The entity tracking adapter.
The query components.
The expected type.
The materialize entry plan.
This method is for parsing CUD operation payloads which should contain
1 a single entry
2 An Error
the message for the payload
The current ResponseInfo object
The expected type
the MaterializerEntry that was read
Called when IDisposable.Dispose is called.
Reads the next feed or entry.
True if an entry was read, otherwise false
Feed being materialized; possibly null.
Entry being materialized; possibly null.
Whether we have finished processing the current data stream.
The count tag's value, if requested
The count value returned from the server
Returns true if the underlying object used for counting is available
Returns true if the materializer has been disposed
The format of the response being materialized.
Response Info object.
Items that have been read from the feed or entry.
Iteration of the entity collection reader.
Initializes a new instance of the class.
The odata message reader.
The reader.
The materializer context.
The entity tracking adapter.
The query components.
The expected type.
The materialize entry plan.
LoadProperty Response Info object.
Implementation of Read/>.
Return value of Read/>
Arguments for creating an instance of DataServiceClientRequestMessage.
The actual method.
Initializes a new instance of the class.
Method of the request.
The Request Uri.
True if the default credentials need to be sent with the request. Otherwise false.
True if the request message must use POST verb for the request and pass the actual verb in X-HTTP-Method header, otherwise false.
The set of headers for the request.
Gets the method.
Gets the request URI.
Returns whether the request message should use Post-Tunneling.
Gets the headers.
Gets the actual method. Indicates correct method to use in the post tunneling case.
Gets a System.Boolean value that controls whether default credentials are sent with requests.
Represents the type of HTTP implementation to use when accessing the data service.Supported only by the WCF Data Services 5.0 client for Silverlight.
Automatically choose the HTTP stack
When possible XmlHttp stack will be used, otherwise the Client stack will be used
Arguments used to configure the odata message reader settings.
Initializes a new instance of the class.
The settings.
Gets the settings.
Arguments used to configure the odata message writer settings.
Initializes a new instance of the class.
The settings.
Gets the settings.
Configurations on the behavior of the Client.
Creates a data service client configurations class
The sender for the Reading Atom event.
Gets the response configuration pipeline.
Gets the request pipeline.
Use this class to materialize objects provided from an .
Class responsible for materializing from OData to Objects
Creates the specified edm type.
Type of the edm.
The type.
In the future this class will have Materialize and Update will be adding this in upcoming changes
A created object
The materializer context.
The complex value materialization policy.
The primitive value materialization policy.
Initializes a new instance of the class.
The context.
The primitive policy.
Creates Collection instance of store Collection items.
ODataProperty instance representing the Collection as seen in the atom payload.
CLR type of the Collection as defined by the user.
Newly created Collection instance. Never null.
Creates the collection instance.
The edm collection type reference.
Type of the client collection.
New Collection Instance.
Applies collectionValue item to the provided .
Atom property containing materialized Collection items.
Collection instance. Must implement ICollection<T> where T is either primitive or complex type (not an entity).
Type of items in the Collection. Note: this could be calculated from collectionInstance but we already have it in upstream methods.
Action called actually add a Collection item to
Applies the collection data values to a collection instance.
The items.
Name of the wire type.
The collection instance.
Type of the collection item.
The add value to backing I collection instance.
Creates Collection instance of store Collection items.
The edm collection type reference.
Type of the client collection.
Error to throw.
Newly created Collection instance. Never null.
Gets the complex value materialization policy.
The complex value materialization policy.
Use this class to materialize objects provided from an .
Contains logic on how to materialize properties into an instance
The collection value materialization policy.
The primitive property converter.
Initializes a new instance of the class.
The materializer context.
The lazy primitive property converter.
Materializes a primitive value. No op for non-primitive values.
Type of value to set.
Property holding value.
Applies the values of the specified to a given .
Type to which properties will be applied.
Properties to assign to the specified .
Instance on which values will be applied.
Applies a data value to the specified .
Type to which a property value will be applied.
Property with value to apply.
Instance on which value will be applied.
Materializes the primitive data values in the given list of .
Actual type for properties being materialized.
List of values to materialize.
Whether properties missing from the client types should be ignored.
Values are materialized in-place withi each
instance.
Gets the collection value materialization policy.
The collection value materialization policy.
Gets the primitive property converter.
The primitive property converter.
Gets the materializer context.
The materializer context.
Initializes a new instance of the class.
The materializer context.
The lazy primitive property converter.
Materializes a complex type property.
Type of the complex type to set.
The OData complex value.
Determines if there is an existing entity or whether a new one is created
Target instance that the materializer expects to update.
Initializes a new instance of the class.
The entity tracker.
The merge option.
The model.
The context.
Resolved or creates an instance on the specified .
Entry on which to resolve or create an instance.
Expected type for the .
After invocation, the ResolvedObject value of the
will be assigned, along with the ActualType value.
True if an existing entity is found.
Tries to resolve the specified entry as an entry that has already been created in this materialization session or is already in the context.
Entry to resolve.
Expected type of the entry.
True if the entry was resolved, otherwise False.
Tries to resolve the object as the target one in a POST refresh.
Entry to resolve.
true if the entity was resolved; false otherwise.
Tries to resolve the object as one from the context (only if tracking is enabled).
Entry to resolve.
Expected entry type for the specified .
true if the entity was resolved; false otherwise.
Tries to resolve the object from those created in this materialization session.
Entry to resolve.
true if the entity was resolved; false otherwise.
Gets the value of the MergeOption
Gets the Context
Implementation Note, only used in when a new DataServiceCollection,
would like to remove this dependency but would need to change projection
plan, might happen in a subsequent refactor
Gets the materialization log.
Gets the entity tracker.
Gets the model.
Target instance that the materializer expects to update.
Used to materialize entities from an to an object.
Collection->Next Link Table for nested links
Initializes a new instance of the class.
The context.
The entity tracking adapter.
The lazy primitive property converter.
The next link table.
Validates the specified matches
the parsed .
Property as understood by the type system.
Property as parsed.
Validates the specified matches
the parsed .
Property as understood by the type system.
Property as parsed.
Validates the specified matches
the parsed .
Property as understood by the type system.
Property as parsed.
Client Model.
whether to do the entity check or not.
The type
Validates the specified matches
the parsed .
Property as understood by the type system.
Property as parsed.
Client model.
whether to do the entity check or not.
Materializes the specified .
Entry with object to materialize.
Expected type for the entry.
Whether links that are expanded should be materialized.
This is a payload-driven materialization process.
Applies the values of the enumeration to the
of the specified .
Entry with collection to be modified.
Collection property on the entry.
Values to apply onto the collection.
Next link for collection continuation.
Projection plan for collection continuation.
Whether this is a continuation request.
Records the fact that a rel='next' link was found for the specified .
Collection to add link to.
Link (possibly null).
Projection plan for the collection (null allowed only if link is null).
Records the fact that a was found but won't be modified.
Collection to add link to.
"Resolved" the entity in the by instantiating it.
Entry to resolve.
Type to create.
After invocation, entry.ResolvedObject is exactly of type .
Matches the given item type with the corresponding collection element type.
Item type.
Collection element type.
Materializes the link properties if any with the url in the response payload
Actual client type that is getting materialized.
MaterializerEntry instance containing all the links that came in the response.
Populates the collection property on the entry's resolved object with the given items enumerator.
Entry with collection to be modified.
Collection property on the entry.
Values to apply onto the collection.
Next link for collection continuation.
Projection plan for collection continuation.
Collection instance that was populated.
Gets or creates a collection property on the specified .
Instance on which to get/create the collection.
Collection property on the .
Is this collection being created for LoadProperty scenario.
The collection corresponding to the specified ;
never null.
Applies the values of a nested to the collection
of the specified .
Entry with collection to be modified.
Collection property on the entry.
Values to apply onto the collection.
Whether links that are expanded should be materialized.
Materializes the specified .
Entry with object to materialize.
Whether links that are expanded should be materialized.
This is a payload-driven materialization process.
Gets the Entity Materializer Context
Contains an odata reader that is wrapped
The reader.
The payload reading events.
Prevents a default instance of the class from being created.
The reader.
The data service response pipeling configuration object.
Reads the next from the message payload.
true if more items were read; otherwise false.
Creates and Wraps an ODataReader for feeds or entries.
The message reader.
The message type.
The expected EDM type.
The data service response pipeling configuration object.
A reader.
Wraps an ODataReader
The reader.
The data service response pipeling configuration object.
A reader.
The current state of the reader.
The most recent that has been read.
Converter for primitive values which do not match the client property types. This can happen for two reasons:
1) The client property types do not exist in the protocol (Uri, XElement, etc)
2) The values were read using the service's model, and the client types are slightly different (ie float vs double, int vs long).
The response format the values were originally read from. Required for re-interpreting spatial values correctly.
Geo JSON formatter used for converting spatial values. Lazily created in case no spatial values are ever converted.
Gml formatter used for converting spatial values. Lazily created in case no spatial values are ever converted.
Initializes a new instance of the class.
The response format the values were originally read from. Required for re-interpreting spatial values correctly.
Converts a value to primitive value.
The value.
Type of the property.
The converted value if the value can be converted
Converts a non-spatial primitive value to the target type.
The value to convert.
The target type of the conversion.
The converted value.
Converts the value to the target type if needed.
The value to convert.
The target type.
The converted value.
Converts a spatial value by from geometry to geography or vice versa. Will return the original instance if it is already of the appropriate hierarchy.
Will throw whatever parsing/format exceptions occur if the sub type is not the same.
The value to convert.
The target type of the conversion.
The original or converted value.
Converts a spatial value by from geometry to geography or vice versa. Will return the original instance if it is already of the appropriate hierarchy.
Will throw whatever parsing/format exceptions occur if the sub type is not the same.
The type of the value being converted.
The target type of the conversion.
The value to convert.
The original or converted value.
Creates a policy that is used for materializing Primitive values
MaterializerContext used to resolve types for materialization.
primitive property converter used to convert the property have the value has been materialized.
Initializes a new instance of the class.
The context.
The lazy primitive property converter.
Materializes the primitive data value.
Type of the collection item.
Name of the wire type.
The item.
Materialized primitive data value.
Materializes the primitive data value collection element.
The collection item type.
Name of the wire type.
The item.
Materialized primitive collection element value
Materializes a primitive value. No op or non-primitive values.
Type of value to set.
Type name from the payload.
Value of primitive provided by ODL.
The exception message if the value is null.
The materialized value.
true if the value was set; false if it wasn't (typically because it's a complex value).
Gets the primitive property converter.
The primitive property converter.
Materialized Entity arguments
Initializes a new instance of the class.
The entry.
The entity.
Gets the entry.
The entry.
Gets the entity.
This class represents the contract WCF Data Services client with the request message.
Http method.
Initializes a new instance of the class.
The actual method.
Returns the value of the header with the given name.
Name of the header.
Returns the value of the header with the given name.
Sets the value of the header with the given name.
Name of the header.
Value of the header.
Gets the stream to be used to write the request payload.
Stream to which the request payload needs to be written.
Abort the current request.
Begins an asynchronous request for a System.IO.Stream object to use to write data.
The System.AsyncCallback delegate.
The state object for this request.
An System.IAsyncResult that references the asynchronous request.
Ends an asynchronous request for a System.IO.Stream object to use to write data.
The pending request for a stream.
A System.IO.Stream to use to write request data.
Begins an asynchronous request to an Internet resource.
The System.AsyncCallback delegate.
The state object for this request.
An System.IAsyncResult that references the asynchronous request for a response.
Ends an asynchronous request to an Internet resource.
The pending request for a response.
A System.Net.WebResponse that contains the response from the Internet resource.
Returns a response from an Internet resource.
A System.Net.WebResponse that contains the response from the Internet resource.
Returns the collection of request headers.
Gets or sets the request url.
Gets or sets the method for this request.
Gets or set the credentials for this request.
Gets or sets the timeout (in seconds) for this request.
Gets or sets a value that indicates whether to send data in segments to the
Internet resource.
Gets or the actual method. In post tunneling situations method will be POST instead of the specified verb method.
The writing entity reference link arguments
Initializes a new instance of the class.
The entity reference link.
The source.
The target.
Gets the feed.
The feed.
Gets the source.
Gets the target.
Writing entry arguments
Initializes a new instance of the class.
The entry.
The entity.
Gets the entry.
The entry.
Gets the entity.
Writing navigation link arguments
Initializes a new instance of the class.
The link.
The source.
The target.
Gets the link.
The link.
Gets the source.
Gets the target.
Class that holds a variety of events for writing the payload from the OData to the wire
Actions to execute before start entry called.
Actions to execute before end entry called.
Actions to execute before entity reference link written.
Actions to execute after before start navigation link called.
Actions to execute before end navigation link called.
The message writer setting configurations.
The delegate that represents how a message is created.
Creates a request pipeline configuration class
Called when [message writer created].
The args.
The request pipeline configuration.
Called when [entry starting].
The action.
The request pipeline configuration.
Called when [entry ending].
The action.
The request pipeline configuration.
Called when [entity reference link].
The action.
The request pipeline configuration.
Called when [navigation link starting].
The action.
The request pipeline configuration.
Called when [navigation link end].
The action.
The request pipeline configuration.
Called when [create message writer settings configurations].
The writer settings.
Fires before entry end.
The entry.
The entity.
Fires before entry start.
The entry.
The entity.
Fires before navigation end.
The link.
The source.
The target.
Fires before navigation start.
The link.
The source.
The target.
Fires before writing the on entity reference link.
The entity reference link.
The source.
The target.
Gets the request message to be used for sending the request. By providing a custom message, users
can replace the transport layer.
Determines if OnMessageCreating is being used or not.
Gets or sets the a value indicating whether the context is using the sending request event or not.
The reading navigation link arguments
Initializes a new instance of the class.
The link.
Gets the link.
The link.
The reading feed arguments
Initializes a new instance of the class.
The feed.
Gets the feed.
The feed.
Entity Tracker base, allows more decoupling for testing.
Find tracked entity by its resourceUri and update its etag.
resource id
state of entity
entity if found else null
get the related links ignoring target entity
source entity
source entity's property
enumerable of related ends
Attach entity into the context in the Unchanged state.
entity descriptor from the response
fail for public api else change existing relationship to unchanged
Caller should validate descriptor instance.
The attached descriptor, if one already exists in the context and failIfDuplicated is set to false, then the existing instance is returned
if entity is already being tracked by the context
if identity is pointing to another entity
verify the resource being tracked by context
resource
The given resource.
if resource is not contained
Detach existing link
link to detach
true if target is being deleted, false otherwise
attach the link with the given source, sourceProperty and target.
source entity of the link.
name of the property on the source entity.
target entity of the link.
merge option to be used to merge the link if there is an existing link.
response materialization has an identity to attach to the inserted object
entity descriptor containing all the information about the entity from the response.
mergeOption based on which EntityDescriptor will be merged.
Contains state and methods required to materialize odata collection, complex and primitive values
Context for materialization of OData values
Resolves the client type that should be used for materialization.
Expected client clr type based on the API called.
The name surfaced by the ODataLib reader.
If we have a server model, this will be a server type name that needs to be resolved.
If not, then this will already be a client type name.
The resolved annotation for the client type to materialize into.
Resolves the expected EDM type to give to the ODataLib reader based on a client CLR type.
The client side CLR type.
The resolved EDM type to provide to ODataLib.
Gets a value indicating whether Ignore missing properties is set or not
Gets a value indicated the Client Edm Model
Gets the materialization Events
Initializes a materializer context
Response information used to initialize with the materializer
Resolved the given edm type to clr type.
Expected Clr type.
Edm name of the type returned by the resolver.
an instance of ClientTypeAnnotation with the given name.
Resolves the EDM type for the given CLR type.
The client side CLR type.
The resolved EDM type.
Gets a value indicating whether to ignore missing properties when materializing values
Gets a Client Edm model used to materialize values
Gets the materialization Events
Gets the Response information that backs the information on the context
The reading entry args
Initializes a new instance of the class.
The entry.
Gets the entry.
The entry.
Class that is responsible for configuration of actions that are invoked from a response
Actions to be run when reading start entry called
Actions to be run when reading end entry called
Actions to be run when reading start feed called
Actions to be run when reading end feed called
Actions to be run when reading start link called
Actions to be run when reading end link called
Actions to be run after an entry has been materialized
The message reader setting configurations.
The sender.
Creates a Data service client response pipeline class
The sender for the Reading Atom event.
Called when [reader settings created].
The reader message settings configuration.
The response pipeline configuration.
Called when [read start entry].
The action.
The response pipeline configuration.
Called when [read end entry].
The action.
The response pipeline configuration.
Called when [read start feed].
The action.
The response pipeline configuration.
Called when [read end feed].
The action.
The response pipeline configuration.
Called when [read start navigation link].
The action.
The response pipeline configuration.
Called when [read end navigation link].
The action.
The response pipeline configuration.
Called when [entity materialized].
The action.
The response pipeline configuration.
Executes actions that configure reader settings.
The reader settings.
Executes the on entry end actions.
The entry.
Executes the on entry start actions.
The entry.
Executes the on feed end actions.
The feed.
Executes the on feed start actions.
The feed.
Executes the on navigation end actions.
The link.
Executes the on navigation start actions.
The link.
Fires after the entry was materialized
The entry.
The entity.
Fires the reading atom entity event.
The materializer entry.
Fires the end entry events.
The entry.
Internal event instance used by the public ReadingEntity event.
Gets a value indicating whether this instance has handlers.
true if this instance has handlers; otherwise, false.
Gets a value indicating whether this instance has atom reading entity handlers.
true if this instance has atom reading entity handlers; otherwise, false.
Gets whether there is a reading entity handler
Class for reading top level feeds or entries and adapting it for the materializer
The odata format being read.
The reader.
The Client Edm Model used to determine type information.
MergeOption information to determine how to merge descriptors.
An enumerator of values.
The current feed.
The current entry.
Initializes a new instance of the class.
The messageReader that is used to get the format of the reader.
The reader.
The model.
The mergeOption.
Initializes a new instance of the class. Used for tests so no ODataMessageReader is required
The format of the reader.
The reader.
The model.
The mergeOption.
The count tag's value, if requested
Should read pull if no feed exists.
The count value returned from the server
Read a feed or entry, with the expected type.
true if a value was read, otherwise false
Disposes the reader
Tries to read a feed or entry.
if set to true [lazy].
The feed.
The entry.
true if a value was read, otherwise false
Tries to read the start of a feed or entry.
true if a value was read, otherwise false
Tries to read a feed.
if set to true [lazy].
The feed.
true if a value was read, otherwise false
Reads the remainder of a feed.
if set to true [lazy].
A feed.
Lazily reads entries.
An enumerable that will lazily read entries when enumerated.
Tries to read an entry.
The entry.
true if a value was read, otherwise false
Reads the remainder of an entry.
An entry.
Reads a navigation link.
A navigation link.
Tries to read from the ODataReader.
True if a value is read, otherwise false
Reads from the reader and asserts the reader is in the expected state.
The expected state.
Asserts that an item could be read.
Asserts the reader is in the expected state.
The expected state.
Gets the current feed.
Gets the current entry.
Gets a value indicating whether this instance is end of stream.
true if this instance is end of stream; otherwise, false.
Useful extension methods for IDictionary
If the key exists in the dictionary, returns it. Otherwise creates a new value, adds it to the dictionary, and returns it.
The type of the key.
The type of the value.
The dictionary to look in.
The key to find/add.
A callback to create a new value if one is not found.
The new or found value.
Sets a range of values in the dictionary. A set operation is performed on each value in
The type of the key.
The type of the value.
The dictionary to set the values in.
Enumerable of key-value pairs to set in .
Tracks the user-preferred format which the client should use when making requests.
MIME type for ATOM bodies (http://www.iana.org/assignments/media-types/application/).
MIME type for JSON bodies (implies light in V3, verbose otherwise) (http://www.iana.org/assignments/media-types/application/).
MIME type for JSON bodies in light mode (http://www.iana.org/assignments/media-types/application/).
MIME type for JSON bodies in light mode with all metadata.
MIME type for JSON bodies in verbose mode (http://www.iana.org/assignments/media-types/application/).
OData parameter value for verbose.
MIME type for changeset multipart/mixed
MIME type for XML bodies.
Combined accept header value for either 'application/atom+xml' or 'application/xml'.
text for the utf8 encoding
The character set the client wants the response to be in.
The context this format instance is associated with.
Initializes a new instance of the class.
DataServiceContext instance associated with this format.
Indicates that the client should use the efficient JSON format.
The model of the service.
Indicates that the client should use the efficient JSON format. Will invoke the LoadServiceModel delegate property in order to get the required service model.
Indicates that the client should use the Atom format.
Sets the value of the Accept header to the appropriate value for the current format.
The headers to modify.
Sets the value of the Accept header for a query.
The headers to modify.
The query components for the request.
Sets the value of the Accept header for a stream request (will set it to '*/*').
The headers to modify.
Sets the value of the Accept header for a count request (will set it to 'text/plain').
The headers to modify.
Sets the value of the Accept header for a count request (will set it to 'multipart/mixed').
The headers to modify.
Sets the value of the ContentType header on the specified entry request to the appropriate value for the current format.
Dictionary of request headers.
Sets the value of the Content-Type header a request with operation parameters to the appropriate value for the current format.
Dictionary of request headers.
Sets the value of the ContentType header on the specified links request to the appropriate value for the current format.
Dictionary of request headers.
Validates that we can write the request format.
The request message to get the format from.
true if the writer is intended to for a parameter payload, false otherwise.
Validates that we can read the response format.
The response message to get the format from.
Throws InvalidOperationException for JSON Light without a model.
Throws NotSupportedException for JSON Verbose format.
Content-type to appear on the message.
Validates that we can read or write a message with the given content-type value.
The content-type value in question.
true if the writer is intended to for a parameter payload, false otherwise.
Sets the request's content type header.
Dictionary of request headers.
content type
Sets the accept header to the given value and the charset to UTF-8.
The headers to update.
The media type for the accept header.
Chooses between using JSON-Light and the context-dependent media type for when Atom is selected based on the user-selected format.
The value if using atom.
Whether or not the select query option is present in the request URI.
If true, indicates that the client should ask the server to include all metadata in a JSON-Light response.
The media type to use (either JSON-Light or the provided value)
Gets the current format. Defaults to Atom if nothing else has been specified.
Invoked when using the parameterless UseJson method in order to get the service model.
True if the format has been configured to use Atom, otherwise False.
ODataFormat to use when writing URI literals.
Gets the service model.
Encapsulates a URI that returns the next page of a paged WCF Data Services query result.
URI to next page of data.
Projection plan for results of next page.
Initializes a new instance.
URI to next page of data.
Projection plan for results of next page.
Returns the next link URI as a string.
A string representation of the next link URI.
Creates a new instance.
Link to next page of data (possibly null).
Plan to materialize the data (only null if nextLinkUri is null).
A new continuation object; null if nextLinkUri is null.
Initializes a new instance that can
be used for this continuation.
A new initializes .
Gets the URI that is used to return the next page of data from a paged query result.
A URI that returns the next page of data.
Type of element to be paged over.
Projection plan for the next page of data; null if not available.
Encapsulates a URI that returns the next page of a paged WCF Data Services query result.Â
The type of continuation token.
Initializes a new typed instance.
URI to next page of data.
Projection plan for results of next page.
Type of element to be paged over.
Determines whether the client requests that the data service return inserted or updated entity data as an entry in the response message.
default option, no Prefer header is sent.
Prefer header with value return-content is sent with all PUT/MERGE/POST requests to entities.
Prefer header with value return-no-content is sent with all PUT/MERGE/POST requests to entities.
Stream wrapper for MR POST/PUT which also holds the information if the stream should be closed or not.
Arguments for the request when POST/PUT of the stream is issued.
The stream we are wrapping.
Can be null in which case we didn't open it yet.
Set to true if the stream should be closed once we're done with it.
Constructor
The stream to use.
Should the stream be closed before SaveChanges returns.
Additional arguments to apply to the request before sending it.
Close the stream if required.
This is so that callers can simply call this method and don't have to care about the settings.
The stream to use.
Arguments to be used for creation of the HTTP request when POST/PUT for the MR is issued.
Represents the URL of a binary resource stream.
name of the stream whose link needs to be populated.
self link for the stream.
This should always be an absolute uri, if specified. If the payload contains an relative uri,
we always use the context base uri to convert this into an absolute uri.
edit link for the stream.
This should always be an absolute uri, if specified. If the payload contains an relative uri,
we always use the context base uri to convert this into an absolute uri.
content type of the stream.
etag for the stream.
Internal constructor to be used by the projection plan compiler, so that we capture the ri
name of the stream.
One of the properties changed its value
property name
PropertyChanged Event
The name of the binary resource stream.
The name of the binary resource stream.
The URI that returns the binary resource stream.
The URI of the stream.
Gets the URI used to edit the binary resource stream.
The URI used to edit the stream.
Gets the MIME Content-Type of the binary resource stream.
The Content-Type value for the stream.
The eTag value that is used to determine concurrency for a binary resource stream.
The value of the eTag header for the stream.
Class to describe errors thrown by transport layer.
Contains the state for this exception.
Constructs a new instance of DataServiceTransportException.
ResponseMessage from the exception so that the error payload can be read.
Actual exception that this exception is wrapping.
Gets the response message for this exception.
Contains the state of the exception, used for serialization in security transparent code.
Called when deserialization of the exception is complete.
The deserialized exception.
Gets or sets the response message for this exception.
Generates proxy methods for external callers to call internal methods
All lambda_methods are considered external. When these methods need
to access internal resources, a proxy must be used. Otherwise the call
will fail for partial trust scenario.
Dynamically generated proxy methods for external callers (lambda_method are external callers)
Builds an expression to best call the specified .
The original method or constructor
The arguments with which to call the method.
An expression to call the argument method or constructor
Determines whether this assembly has enough permissions to create
s that can be hosted within this assembly
and also skip visibility checks (access modifier checks) in order to call potentially
internal user types (e.g., anonymous types).
True if this assembly has enough permissions. Otherwise, false.
Build a externally visible to call the argument method.
The original method or constructor
The arguments with which to call the method.
An expression to call the argument method or constructor
Create a new dynamic method
the name
the return type
the parameter types
a new instance of dynamic method
Wraps the specified in an expression that invokes it.
The method to wrap in an expression.
The arguments with which to invoke the .
An expression which invokes the with the specified .
context
Storage for the client model.
Set of tracked resources
Set of tracked resources by Identity
Set of tracked bindings
change order
Creates a new instance of EntityTracker class which tracks all instances of entities and links tracked by the context.
max protocol version that the client understands.
Gets the entity descriptor corresponding to a particular entity
Entity for which to find the entity descriptor
EntityDescriptor for the or null if not found
verify the resource being tracked by context
resource
The given resource.
if resource is not contained
checks whether there is a tracked entity with the given identity.
identity of the entity.
returns the entity if the identity matches, otherwise returns null.
Adds the given entity descriptors to the list of the tracked entity descriptors.
entity descriptor instance to be added.
the work to detach a resource
resource to detach
true if detached
remove the identity attached to the resource
resource with an identity to detach to detach
Gets the link descriptor corresponding to a particular link b/w source and target objects
Source entity
Property of
Target entity
LinkDescriptor for the relationship b/w source and target entities or null if not found
attach the link with the given source, sourceProperty and target.
source entity of the link.
name of the property on the source entity.
target entity of the link.
merge option to be used to merge the link if there is an existing link.
find and detach link for reference property
source entity
source entity property name for target entity
target entity
link merge option
true if found and not removed
Add the given link to the link descriptor collection
link descriptor to add
throws argument exception if the link already exists
Remove the link from the list of tracked link descriptors.
link to be removed.
true if the link was tracked and now removed, otherwise returns false.
get the related links ignoring target entity
source entity
source entity's property
enumerable of related ends
Detach existing link
link to detach
true if target is being deleted, false otherwise
response materialization has an identity to attach to the inserted object
entity descriptor containing all the information about the entity from the response.
mergeOption based on which EntityDescriptor will be merged.
use location from header to generate initial edit and identity
entity in added state
identity as specified in the response header - location header or dataserviceid header.
editlink as specified in the response header - location header.
Attach entity into the context in the Unchanged state.
entity descriptor from the response
fail for public api else change existing relationship to unchanged
Caller should validate descriptor instance.
The attached descriptor, if one already exists in the context and failIfDuplicated is set to false, then the existing instance is returned
if entity is already being tracked by the context
if identity is pointing to another entity
Find tracked entity by its resourceUri and update its etag.
resource id
state of entity
entity if found else null
increment the resource change for sorting during submit changes
the resource to update the change order
create this.identityToResource when necessary
create this.bindings when necessary
Ensure an identity is unique and does not point to another resource
The identity
The entity descriptor
Returns a collection of all the links (ie. associations) currently being tracked by the context.
If no links are being tracked, a collection with 0 elements is returned.
Returns a collection of all the resources currently being tracked by the context.
If no resources are being tracked, a collection with 0 elements is returned.
Holds information about a ServiceFunction.
This is a just a pass through implementation of IODataRequestMessage. This class is used
for wrapping the inner batch requests or in silverlight when we are using the
non-silverlight http stack, we need to fire IODataRequestMessage which throws
when GetStream is called.
IODataRequestMessage implementation that this class wraps.
Boolean flag to allow calls to GetStream() on this instance
We want to allow this because WritingRequest and ReadingResponse events on the Windows Phone platform
requires that we pass a readable stream to user code as arguments.
request stream
dictionary containing http headers.
Creates a new instance of InternalODataRequestMessage.
IODataRequestMessage that needs to be wrapped.
boolean flag to allow calls to GetStream() on this instance
Returns the value of the header with the given name.
Name of the header.
Returns the value of the header with the given name.
Sets the value of the header with the given name.
Name of the header.
Value of the header.
Gets the stream to be used to write the request payload.
Stream to which the request payload needs to be written.
Abort the current request.
Begins an asynchronous request for a System.IO.Stream object to use to write data.
The System.AsyncCallback delegate.
The state object for this request.
An System.IAsyncResult that references the asynchronous request.
Ends an asynchronous request for a System.IO.Stream object to use to write data.
The pending request for a stream.
A System.IO.Stream to use to write request data.
Begins an asynchronous request to an Internet resource.
The System.AsyncCallback delegate.
The state object for this request.
An System.IAsyncResult that references the asynchronous request for a response.
Ends an asynchronous request to an Internet resource.
The pending request for a response.
A System.Net.WebResponse that contains the response from the Internet resource.
Returns a response from an Internet resource.
A System.Net.WebResponse that contains the response from the Internet resource.
Returns the collection of request headers.
Gets or Sets the request url.
Gets or Sets the http method for this request.
Gets or set the credentials for this request.
Gets or sets the timeout (in seconds) for this request.
Gets or sets a value that indicates whether to send data in segments to the
Internet resource.
internal headers dictionary
Response from an Invoke call.
Operation response base class
Http headers of the response.
Http status code of the response.
exception to throw during get results
constructor
HTTP headers
When overridden in a derived class, contains the HTTP response headers associated with a single operation.
object that contains name value pairs of headers and values.
When overridden in a derived class, gets or sets the HTTP response code associated with a single operation.
Integer value that contains response code.
Gets error thrown by the operation.
An object that contains the error.
Http headers of the response.
Consutrcts an InvokeResponse identical to an OperationResponse.
The HTTP headers.
Encapsulates information about a link, or relationship, between entities.
navigation URI to the related entity.
association URI to the related entity.
the navigation property name
Creates a LinkInfo with a given properyName
the name of the navigation property
Gets the name of the link.
The name of the link.
Gets the URI that is the navigation property representation of the link.
The navigation link URI.
Gets the URI that is the association link.
The URI of the association link.
wrapper around loading a property from a response
Wrapper HttpWebRequest & HttWebResponse
Originating service request
The request info.
Originating WebRequest
reusuable async copy buffer
content to write to request stream
web response, closed when completed
Response info once it's available
buffer when copying async stream to response stream cache
response stream, returned to other parts of the system
with async, the asyncResponseStream is copied into this stream
copy of HttpWebResponse.ContentType
copy of HttpWebResponse.ContentLength
copy of HttpWebResponse.StatusCode
does this own the response stream or does the container of this QueryAsyncResult?
if the BeginRead has been called with asyncStreamCopyBuffer, but EndRead has not.
do not return the buffer to general pool if any question of it being in use.
constructor
source object of async request
async method name on source object
Originating serviceRequest
Originating WebRequest
The request info of the originating request.
user callback
user state
constructor
source object of async request
async method name on source object
Originating serviceRequest
Originating WebRequest
The request info of the originating request.
user callback
user state
the stream containing the request data.
Ends the asynchronous query request.
Element type of the result.
Source object of async request.
async method name.
The asyncResult being ended.
Data service response.
wrapper for HttpWebResponse.GetResponseStream
stream
start the asynchronous request
Synchronous web request
Returns the response for the request.
materialized results for the request.
element type of the results.
returns the instance of QueryOperationResponse containing the response.
Returns the response for the request.
materialized results for the request.
element type of the results.
returns the instance of QueryOperationResponse containing the response.
Create materializer on top of response stream
Precompiled projection plan (possibly null).
A materializer instance ready to deserialize ther result
Processes the result for successfull request and produces the actual result of the request.
Element type of the result.
The plan to use for the projection, if available in precompiled form.
A instance of QueryResponseResult created on top of of the request.
cleanup work to do once the request has completed
Create the ResponseInfo.
ResponseInfo object.
get stream which of copy buffer (via response stream) will be copied into
writtable stream, happens before GetAsyncResponseStreamCopyBuffer
get buffer which response stream will be copied into
writtable stream
returning a buffer after being done with it
buffer to return
set the http web response
response object
Disposes the request object if it is not null. Invokes the user callback
the request object
handle request.BeginGetResponse with request.EndGetResponse and then copy response stream
async result
verify non-null and not completed
async result
error code if null or completed
Make async calls to read the response stream.
the state containing the information about the asynchronous operation.
handle responseStream.BeginRead with responseStream.EndRead
async result
Creates an instance of for the given plan.
The projection plan.
expected payload kind.
A new materializer instance
HttpWebResponse.ContentLength
HttpWebResponse.ContentType
HttpWebResponse.StatusCode
entity whose property is being loaded
Projection plan for loading results; possibly null.
name of the property on the entity that is being loaded
constructor
entity
name of collection or reference property to load
Originating context
Originating WebRequest
user callback
user state
request object.
Projection plan for materialization; possibly null.
Whether this request is a continuation request.
loading a property from a response
QueryOperationResponse instance containing information about the response.
Creates the ResponseInfo object.
ResponseInfo object.
Reads the data from the response stream into a buffer using the content length.
Response stream.
Length of data to read.
byte array containing read data.
Reads the data from the response stream in chunks.
Response stream.
byte array containing read data.
Load property data from an ATOM response
The property being loaded
property values as IEnumerable.
Load property data form a raw response
The property being loaded
property values as IEnumerable.
Used to materialize a collection of primitive or complex values from an .
Used to materialize a value from an .
Optional field that indicates if we should expect a single result to materialize, as opposed to a collection.
Reader for a message that contains a value or property.
Has the value been read.
Initializes a new instance of the class.
The reader.
The materializer context.
The expected type.
The single result.
Clears the materialization log of activity.
Applies the materialization log to the context.
Implementation of Read>.
Return value of Read/>
Called when IDisposable.Dispose is called.
Reads a value from the message reader.
The expected client type being materialized into.
The expected type for the underlying reader.
Feed being materialized; possibly null.
Entry being materialized; possibly null.
Whether we have finished processing the current data stream.
The count tag's value, if requested
The count value returned from the server
Function to materialize an entry and produce a value.
Returns true if the materializer has been disposed
The format of the response being materialized.
Current value being materialized; possibly null.
Initializes a new instance of the class.
The reader.
The materializer context.
The expected type.
The single result.
Reads a value from the message reader.
The expected client type being materialized into.
The expected type for the underlying reader.
Current value being materialized; possibly null.
Class that wraps the collection reader to get values from the collection reader
Collection Reader
Initializes a new instance of the class.
The collection reader.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
Advances the enumerator to the next element of the collection.
true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
The collection was modified after the enumerator was created.
Sets the enumerator to its initial position, which is before the first element in the collection.
The collection was modified after the enumerator was created.
Gets the current element in the collection.
The current element in the collection.
The enumerator is positioned before the first element of the collection or after the last element.-or- The collection was modified after the enumerator was created.
Materializes entities from a sequence of ODataEntry objects
The format of the response being materialized.
The entries enumerator
Is the enumerator finished.
Initializes a new instance of the class.
The entries.
The materializer context.
The entity tracking adapter.
The query components.
The expected type.
The materialize entry plan.
The format.
Reads the next feed or entry.
True if an entry was read, otherwise false
Called when IDisposable.Dispose is called.
Feed being materialized; possibly null.
Entry being materialized; possibly null.
The count tag's value, if requested
The count value returned from the server
Returns true if the underlying object used for counting is available
Whether we have finished processing the current data stream.
Returns true if the materializer has been disposed
The format of the response being materialized.
Use this class to invoke projection methods from .
Enumerates casting each element to a type.
Element type to enumerate over.
Element source.
An IEnumerable<T> that iterates over the specified .
This method should be unnecessary with .NET 4.0 covariance support.
Creates a list to a target element type.
Materializer used to flow link tracking.
Element type to enumerate over.
Element type for list.
Element source.
An IEnumerable<T> that iterates over the specified .
This method should be unnecessary with .NET 4.0 covariance support.
Checks whether the entity on the specified is null.
Root entry for paths.
Expected type for .
Path to pull value for.
Whether the specified is null.
This method will not instantiate entity types on the path.
Provides support for Select invocations for projections.
Materializer under which projection is taking place.
Root entry for paths.
Expected type for .
Expected result type.
Path to traverse.
Selector callback.
An enumerable with the select results.
Provides support for getting payload entries during projections.
Entry to get sub-entry from.
Name of sub-entry.
The sub-entry (never null).
Initializes a projection-driven entry (with a specific type and specific properties).
Materializer under which projection is taking place.
Root entry for paths.
Expected type for .
Expected result type.
Properties to materialize.
Functions to get values for functions.
The initialized entry.
Projects a simple value from the specified .
Materializer under which projection is taking place.
Root entry for paths.
Expected type for .
Path to pull value for.
The value for the specified .
This method will not instantiate entity types, except to satisfy requests
for payload-driven feeds or leaf entities.
Materializes an entry with no special selection.
Materializer under which materialization should take place.
Entry with object to materialize.
Expected type for the entry.
The materialized instance.
Materializes an entry without including in-lined expanded links.
Materializer under which materialization should take place.
Entry with object to materialize.
Expected type for the entry.
The materialized instance.
Extension methods for ODataItems
Gets the materialized value.
The property.
The materialized value.
Determines whether a value has been materialized.
The property.
true if the value has been materialized; otherwise, false.
Sets the materialized value.
The property.
The materialized value.
Gets the materialized value.
The complex value.
The materialized value.
Determines whether a value has been materialized.
The complex value.
true if the value has been materialized; otherwise, false.
Sets the materialized value.
The complex value.
The materialized value.
Gets the materialized value.
The annotatable object.
The materialized value
Determines whether a value has been materialized.
The annotatable object.
true if the value has been materialized; otherwise, false.
Sets the materialized value.
The annotatable object.
The materialized value.
Annotation class for the materialized value
Gets or sets the value.
The value.
Materializes from $links
The links value read from the message.
Initializes a new instance of the class.
The reader.
The materializer context.
The expected type.
The single result.
Reads from message reader.
The expected client type being materialized into.
The expected type for the underlying reader.
Reads the links.
Gets the count value.
Current value being materialized; possibly null.
Returns true if the underlying object used for counting is available
Used to materialize a property from an .
Current value being materialized; possibly null.
Initializes a new instance of the class.
The reader.
The materializer context.
The expected type.
The single result.
Reads a value from the message reader.
The expected client type being materialized into.
The expected type for the underlying reader.
Current value being materialized; possibly null.
Used to materialize a value from an .
Current value being materialized; possibly null.
Initializes a new instance of the class.
The reader.
The materializer context.
The expected type.
Is a single result expected.
Reads a value from the message reader.
The expected client type being materialized into.
The expected type for the underlying reader.
Current value being materialized; possibly null.
To cache the entity instance as annotation for firing ReadingEntity event
XDocument instance to cache the payload.
BaseUri for the entry payload.
Creates a new instance of ReadingEntityInfo
XElement containing the entry payload.
base uri for the entry payload.
Returns the new XmlReader to cache the payload for firing ReadingEntity event.
ODataEntry instance that is currently getting deserialized.
XmlReader that is used to read the payload.
BaseUri for the entry payload.
XmlReader instance that needs to be used to read the payload for the given odataentry.
Use this class to analyze a member assignment and figure out the
target path for a member-init on an entity type.
This class will also detect cases in which the assignment
expression refers to cases which we shouldn't handle during
materialization, such as references to multiple entity types
as sources (or refering to no source at all).
base vistor class for walking an expression tree bottom up.
Main visit method for ALinqExpressionVisitor
The expression to visit
The visited expression
MemberBinding visit method
The MemberBinding expression to visit
The visited MemberBinding expression
ElementInit visit method
The ElementInit expression to visit
The visited ElementInit expression
UnaryExpression visit method
The UnaryExpression expression to visit
The visited UnaryExpression expression
BinaryExpression visit method
The BinaryExpression expression to visit
The visited BinaryExpression expression
TypeBinaryExpression visit method
The TypeBinaryExpression expression to visit
The visited TypeBinaryExpression expression
ConstantExpression visit method
The ConstantExpression expression to visit
The visited ConstantExpression expression
ConditionalExpression visit method
The ConditionalExpression expression to visit
The visited ConditionalExpression expression
ParameterExpression visit method
The ParameterExpression expression to visit
The visited ParameterExpression expression
MemberExpression visit method
The MemberExpression expression to visit
The visited MemberExpression expression
MethodCallExpression visit method
The MethodCallExpression expression to visit
The visited MethodCallExpression expression
Expression list visit method
The expression list to visit
The visited expression list
MemberAssignment visit method
The MemberAssignment to visit
The visited MemberAssignmentt
MemberMemberBinding visit method
The MemberMemberBinding to visit
The visited MemberMemberBinding
MemberListBinding visit method
The MemberListBinding to visit
The visited MemberListBinding
Binding List visit method
The Binding list to visit
The visited Binding list
ElementInit expression list visit method
The ElementInit expression list to visit
The visited ElementInit expression list
LambdaExpression visit method
The LambdaExpression to visit
The visited LambdaExpression
NewExpression visit method
The NewExpression to visit
The visited NewExpression
MemberInitExpression visit method
The MemberInitExpression to visit
The visited MemberInitExpression
ListInitExpression visit method
The ListInitExpression to visit
The visited ListInitExpression
NewArrayExpression visit method
The NewArrayExpression to visit
The visited NewArrayExpression
InvocationExpression visit method
The InvocationExpression to visit
The visited InvocationExpression
Empty expression array; immutable.
Entity in scope for the lambda that's providing the parameter.
A non-null value when incompatible paths were found for an entity initializer.
Whether multiple paths were found for this analysis.
Path traversed from the entry field.
Initializes a new instance.
Entity in scope for the lambda that's providing the parameter.
Analyzes an assignment from a member-init expression.
Entity in scope for the lambda that's providing the parameter.
The expression to analyze.
The analysis results.
Checks whether the this and a
paths for assignments are compatible.
Type being initialized.
Previously seen member accesses (null if this is the first).
An exception to be thrown if assignments are not compatible; null otherwise.
This method does not set the IncompatibleAssignmentsException property on either
analysis instance.
Visits the specified .
Expression to visit.
The visited expression.
This method is overriden to short-circuit analysis once an error is found.
Visits a conditional expression.
Expression to visit.
The same expression.
There are three expressions of interest: the Test, the IfTrue
branch, and the IfFalse branch. If this is a NullCheck expression,
then we can traverse the non-null branch, which will be the
correct path of the resulting value.
Parameter visit method.
Parameter to visit.
The same expression.
NewExpression visit method
The NewExpression to visit
The visited NewExpression
Visits a nested member init.
Expression to visit.
The same expression.
Visits a member access expression.
Access to visit.
The same expression.
Visits a method call expression.
Method call to visit.
The same call.
Gets the expressions that go beyond the last entity.
An array of member expressions coming after the last entity.
Currently a single member access is supported.
Gets the expressions that "walk down" to the last entity, ignoring the last expression.
An array of member expressions down to, but excluding, the last entity.
Gets the expressions that "walk down" to the last entity.
whether to ignore the last expression or not.
An array of member expressions down to the last entity.
Checks whether the and
paths for assignments are compatible.
Type being initialized.
Previously seen member accesses.
Member assignments under evaluate.
An exception to be thrown if assignments are not compatible; null otherwise.
Creates an exception to be used when CheckCompatibleAssignment fails.
Type being initialized.
Previously seen member accesses.
Member assignments under evaluate.
A new exception with diagnostic information.
If there is a MemberInitExpression 'new Person { ID = p.ID, Friend = new Person { ID = p.Friend.ID }}'
or a NewExpression 'new { ID = p.ID, Friend = new { ID = p.Friend.ID }}',
this method validates against the RHS of the member assigment, the expression "p.ID" for example.
The expression to validate.
Type of the MemberInit or the New expression.
The outter nested initializer of the current initializer we are checking.
true if the expression to assign is fine; false otherwise.
A non-null value when incompatible paths were found for an entity initializer.
Whether multiple paths were found during analysis.
Helper class for creating ODataLib readers, settings, and other read-related classes based on an instance of .
The current response info.
Initializes a new instance of the class.
The response info.
Create message reader settings for consuming responses.
Optional XML entry customization callback to be used.
Newly created message reader settings.
Creates a new the reader for the given response message and settings.
The response message.
The settings.
Newly created message reader.
Helper class for creating ODataLib writers, settings, and other write-related classes based on an instance of .
The current request info.
Initializes a new instance of the class.
The request info.
Create message writer settings for producing requests.
Optional XML entry customization callback to be used for the start of entries.
Optional XML entry customization callback to be used for the end of entries.
if set to true indicates that this is a part of a batch request.
Newly created message writer settings.
Creates a writer for the given request message and settings.
The request message.
The writer settings.
true if the writer is intended to for a parameter payload, false otherwise.
Newly created writer.
Creates a request message with the given arguments.
The request message args.
Newly created request message.
IODataRequestMessage interface implementation.
Request Url.
RequestInfo instance.
Creates a new instance of ODataRequestMessage. This constructor is used for top level requests.
RequestMessage that needs to be wrapped.
Request Info.
Descriptor for this request.
Create a request message for a batch part from the batch writer. This method copies request headers
from in addition to the method and Uri.
ODataBatchWriter instance to build operation message from.
RequestMessageArgs for the request.
RequestInfo instance.
an instance of ODataRequestMessageWrapper.
Create a request message for a non-batch requests and outer $batch request. This method copies request headers
from in addition to the method and Uri.
RequestMessageArgs for the request.
RequestInfo instance.
an instance of ODataRequestMessageWrapper.
Create ODataMessageWriter given the writer settings.
Writer settings.
true if the writer is intended to for a parameter payload, false otherwise.
An instance of ODataMessageWriter.
Abort the current request.
Sets the value of an HTTP header.
The name of the header to set.
The value of the HTTP header or 'null' if the header should be removed.
Begins an asynchronous request for a System.IO.Stream object to use to write data.
The System.AsyncCallback delegate.
The state object for this request.
An System.IAsyncResult that references the asynchronous request.
Ends an asynchronous request for a System.IO.Stream object to use to write data.
The pending request for a stream.
A System.IO.Stream to use to write request data.
Sets the request stream.
The content stream to copy into the request stream.
Begins an asynchronous request to an Internet resource.
The System.AsyncCallback delegate.
The state object for this request.
An System.IAsyncResult that references the asynchronous request for a response.
Ends an asynchronous request to an Internet resource.
The pending request for a response.
A System.Net.WebResponse that contains the response from the Internet resource.
Returns a response from an Internet resource.
A System.Net.WebResponse that contains the response from the Internet resource.
Sets the content length header for the given request message.
Add the list of header names to the list of headers whose values need to be reset after firing sendingrequest event.
List of header names.
Adds the given header to the list of header whose values need to be reset after firing sendingrequest event.
List of header names.
Fires the following events, in order
1. WritingRequest
2. SendingRequest2
Descriptor for which this request is getting generated.
FireSendingRequest2 event.
Descriptor for which this request is getting generated.
Descriptor for this request; or null if there isn't one.
Return the stream containing the request payload.
Gets or sets a value that indicates whether to send request data in segments.
Returns true if the message is part of the batch request, otherwise return false;
This is a just a pass through implementation of IODataRequestMessage.
In order to keep the sync and non-async code the same, we write all requests into an cached stream and then copy
it to the underlying network stream in sync or async manner.
IODataRequestMessage implementation that this class wraps.
The cached request stream.
Creates a new instance of InternalODataRequestMessage.
IODataRequestMessage that needs to be wrapped.
Returns the value of the header with the given name.
Name of the header.
Returns the value of the header with the given name.
Sets the value of the header with the given name.
Name of the header.
Value of the header.
Gets the stream to be used to write the request payload.
Stream to which the request payload needs to be written.
Returns the collection of request headers.
Gets or Sets the request url.
Gets or Sets the http method for this request.
Return the stream containing the request payload.
This class wraps the request message for non-batch requests and $batch requests.
Wrapper for the top-level request messages which caches the request stream as it is written. In order to keep the sync and non-async
code the same, we write all requests into an cached stream and then copy it to the underlying network stream in sync or async manner.
Creates a new instance of ODataOuterRequestMessage.
DataServiceClientRequestMessage instance.
RequestInfo instance.
Descriptor for this request.
Create ODataMessageWriter given the writer settings.
Writer settings.
true if the writer is intended to for a parameter payload, false otherwise.
An instance of ODataMessageWriter.
Returns true if the message is part of the batch request, otherwise return false;
Return the stream containing the request payload.
This class wraps the request message for inner batch operations.
Inner batch request that ODataLib creates.
Creates a new instance of InnerBatchRequestMessageWrapper;
Instance of DataServiceClientRequestMessage that represents this request.
Instance of IODataRequestMessage created by ODataLib.
RequestInfo instance.
Descriptor for this request.
Create ODataMessageWriter given the writer settings.
Writer settings.
true if the writer is intended to for a parameter payload, false otherwise.
An instance of ODataMessageWriter.
Returns true if the message is part of the batch request, otherwise return false;
Return the stream containing the request payload.
Use this class to represent an annotated list of path segments.
Initializes a new instance.
Initializes a new instance.
Root parameter for this path.
Expression to get the expected root type in the target tree.
Expression for the root entry.
Initializes a new instance.
Root parameter for this path.
Expression to get the expected root type in the target tree.
Expression for the root entry.
Member to initialize the path with.
Provides a string representation of this object.
A string representation of this object, suitable for debugging.
Parameter expression in the source tree.
Expression to get the entry for in the target tree.
Expression to get the expected root type in the target tree.
Use this class to help keep track of projection paths built
while compiling a projection-based materialization plan.
Stack of whether entities are in scope.
Registers rewrites for member initialization blocks.
Stack of lambda expressions in scope.
Stack of expected type expression for .
Stack of 'entry' parameter expressions.
Stack of projection (target-tree) types for parameters.
Initializes a new instance.
Provides a string representation of this object.
String representation of this object.
Records that a lambda scope has been entered when visiting a projection.
Lambda being visited.
Expression to the entry parameter from the target tree.
Expression to the entry-expected-type from the target tree.
Records that a member initialization expression has been entered
when visting a projection.
Expression for initialization.
Gets a rewrite for the specified expression; null if none is found.
Expression to match.
A rewrite for the expression; possibly null.
Records that a lambda scope has been left when visting a projection.
Records that a member initialization expression has been left when
visting a projection.
Registers a member initialization rewrite.
Root of member access path, typically a source tree parameter of entity type.
Sequence of names to match.
Rewrite expression for names.
Revokes the latest rewrite registered on the specified .
Root of rewrites to revoke.
Names to revoke.
Whether the current scope is acting on an entity.
Expression for the expected type parameter.
Whether any rewrites have been registered.
Expression for the entity parameter in the source tree lambda.
Expression for the entry parameter in the target tree.
Use this class to record how rewrites should occur under nested member initializations.
Sequence of member names to match.
Root of member access path, typically a source tree parameter of entity type.
Rewrite expressions for the last member path.
Use this class to represent a step in a path of segments
over a parsed tree used during projection-driven materialization.
Initializes a new instance.
Path on which this segment is located.
Name of member to access when traversing a property; possibly null.
Type that we expect to project out; typically the same as , but may be adjusted.
Initializes a new instance.
Path on which this segment is located.
Member expression for the projection path; possibly null.
Name of member to access when traversing a property; possibly null.
Type that we expect to project out; typically the same as , but may be adjusted.
In particular, this type will be adjusted for nested narrowing entity types.
For example:
from c in ctx.Customers select new NarrowCustomer() {
ID = c.ID,
BestFriend = new NarrowCustomer() { ID = c.BestFriend.ID }
}
In this case, ID will match types on both sides, but BestFriend
will be of type Customer in the member access of the source tree
and we want to project out a member-initialized NarrowCustomer
in the target tree.
Contains the TypeAs at the source of the member access, null otherwise
e.g. (p as Employee).Manager
Path on which this segment is located.
Use this class to store a materialization plan used with projections.
Runs this plan.
Materializer under which materialization should happen.
Root entry to materialize.
Expected type for the .
The materialized object.
Last segment type for query.
This typically matches the expected element type at runtime.
Provides a method to materialize a payload.
Expected type to project.
Use this class to create a for a given projection lambda.
Creates dynamic methods that wrap calls to internal methods.
Annotations being tracked on this tree.
Expression that refers to the materializer.
Tracks rewrite-to-source rewrites introduced by expression normalizer.
Number to suffix to identifiers to help with debugging.
Path builder used to help with tracking state while compiling.
Whether the top level projection has been found.
Initializes a new instance.
Rewrites introduces by normalizer.
Creates a projection plan from the specified .
Projection expression.
Tracks rewrite-to-source rewrites introduced by expression normalizer.
A new instance.
Binary visit method.
Binary expression to visit.
(Possibly rewritten) binary expression.
This override is introduced because binary expressions are one of
the scopes at which normalization happens.
Visits the specified expression.
Expression to check.
The visited expression.
This override allows us to check for rewrites created by
ExpressionNormalizer.CreateCompareExpression.
Unary visit method.
Unary expression to visit.
(Possibly rewritten) unary expression.
This override is introduced because unary expressions are one of
the scopes at which normalization happens.
MemberExpression visit method
The MemberExpression expression to visit
The visited MemberExpression expression
Parameter visit method.
Parameter to visit.
Resulting expression.
The parameter may get rewritten as a materializing projection if
it refers to an entity outside of member binding. In this case,
it becomes a standalone tracked entity.
MemberInitExpression visit method
The MemberInitExpression to visit
The visited MemberInitExpression
A MemberInitExpression on a knownEntityType implies that we
want to materialize the thing.
Visits a method call expression.
Expression to visit.
A (possibly rewritten) expression for .
Visit
Expression to visit
an expression
LambdaExpression visit method.
The LambdaExpression to visit
The visited LambdaExpression
Generates a call to a static method on AtomMaterializer.
Name of method to invoke.
Arguments to pass to method.
The constructed expression.
There is no support for overload resolution - method names in AtomMaterializer
must be unique.
Generates a call to a static method on AtomMaterializer.
Name of method to invoke.
Type arguments for method (possibly null).
Arguments to pass to method.
The constructed expression.
There is no support for overload resolution - method names in AtomMaterializer
must be unique.
Rebind a call to DataServiceCollection constructor
the constructor info
arguments to the constructor
An expression that calls the DSC constructor
Creates an expression that calls ProjectionCheckValueForPathIsNull.
Expression for root entry for paths.
Expression for expected type for entry.
Path to check null value for.
A new expression with the call instance.
Creates an expression that calls ProjectionValueForPath.
Expression for root entry for paths.
Expression for expected type for entry.
Path to pull value from.
A new expression with the call instance.
Creates an expression that calls ProjectionValueForPath.
Expression for root entry for paths.
Expression for expected type for entry.
Path to pull value from.
Path to convert result for.
A new expression with the call instance.
Rebinds a conditional that performs a null check on an entity.
Conditional expression.
Results of null check analysis.
The rebound expression.
Do a rewrite to avoid creating a type in the null check:
a.b == null ? null : [a.b]-based expression
becomes
ProjectionIsNull(a.b) ? null : [a.b]-based expression
Rebinds the specified expression by gathering
annotated paths and returning an expression that calls the
ProjectionGetEntity method.
Member initialization expression.
A new expression suitable for materialization.
Creates an expression that gets the deepest entry that will be found on the
specified (for the target tree).
Path of expressions to walk.
An expression that invokes ProjectionGetEntry on the target tree.
Gets an expression before its rewrite.
Expression to check.
The expression before normalization.
Rebinds the specified parameter expression as a path-based access.
Expression to rebind.
Annotation for the expression to rebind.
The rebound expression.
Rebinds the specified member access expression into a path-based value retrieval method call.
Member expression.
Annotation for the base portion of the expression.
A rebound expression.
Rewrites NewExpression for DataServiceCollection to a constructor proxy method call.
The proxy is required for partially trusted appdomains. Paging information is preserved in the materializer.
NewExpression to create a collection
The rewritten expression.
Rewrites a call to Select() by adding to the current paths to project out.
Call expression.
Expression with annotated path to include in member binding.
Rewrites a call to ToList in the specified method.
Call expression.
Expression with annotated path to include in member binding.
All that is necessary here is to rewrite the call to Select() and indicate
that the target type is a given List<T>.
TODO: we're not bubbling this all the way to the GetOrCreateCollection method - does it matter?
Rewrites a method call used in a sequence method (possibly over entity types).
Call expression.
Expression that can be called directly to yield the expected value.
Returns a method call that returns a list from a typed enumerable.
Expression to convert.
Target type to return.
The new expression.
Annotates an expression, typically from the target tree.
Segment that marks the path found to an expression.
class for the event.
Exposes the ResponseMessage to the user.
Initializes a new instance of the class for a
non-batch or top level $batch response.
The response message the client is receiving.
Descriptor for the request that the client is receiving the response for.
Initializes a new instance of the class.
The response message the client is receiving.
Descriptor for the request that the client is receiving the response for.
Indicates if this response is to an inner batch query or operation.
Gets the response message that the client is receiving.
True if the response is an inner batch operation or query; false otherwise.
Descriptor for the request that the client is receiving the response for.
The descriptor may be null for certain types of requests, like most GET requests
and the top level $batch request.
Collection for header name/value pairs which is known to be case insensitive.
Case-insensitive dictionary for storing the header name/value pairs.
Initializes a new instance of .
The initial set of headers for the collection.
Initializes a new instance of .
The response message to pull the headers from.
Initializes a new instance of .
The initial set of headers for the collection.
Initializes a new instance of which is empty.
Adds default system headers
Currently it sets User-Agent header as default system header
Tries to get the value of the header with the given name, if it is in the collection.
The header name to look for.
The header value, if it was in the collection.
Whether or not the header was in the collection.
Gets the value of the header, or null if it is not in the collection.
The header name to look for.
The header value or null.
Sets a header value. Will remove the header from the underlying dictionary if the new value is null.
The header name to set.
The new value of the header.
Sets multiple header values at once.
The headers to set.
Gets an enumeration of the header values in the collection.
An enumeration of the header values in the collection.
Sets the request DataServiceVersion and MaxDataServiceVersion.
DSV to set the request to.
Max protocol version, which MDSV will essentially be set to.
Sets the header if it was previously unset.
The header to set.
The new header value.
Sets UserAgent header
Creates a copy of the current header collection which uses a different dictionary to store headers.
A copy of the current headers.
Gets the DataServiceVersion as a Version object if it is encoded as a proper version string with an optional Util.VersionSuffix ending.
The DataServiceVersion header as a Version object.
Gets the underlying dictionary the headers are stored in. Should only be used when absolutely necessary for maintaining public API.
Gets the names of all the headers in the collection.
Class which wraps the dataservicecontext and exposes information required for
generating request to send to the server
The type resolver for the current request.
Creates a new instance of RequestInfo class which is used to build the request to send to the server
wrapping context instance.
Whether this is a continuation request.
Creates a new instance of RequestInfo class which is used to build the request to send to the server
wrapping context instance.
This method wraps the HttpWebRequest.GetSyncronousResponse method call. The reasons for doing this are to give us a place
to invoke internal test hook callbacks that can validate the response headers, and also so that we can do
debug validation to make sure that the headers have not changed since they were originally configured on the request.
ODataRequestMessageWrapper instance
If set to true, this method will only re-throw the WebException that was caught if
the response in the exception is null. If set to false, this method will always re-throw in case of a WebException.
Returns the HttpWebResponse from the wrapped GetSyncronousResponse method.
This method wraps the HttpWebRequest.EndGetResponse method call. The reason for doing this is to give us a place
to invoke internal test hook callbacks that can validate the response headers.
HttpWebRequest instance
Async result obtained from previous call to BeginGetResponse.
Returns the HttpWebResponse from the wrapped EndGetResponse method.
Get the server type name - either from the entity descriptor or using the type resolver.
The entity descriptor.
The server type name for the entity.
Get the server type name - either from the entity descriptor or using the type resolver.
Client type annotation.
The server type name for the entity.
Infers the server type name for the entity tracked in the given descriptor based on the server model.
The descriptor containing the entity to get the type name for.
The type name or null if it could not be inferred.
Fires the WritingEvent event
Entity being serialized
XML data of the ATOM entry
The xml base of the feed or entry containing the current ATOM entry
The reverse of ResolveType, use for complex types and LINQ query expression building
client type
type for the server
Returns the instance of ResponseInfo class, which provides all the information for response handling.
merge option to use for handling the response conflicts.
If this parameter is null the default MergeOption value from the context is used.
instance of response info class.
Returns the instance of LoadPropertyResponseInfo class, which provides information for LoadProperty response handling.
Merge option to use for conflict handling.
Entity whose property is being loaded.
Property which is being loaded.
Instance of the LoadPropertyResponseInfo class.
Validates that the response version can be accepted as a response for this request
The version of the response (possibly null if none was specified)
Exception if the version can't be accepted, otherwise null.
Fires the SendingRequest event.
SendingRequestEventArgs instance containing all information about the request.
Fires the SendingRequest2 event.
SendingRequest2EventArgs instance containing all information about the request.
Returns an instance of the IODataRequestMessage
Arguments for creating the request message.
an instance of the IODataRequestMessage
Asks the context to Fire the BuildingRequest event and get RequestMessageArgs.
Http method for the request.
Base Uri for the request.
Request headers.
HttpStack to use.
Descriptor for the request, if there is one.
A new RequestMessageArgs object for building the request message.
The writing helper to use.
context instance.
Whether this is a continuation request.
Gets the URI used to indicate what type scheme is used by the service.
Override the namespace used for the data parts of the ATOM entries
Gets the configurations.
Returns the instance of entity tracker class which tracks all the entities and links for the context.
Indicates if there are subscribers for the WritingEntity event
Whether to ignore extra properties in the response payload.
True if the context's ResolveName property has been set, otherwise false.
True if the context's ResolveName property can be determined to be a user-supplied value, instead of the one provided by codegen.
Gets the BaseUriResolver
Gets the response preference for Add and Update operations.
The maximum protocol version the client should understand.
Returns true if there are subscribers to SendingRequest event.
Returns true if there are subscribers to SendingRequest event.
True if the user could have modified a part of the request. This lets us turn off assertions that normally
prevent us from making certain mistakes we don't mind the user intentionally ignoring.
Gets the authentication information used by each query created using the context object.
Get the timeout span in seconds to use for the underlying HTTP request to the data service.
Whether to use post-tunneling for PUT/DELETE.
Gets the client model.
Gets the tracker for the user-specified format to use for requests.
Gets the type resolver.
Gets the URL conventions the user set on the context.
The HTTP stack to use in Silverlight.
Gets a System.Boolean value that controls whether default credentials are sent with requests.
Wrappers the context and only exposes information required for
processing the response from the server
The request that led to this response.
MergeOption to use to process the response.
Creates a new instance of the ResponseInfo class which exposes all the information from
the context required for processing the response from the server.
The request info
mergeOption
The reading helper to use.
Whether this is a continuation request.
Override the namespace used for the scheme in the category for ATOM entries.
Override the namespace used for the data parts of the ATOM entries
MergeOption to use to merge the entities from the response and one present in the client.
Whether to ignore extra properties in the response payload.
Returns the instance of entity tracker class which tracks all the entities and links for the context.
A flag indicating if the data service context is applying changes
Gets the type resolver instance.
Gets the BaseUriResolver
return the protocol version as specified in the client.
Gets the client model.
Returns the DataServiceContext
Should be only used in DataServiceCollection constructor, where
we need to infer the context from the results.
context instance.
Gets the reading pipeline configuration
Information used for handling response to a LoadProperty request.
Constructs a new instance.
Information about the request.
Merge option.
Entity whose property is being loaded.
Property which is being loaded.
Entity whose property is being loaded.
Property being loaded.
Event args for the SendingRequest2 event.
Creates a new instance of SendingRequest2EventsArgs
request message.
Descriptor that represents this change.
True if this args represents a request within a batch, otherwise false.
The web request reported through this event. The handler may modify or replace it.
The request header collection.
Returns true if this event is fired for request within a batch, otherwise returns false.
Forwards calls to an OData Writer
The odataWriter.
The payload writing events.
Prevents a default instance of the class from being created.
The odata writer.
The request pipeline configuration.
Creates the odata entry writer.
We never create a feed writer as the client doesn't support deep insert, if we did this would need to change
The message writer.
The request pipeline configuration.
The odata Writer Wrapper
Creates the odata entry writer for testing purposes only
The odata writer.
The request pipeline configuration.
The odata Writer Wrapper
Writes the start.
The entry.
The entity.
Writes the end.
The entry.
The entity.
Writes the end.
The link.
The source.
The target.
Writes the end Actions.
The link.
The source.
The target.
Writes the navigation link end.
Writes the start.
The navigation link.
The source.
The target.
Writes the start for Navigation link.
The navigation link.
The source.
The target.
Writes the start for a collection of navigation links.
The navigation link.
Writes the entity reference link.
The reference link.
The source.
The target.
IODataRequestMessage interface implementation.
Request Url.
The effective HTTP method.
RequestInfo instance.
HttpWebRequest instance.
List of header value to reset after SendingRequest event is fired.
True if the FireSendingRequest method is already called, otherwise false.
True if SendingRequest2Event is currently invoked, otherwise false.
Creates a new instance of HttpWebRequestMessage.
Arguments for creating the request message.
Creates a new instance of HttpWebRequestMessage.
Arguments for creating the request message.
RequestInfo instance.
Returns the value of the header with the given name.
Name of the header.
Returns the value of the header with the given name.
Sets the value of the header with the given name.
Name of the header.
Value of the header.
Gets the stream to be used to write the request payload.
Stream to which the request payload needs to be written.
Abort the current request.
Begins an asynchronous request for a System.IO.Stream object to use to write data.
The System.AsyncCallback delegate.
The state object for this request.
An System.IAsyncResult that references the asynchronous request.
Ends an asynchronous request for a System.IO.Stream object to use to write data.
The pending request for a stream.
A System.IO.Stream to use to write request data.
Begins an asynchronous request to an Internet resource.
The System.AsyncCallback delegate.
The state object for this request.
An System.IAsyncResult that references the asynchronous request for a response.
Ends an asynchronous request to an Internet resource.
The pending request for a response.
A System.Net.WebResponse that contains the response from the Internet resource.
Returns a response from an Internet resource.
A System.Net.WebResponse that contains the response from the Internet resource.
Sets the Content length of the Http web request
Http web request to set the content length on
Length to set
Sets the accept charset.
The HTTP web request.
The header value.
Attempts to set the UserAgent property if it exists other wise returns false
The http web request.
The value of the user agent.
Add the list of header names to the list of headers whose values need to be reset after firing sendingrequest event.
List of header names.
This method is called just before firing SendingRequest2 event.
This method is called immd. after SendingRequest2 event has been fired.
Set the header values on the request.
IODataRequestMessage instance containing all the headers.
Dictionary of cached headers.
The Effective http method.
Create an instance of HttpWebRequest from the given IODataRequestMessage instance. This method
is also responsible for firing SendingRequest event.
Http Method.
Request Url.
DataServiceClientRequestMessageArgs instance.
an instance of HttpWebRequest.
Sets the value of the given header in the httpwebrequest instance.
This has a special case for some of the headers to set the properties on the request instead of using the Headers collection.
The request to apply the header to.
Name of the header.
Value of the header.
Get the value of the given header in the httpwebrequest instance.
This has a special case for some of the headers to set the properties on the request instead of using the Headers collection.
The request to get the header value from.
Name of the header.
the value of the header with the given name.
Convert the WebException into DataServiceWebException.
WebException instance.
an instance of DataServiceWebException that abstracts the WebException.
Fire SendingRequest event if its conditions are met.
If the user has a handler for BuildingRequest, we will throw.
If the user has no BuildingRequest handlers but does have a SendingRequest2 handler, we silently do not fire this event (this is shipped 5.0 behavior).
Returns the request url.
Returns the method for this request.
Returns the collection of request headers.
Returns the underlying HttpWebRequest
Gets or set the credentials for this request.
Gets or sets the timeout (in seconds) for this request.
Gets or sets a value that indicates whether to send data in segments to the
Internet resource.
IODataResponseMessage interface implementation
Cached headers.
A func which returns the response stream.
The response status code.
HttpWebResponse instance.
Constructor.
The headers.
The status code.
A function returning the response stream.
Constructor.
HttpWebResponse instance.
Constructor.
The headers.
The status code.
A function returning the response stream.
Returns the value of the header with the given name.
Name of the header.
Returns the value of the header with the given name.
Sets the value of the header with the given name.
Name of the header.
Value of the header.
Gets the stream to be used to read the response payload.
Stream from which the response payload can be read.
Close the underlying HttpWebResponse.
Perform the actual cleanup work.
If 'true' this method is called from user code; if 'false' it is called by the runtime.
Returns the collection of response headers.
Gets the underlying .
The response status code.
Component for converting properties on client types into instance of in order to serialize insert/update payloads.
The request info.
Initializes a new instance of the class.
The request info.
Creates a list of ODataProperty instances for the given set of properties.
Instance of the resource which is getting serialized.
The server type name of the entity whose properties are being populated.
The properties to populate into instance of ODataProperty.
Populated ODataProperty instances for the given properties.
Creates and returns an ODataComplexValue from the given value.
The value type.
The complex value.
If the value is a property, then it represents the name of the property. Can be null, for non-property.
True, if the value is an item in a collection, false otherwise.
Set of instances of complex types encountered in the hierarchy. Used to detect cycles.
An ODataComplexValue representing the given value.
Creates and returns an ODataCollectionValue from the given value.
The type of the value.
If the value is a property, then it represents the name of the property. Can be null, for non-property.
The value.
Set of instances of complex types encountered in the hierarchy. Used to detect cycles.
An ODataCollectionValue representing the given value.
Returns the primitive property value.
Value of the property.
Type of the property.
Returns the value of the primitive property.
Gets the specified type name as an EDM Collection type, e.g. Collection(Edm.String)
Type name of the items in the collection.
Collection type name for the specified item type name.
Creates and returns an for the given primitive value.
The property being converted.
The property value to convert..
An ODataValue representing the given value.
Creates a list of ODataProperty instances for the given set of properties.
Instance of the resource which is getting serialized.
The properties to populate into instance of ODataProperty.
Set of instances of complex types encountered in the hierarchy. Used to detect cycles.
Populated ODataProperty instances for the given properties.
Tries to convert the given value into an instance of .
The property being converted.
The property value to convert..
Set of instances of complex types encountered in the hierarchy. Used to detect cycles.
The odata value if one was created.
Whether or not the value was converted.
Returns the value of the complex property.
Property which contains name, type, is key (if false and null value, will throw).
property value
List of instances of complex types encountered in the hierarchy. Used to detect cycles.
An instance of ODataComplexValue containing the value of the properties of the given complex type.
Returns the value of the collection property.
Collection property details. Must not be null.
Collection instance.
List of instances of complex types encountered in the hierarchy. Used to detect cycles.
An instance of ODataCollectionValue representing the value of the property.
Adds a type annotation to the value if it is primitive and not defined on the server.
The server type name of the entity whose properties are being populated.
The current property.
The already converted value of the property.
Convert between primitive types to string and xml representation
Constructor
Create a parser token from xml feed
The xml reader
The reader is expected to be placed at the beginning of the element, and after this method call, the reader will be placed
at the EndElement, such that the next Element will be read in the next Read call.
token
Create a parser token from text representation ($value end points)
The text form reprensentation
token
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
MethodInfo for the ToArray method on the Binary type.
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Converts the System.Data.Linq.Binary to byte[] by calling the ToArray method on the Binary type.
Instance of Binary type.
Byte[] instance containing the value of the Binary type.
The delay loaded binary type
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between primitive types to string and xml representation
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Convert between an instance of geography and its Xml representation
Create an instance of primitive type from the xml reader
The xml reader
The reader is expected to be placed at the beginning of the element, and after this method call, the reader will be placed
at the EndElement, such that the next Element will be read in the next Read call.
An instance of primitive type
Convert between an instance of geometry and its Xml representation
Create an instance of primitive type from the xml reader
The xml reader
The reader is expected to be placed at the beginning of the element, and after this method call, the reader will be placed
at the EndElement, such that the next Element will be read in the next Read call.
An instance of primitive type
Convert between an instance of DataServiceStreamLink and its xml representation.
There is never a scenario in client which requires to do this, but since a converter
is required, adding one which does nothing for namedstream.
Create an instance of primitive type from a string representation
The string representation
An instance of primitive type
Convert an instance of primitive type to string
The instance
The string representation of the instance
Represent a Primitive Type on the client
1) Performance
For performance reasons we use several dictionaries here:
- clrMapping contains well known primitive types. Initialized in the static constructor and never changed
after initialization. Therefore it is safe to read without locks. Also see comment about Binary type below
- derivedPrimitiveTypeMapping - a map for custom primitive types derived from well known primitive types -
especially spatial types. New items may be added at runtime so reads and writes must be locked
- knownNonPrimitiveTypes - a HashSet of types we have seen and determined they are not primitive. Used
to shortcircuit logic for finding derived primitive types for types we know are not primitive.
To get a primitive type one *MUST NOT* clrMapping since clrMapping will not contain custom primitive types
but call TryGetPrimitiveType method that knows how to handle multiple dictionaries.
2) System.Data.Linq.Binary
We want to avoid static dependency on System.Data.Linq.dll. On the other hand System.Data.Linq.Binary is
a well known primitive type. For performance reasons and to avoid locking the clrMapping is only initialized
in the static ctor when we don't have System.Data.Linq.Binary type handy. Therefore we use the dummy BinaryTypeSub
type during initialization. As a result to get a well known primitive type one *MUST NOT* use the clrMapping
dictionary directly but call TryGetWellKnownPrimitiveType() method which knows how to handle BinaryType.
Clr Type - Primitive Type mapping for well known primitive types
It is being initialized in the static constructor and must not change
later. This way we can avoid locking it.
Clr Type - Primitive Type mapping for custom derived primitive type (e.g. spatial types)
This dictionary contains type mapping for custom derived primitive types (e.g. spatial) that
are types discovered at runtime and added as we go. Any access to this dictionary requires locking.
Edm Type - Primitive Type mapping
Cache containing known non-primitive types. Any access to this hashset requires locking.
Static Constructor
Constructor
The Clr Type
The Edm Type Name
The Edm Primitive Type Kind
A PrimitiveXmlConverter that provides convertion between instances of this type to its Xml representation and back
Whether this primitive type can be mapped from the Edm type name
Try retrieve a primitive type metadata from a clr type
The Clr Type
The returning primitive type
True if the type is found
See remarks for the class.
Try retrieve a primitive type metadata from a Edm Type Name
Edm Type Name
The returning primitive type
True if the type is found
Is this a known primitive type (including string,byte[],uri)
type to analyze
true if known primitive type
Is this a known primitive type or a nullable based on a primitive type (including string,byte[],uri)
type to analyze, possibly nullable
true if known primitive type or a nullable based on a primitive type
Delete the type from known type table
The clr type
The edm type name to remove, or null
This is a test clean up hook. MUST NOT BE CALLED FROM PRODUCT CODE.
Register a known type as primitive type
The Clr Type
The Edm Type Name
The Edm Primitive Type Kind
The Type Converter
Whether this mapping should have a reverse mapping from Edm
This method is internal only for testing purposes.
IN PRODUCT MUST BE CALLED ONLY FROM THE STATIC CTOR OF THE PrimitiveType CLASS.
Creates a new instance of the corresponding IEdmPrimitiveType
Returns a new instance of the corresponding IEdmPrimitiveType
Populate the mapping table
MUST NOT BE CALLED FROM PRODUCT CODE OTHER THAN STATIC CTOR OF PrimitiveType class.
Tries to get a well known PrimitiveType for a clr type. Contains logic to handle Binary type.
The clr type to get well known PrimitiveType for.
PrimitiveType for the if exists. Otherwise null.
true if a PrimitiveType for the was found. Otherwise false.
Whether the is System.Data.Linq.Binary.
Type to check.
true if is System.Data.Linq.Binary. Otherwise false.
The Clr Type
The Edm Type Name
A PrimitiveXmlConverter that provides convertion between
instances of this type to its Xml representation and back
This type has a reverse edm type mapping
Some known primitive types have shared edm type mapping
Only one of these shared type can contain a reverse mapping
Gets the types EDM primitive type kind
There is no static dependency on System.Data.Linq where Binary type lives. We
will use this type to Substitute for the missing Binary type.
Represents a definition of an EDM primitive type.
Namespace of the type.
Name of the type.
The kind of primitive.
Creates an instance of the client EDM primitive type.
Namespace of the type.
Name of the type.
Kind fo the primitive type.
Creates a new instance of the IEdmPrimitiveType
Kind of primitive type.
Returns a new instance of the IEdmPrimitiveType
Name of the type.
Namespace of the type.
Kind of the primitive type.
The kind of this schema element.
Kind of this type.
A parser token
Materialize this token using a PrimitiveTypeConverter
The primitive type
A materialized instance
Textual based parser token
Constructor
Textual value
Materialize by calling the Parse method on the converter
clrType
A materialized instance
The text property
Instance based parser token, where the token is the materialized instance
The instance type
Constructor
The instance
Materialize by returning the instance
A primitive type converter
The instance
The instance
Equality comparer implementation that uses reference equality.
Initializes a new instance.
Determines whether two objects are the same.
First object to compare.
Second object to compare.
true if both are the same; false otherwise.
Serves as hashing function for collections.
Object to hash.
Hash code for the object; shouldn't change through the lifetime
of .
Use this class to compare objects by reference in collections such as
dictionary or hashsets.
Type of objects to compare.
Typically accesses statically as eg
ReferenceEqualityComparer<Expression>.Instance.
Single instance per 'T' for comparison.
Initializes a new instance.
Determines whether two objects are the same.
First object to compare.
Second object to compare.
true if both are the same; false otherwise.
Serves as hashing function for collections.
Object to hash.
Hash code for the object; shouldn't change through the lifetime
of .
Returns a singleton instance for this comparer type.
Class which implements the for the GetReadStream operation.
Note that this effectively behaves as a simple wrapper around the IAsyncResult returned
by the underlying HttpWebRequest, although it's implemented fully on our own to get the same
behavior as other IAsyncResult objects returned by the client library.
The web request this class wraps (effectively)
descriptor of the stream which is getting queried.
RequestInfo for this request.
IODataResponseMessage containing all the response information.
Constructs a new async result object
The source of the operation.
Name of the method which is invoked asynchronously.
The object which is wrapped by this async result.
User specified callback for the async operation.
User state for the async callback.
stream descriptor whose value is getting queried.
Begins the async request
Ends the request and creates the response object.
The response object for this request.
Executes the request synchronously.
The response object for this request.
invoked for derived classes to cleanup before callback is invoked
Set the AsyncWait and invoke the user callback.
the request object
This method is not implemented for this class.
Async callback registered with the underlying HttpWebRequest object.
The async result associated with the HttpWebRequest operation.
Holds state (Path, lambda parameter stack, etc) for projection analysis.
This class is used as a marker for an entity projected in its entirety.
The request data service version for the projection and expand paths
Initializes a new instance.
Starts a new path.
Appends the given property and source TypeAs to the projection and expand paths.
Navigation property
The TypeAs type if the source of the member access expression is a TypeAs operation. Null otherwise.
Data service context instance.
Appends a name of a property/link/type to the current projection path.
name of the property/link/type which needs to be added to the select path.
if originally present in the path, replace the entity marker after appending the name
the string builder containing all the select paths.
Appends a name of a property/link/type to the current expand path.
name of the property/link/type which needs to be added to the expand path.
If the path ends with the EntireEntityMarker, remove it from the path.
path
True if the EntireEntityMarker was found.
Adds the EntireEntityMarker to the end of the path
path
The request data service version for the projection and expand paths
Analyzes projection expressions to see if supported.
To be writable, must follow these rules:
1) Must be known Entity Type
2) Must be a true narrowing of the source type. Subset of properties + no transformations other then casts.
To be materializable (read-only), must follow these rules
1) No transient object creation. (Entity and non-Entity types)
2) No referencing of other DataService queries or contexts.
Analyzes a lambda expression to check whether it can be satisfied with
$select and client-side materialization.
Lambda expression.
Resource expression in scope.
Whether member accesses are matched as top-level projections.
Context of expression to analyze.
true if the lambda is a client-side projection; false otherwise.
Checks whether the specified refers
to a sequence method call allowed on entity types.
Method call expression to check.
true if the method call is allowed; false otherwise.
The method won't check whether the call is made on actual entity types.
Checks whether the specified refers
to a Select method call that works on the results of another Select call
Method call expression to check.
Type of the projection
Checks whether the specified expression creates a collection.
Expression to check.
true if given expression is collection producing.
Checks whether the specified expression is allowed in a MethodCall. Expressions that
produce collections are not allowed. The only exception is when collection property
belongs to an entity e.g. c.Orders.Select(o => o), where we allow c.Orders.
Expression to check.
The client model used.
true if expression is disallowed, false otherwise.
Analyzes the specified expression with an entity-projection or
non-entity-projection analyzer.
Expression to analyze.
Path box where select and expand paths are tracked.
Context of expression to analyze.
Analyzes the specified for selection and updates
.
Lambda expression to analyze.
Resource expression to update.
Context of expression to analyze.
Skips converts and returns the underlying expression.
Expression to dig into.
The original expression without converts.
IMPORTANT: This is fine for checks on underlying expressions where we
want converts to be "mostly" transparent, but using the result in
place of the given loses information.
Path-tracking object.
Type being member-init'ed.
This analyzer iterates through the list of member assignments in the MemberInitExpression
and visits each one. This field tracks if the currently visited member assignment is a
MemberAccessExpression, used for determining if a TryAs convert should be emitted when visited.
The associated DataServiceContext instance. DevNote(shank): this is used for determining
the fully-qualified name of types when TryAs converts are processed (C# "as", VB "TryCast").
Ideally the FQN is only required during URI translation, not during analysis. However,
the current code constructs the $select and $expand parts of the URI during analysis. This
could be refactored in the future to defer the $select and $expand URI construction until
the URI translation phase.
Initializes a new instance.
Path-tracking object.
Type being member-init'ed.
Context of expression to analyze.
Analyzes the specified member-init expression.
Expression to analyze.
Path-tracking object to store analysis in.
Context of expression to analyze.
Specific Vistior base class for the DataServiceQueryProvider.
Main visit method.
Expression to visit
Visited expression
ResourceSetExpression visit method.
ResourceSetExpression expression to visit
Visited ResourceSetExpression expression
NavigationPropertySingletonExpressionvisit method.
NavigationPropertySingletonExpression expression to visit
Visited NavigationPropertySingletonExpression expression
Visit an , producing a new InputReferenceExpression
based on the visited form of the that is referenced by
the InputReferenceExpression argument, .
InputReferenceExpression expression to visit
Visited InputReferenceExpression expression
See corresponding comment in EntityProjectionAnalyzer
See corresponding comment in EntityProjectionAnalyzer
Visits a unary expression while initializing a non-entity type structure.
Expression to visit.
The visited expression.
Visits a member access expression in non-entity projections, validating that
it's correct and recording the path visit to include in a projection if necessary.
Expression to visit.
The same expression.
The projection analyzer runs after funcletization, so a member expression
rather than a constant expression implies that this is correlated to
a parameter, by dotting through the argument in valid cases, and possibly
more complex cases in others like new DSC(p.Orders)*.Foo* <- .Foo is invalid.
An resource specific expression representing a projection query option.
An resource specific expression representing a query option.
The CLR type this node will evaluate into.
Creates a QueryOptionExpression expression
the return type of the expression
Composes the expression with this one when it's specified multiple times.
to compose.
The expression that results from composing the expression with this one.
The of the value represented by this .
projection expression to evaluate on client on results from server to materialize type
projection paths to send to the server
Creates a ProjectionQueryOption expression
the return type of the expression
projection expression
Projection paths for the query option
The of the .
expression for the projection
expression for the projection
Represents the components of query.
Query option used in projection queries.
Select query option as it appears at the beginning of a query string.
Select query option as it appears in the middle of a query string.
type
Records the generated-to-source rewrites created.
selector Lambda Expression
HttpMethod to use in the query.
List of parameters for a service operation or a service function.
List of parameters for service action.
Optional field; not all codepaths set this. If true, then a single primitive or complex value is expected.
If false, then a collection of primitives or complex is expected. A null value makes no claim as to what
the return type should be. It follows that a single entry or a feed would always have this value as null.
Version for query
Constructs a container for query components with HttpMethod GET.
URI for the query
Version for the query
Element type for the query
selector Lambda Expression
Records the generated-to-source rewrites created (possibly null).
Constructs a container for query components
URI for the query
Version for the query
Element type for the query
selector Lambda Expression
Records the generated-to-source rewrites created (possibly null).
The HttpMethod to be used in the request.
If true, then a single primitive or complex value is expected. If false, then a collection of primitives or complex
is expected. Should be null when expecting a void response, a single entry, or a feed.
The body operation parameters associated with a service action.
The uri operation parameters associated with a service function or a service operation.
Determines whether or not the specified query string contains the $select query option.
String that may contain $select.
True if the specified string contains the $select query option, otherwise false.
This method is specifically looking for patterns that would indicate we really have the specific query option and not something like $selectNew. It also expects that
any data string being passed to this method has already been escaped, as the things we are looking for specifically contain equals signs that would be escaped if in a data value.
Records the generated-to-source rewrites created.
The projection expression for a query
The last segment type for query
The data service version associated with the uri
The HttpMethod to be used in the query.
List of operation parameters for service operation or a service function.
List of operation parameters for a service action.
Optional field; not all codepaths set this. If true, then a single primitive or complex value is expected.
If false, then a collection of primitives or complex is expected. A null value makes no claim as to what
the return type should be. It follows that a single entry or a feed would always have this value as null.
Gets a value indicating whether the URI for this query has the select query option.
Gets or sets the URI for a query, possibly with query options added to the cached URI.
URI with additional query options added if required.
Static utility class for identifying methods in Queryable, Sequence, and IEnumerable
and
Identifies methods as instances of known sequence operators.
Method info to identify
Identified sequence operator
true if method is known; false otherwise
Check to see if this is an Any or an All method
sequence method to check.
true if sequence method is Any or All, false otherwise.
Requires:
- no collisions on type names
- no output or reference method parameters
Produces a string description of a method consisting of the name and all parameters,
where all generic type parameters have been substituted with number identifiers.
Method to identify.
Canonical description of method (suitable for lookup)
Returns all static methods in the Queryable and Enumerable classes.
Enumeration of known extension methods
Represents a reference to a bound resource set in the resource path.
The type of the input reference is the element type of the set.
Because the type of the input reference is the element type of the set,
it can be used to indicate what a range variable ranges over.
For example, in input.Select(b => b.id), 'input' is an IQueryable of T,
and 'b' is a parameter of type T. 'b' can be rebound as an input reference
to 'input' by the InputBinder, which helps in query analysis and
translation.
The resource or set referred to by this input reference expression
Constructs a new input reference expression that refers to the specified resource set
The target resource set that the new expression will reference
Retargets this input reference to point to the resource set specified by .
The that this input reference should use as its target
The of the value represented by this .
The of the .
Retrieves the resource set referred to by this input reference expression
The counting option for the resource expression
No counting
Translates to the $count segment.
Translates to the $inlinecount=allpages query option
Abstract base class for expressions that support Query Options
Source expression.
Singleton InputReferenceExpression that should be used to indicate a reference to this element of the resource path
The CLR type this node will evaluate into.
expand paths
The count query option for the resource set
custom query options
projection expression
Uri version for the expression and also the expand and projection paths
Creates a Resource expression
the source expression
the return type of the expression
the expand paths
the count option
The custom query options
the projection expression
TypeAs type
version of the Uri from the expand and projection paths
Creates an that refers to this component of the resource path.
The returned expression is guaranteed to be reference-equal (object.ReferenceEquals)
to any other InputReferenceExpression that also refers to this resource path component.
The InputReferenceExpression that refers to this resource path component
Raise the UriVersion if it is lower than .
Uri version from the expand and projection paths
The of the value represented by this .
Resource type for this expression (for sets, this is the element type).
Never null.
The resource type that this expression is explicitly converted to by a TypeAs
expression (i.e., "as" operator in C#, "TryCast" in VB). Null if no conversion.
Uri version from the expand and projection paths
Does this expression produce at most 1 resource?
Expand query option for ResourceSet
Count query option for ResourceSet
custom query options for ResourceSet
Description of the projection on a resource.
This property is set by the ProjectionAnalyzer component (so it
mutates this instance), or by the ResourceBinder when it clones
a ResourceExpression.
Gets the source expression.
performs funcletization on an expression tree
Performs evaluation and replacement of independent sub-trees
The root of the expression tree.
A function that decides whether a given expression node can be part of the local function.
A new tree with sub-trees evaluated and replaced.
Performs evaluation and replacement of independent sub-trees
The root of the expression tree.
A new tree with sub-trees evaluated and replaced.
Evaluates if an expression can be evaluated locally.
the expression.
true/ false if can be evaluated locally
Evaluates and replaces sub-trees when first candidate is reached (top-down)
list of candidates
constructs an expression evaluator with a list of candidates
List of expressions to evaluate
Evaluates an expression sub-tree
The expression to evaluate.
The evaluated expression.
Visit method for visitor
the expression to visit
visited expression
Evaluates expression
the expression to evaluate
constant expression with return value of evaluation
Performs bottom-up analysis to determine which nodes can possibly
be part of an evaluated sub-tree.
func to determine whether expression can be evaluated
candidate expressions for evaluation
flag for when sub tree cannot be evaluated
Creates the Nominator based on the function passed.
A Func speficying whether an expression can be evaluated or not.
visited expression
Nominates an expression to see if it can be evaluated
Expression to check
a list of expression sub trees that can be evaluated
Visit method for walking expression tree bottom up.
root expression to visit
visited expression
Replaces expression patterns produced by the compiler with approximations
used in query translation. For instance, the following VB code:
x = y
becomes the expression
Equal(MethodCallExpression(Microsoft.VisualBasic.CompilerServices.Operators.CompareString(x, y, False), 0)
which is normalized to
Equal(x, y)
Comment convention:
CODE(Lang): _VB or C# coding pattern being simplified_
ORIGINAL: _original LINQ expression_
NORMALIZED: _normalized LINQ expression_
If we encounter a MethodCallExpression, we never need to lift to lift to null. This capability
exists to translate certain patterns in the language. In this case, the user (or compiler)
has explicitly asked for a method invocation (at which point, lifting can no longer occur).
Gets a dictionary mapping from LINQ expressions to matched by those expressions. Used
to identify composite expression patterns.
Records the generated-to-source rewrites created.
Initializes a new instance.
Dictionary in which to store rewrites.
Applies normalization rewrites to the specified
, recording them in the
dictionary.
Expression to normalize.
Dictionary in which to record rewrites.
The normalized expression.
Handle binary patterns:
- VB 'Is' operator
- Compare patterns
CODE: x
ORIGINAL: Convert(x, t) where t is assignable from typeof(x)
ORIGINAL: x as t, where t is assignable from typeof(x)
ORIGINAL: and typeof(x) or t are not known primitives unless typeof(x) == t
ORIGINAL: and x is not a collection of entity types
NORMALIZED: x
CODE: x
ORIGINAL: Convert(x, typeof(object))
ORIGINAL(Funcletized): Constant(x, typeof(object))
NORMALIZED: x
Returns true if the given expression is a constant '0'.
Handles MethodCall patterns:
- Operator overloads
- VB operators
Handles MethodCall patterns (without recording rewrites):
- Operator overloads
- VB operators
Remove extra Converts from the source of Any/All/OfType methods
Identifies and normalizes any predicate argument in the given call expression. If no changes
are needed, returns the existing expression. Otherwise, returns a new call expression
with a normalized predicate argument.
Determines whether the given call expression has a 'predicate' argument (e.g. Where(source, predicate))
and returns the ordinal for the predicate.
Obviously this method will need to be replaced if we ever encounter a method with multiple predicates.
Determines whether the given expression of the form Lambda(Coalesce(left, Constant(false)), ...), a pattern
introduced by the VB compiler for predicate arguments. Returns the 'normalized' version of the expression
Lambda((bool)left, ...)
Identifies and normalizes a Select method call expression of the following form:
Select(x => Convert(x))
If a match is found, it is translated into a Cast() call.
This supports type casting in queries like the following:
from DerivedType entity in context.Entities
select entity
Where DerivedType is derived from the type of context.Entities.
The pattern also applies to SelectMany calls with the same structure as above.
In C#, the type cast above is represented as a Cast call and the ResourceBinder knows how to handle that.
In VB, the same query is translated into Select(x => Convert(x)) instead of Cast, and the ResourceBinder
doesn't recognize that pattern. This normalization allows the two queries to be treated the same.
MethodCallExpression to potentially normalize.
If the query pattern was found, a Cast call is returned with the same source as the original Select and
a cast type that is the same as the original Convert expression.
If no normalization is required, the original MethodCallExpression is returned without changes.
Looks for a method call expression of the form
Select(entity => Convert(entity, DerivedType))
If found, returns DerivedType.
Expression to check for pattern match.
If the match was found, this is the type used in the Convert, otherwise null.
True if the expression matches the desired pattern, otherwise false.
Looks for a lambda expression of the form
related => Convert(related, DerivedType)
Returns DerivedType if a match was found.
Expression to check for pattern match.
If the matches the pattern, this is the type of the found Convert call, otherwise null.
True if the expression matches the desired pattern, otherwise false.
This method exists solely to support creation of valid relational operator LINQ expressions that are not natively supported
by the CLR (e.g. String > String). This method must not be invoked.
Create an operator relating 'left' and 'right' given a relational operator.
Try to create an operator relating 'left' and 'right' using the given operator. If the given operator
does not define a known relation, returns false.
CODE(C#): Class.Compare(left, right)
ORIGINAL: MethodCallExpression(Compare, left, right)
NORMALIZED: Condition(Equal(left, right), 0, Condition(left > right, 1, -1))
Why is this an improvement? We know how to evaluate Condition in the store, but we don't
know how to evaluate MethodCallExpression... Where the CompareTo appears within a larger expression,
e.g. left.CompareTo(right) > 0, we can further simplify to left > right (we register the "ComparePattern"
to make this possible).
Records a rewritten expression as necessary.
Original source expression.
Rewritten expression.
IMPORTANT: if there are higher-level rewrites such as replacing parameter
references, the lower-level rewrites will become un-doable in other
contexts; we will have to change normalization/de-normalization strategy,
record additional mapping information and/or bubble up the rewrite
tracking.
Records the generated-to-source rewrites created.
Encapsulates an expression matching some pattern.
Gets pattern kind.
Gets pattern kind.
Matches expression of the form x.CompareTo(y) or Class.CompareTo(x, y)
Gets left-hand argument to Compare operation.
Gets right-hand argument to Compare operation.
An resource specific expression representing a filter query option.
The individual expressions that makes the filter predicate
Creates a FilterQueryOptionExpression expression
the return type of the expression
Adds the conjuncts to individualExpressions
The predicates.
Gets the query option value.
A predicate with all Conjuncts AND'ed
The of the .
Gets the list of individual conjucts which are separated by AND for the predicate
i.e. if the filter statement is id1=1 and id2="foo" and id3=datetime'31'
then this list will have 3 entries, id1=1, id2="foo" and id3=datetime'xxxxxxxxx'
Replaces references to resource sets - represented as either ParameterExpressions or one or more
MemberExpressions over a ParameterExpression - with an appropriate InputReferenceExpression that
indicates which resource set is referenced; effective 'binds' the argument expression to the
resource sets that it references.
Tracks which resource sets are referenced by the argument expression
Resource from which valid references must start; if no set with a transparent scope is present, only direct references to this resource will be rebound
The input resource, as a resource set (may be null if the input is actually a NavigationPropertySingletonExpression)
The ParameterExpression that, if encountered, indicates a reference to the input resource set
Constructs a new InputBinder based on the specified input resource set, which is represented by the specified ParameterExpression.
The current input resource from which valid references must start
The parameter that must be referenced in order to refer to the specified input resource set
Replaces Lambda parameter references or transparent scope property accesses over those Lambda
parameter references with s to the appropriate corresponding
s, based on the 'input' ResourceSetExpression to which the
Lambda is logically applied and any enclosing transparent scope applied to that input resource set.
The expression to rebind
The 'current input' resource set - either the root resource set or the
rightmost set in the navigation chain.
The Lambda parameter that represents a reference to the 'input' set
A list that will be populated with the resource sets that were referenced by the rebound expression
The rebound version of where MemberExpression/ParameterExpressions that
represent resource set references have been replaced with appropriate InputReferenceExpressions.
Resolves member accesses that represent transparent scope property accesses to the corresponding resource set,
iff the input resource set is enclosed in a transparent scope and the specified MemberExpression represents
such a property access.
MemberExpression expression to visit
An InputReferenceExpression if the member access represents a transparent scope property
access that can be resolved to a resource set in the path that produces the input resource set;
otherwise the same MemberExpression is returned.
Converts a parameter reference to the input resource set into an InputReferenceExpression,
iff the parameter reference is to the parameter expression that represents the input resource set
and the input resource set is not enclosed in a transparent scope.
The parameter reference expression
An InputReferenceExpression if the parameter reference is to the input parameter;
otherwise the same parameter reference expression
Returns an that references the specified resource set,
and also adds the the resource set to the hashset of resource sets that were referenced by the
expression that is being rebound.
The resource(set) for which a reference was found
An InputReferenceExpression that represents a reference to the specified resource set
An resource specific expression representing a OrderBy query option.
selectors for OrderBy query option
Creates a OrderByQueryOptionExpression expression
the return type of the expression
selectors for orderby expression
The of the .
Selectors for OrderBy expression
Structure for selectors. Holds lambda expression + flag indicating desc.
lambda expression for selector
flag indicating if descending
Creates a Selector
lambda expression for selector
flag indicating if descending
This class provides a Bind method that analyzes an input and returns a bound tree.
The associated DataServiceContext instance. DevNote(shank): this is used for determining
the fully-qualified name of types when TypeAs converts are processed (C# "as", VB "TryCast").
Ideally the FQN is only required during URI translation, not during analysis. However,
the current code constructs the $select and $expand parts of the URI during analysis. This
could be refactored in the future to defer the $select and $expand URI construction until
the URI translation phase.
Analyzes and binds the specified expression.
Expression to bind.
The context of the expression used for bind.
The expression with bound nodes (annotated expressions used by
the Expression-to-URI translator).
Checks whether the specified is
missing necessary key predicates.
Expression to check.
true if the expression is a navigation expression and doesn't
have the necessary key predicates on the associated resource
expression; false otherwise.
Verifies that all key predicates are assigned to the specified expression.
Expression to verify.
Verifies that the specified is not a projection based on SelectMany.
Expression to check.
Analyzes a predicate (Where clause).
for a Where call.
The model.
An equivalent expression to , possibly a different one with additional annotations.
Validates neither operands of the binary expression filter ends with TypeAs
filter expression
method name where this filter is passed to
Given a list of predicates, extracts key values for the specified .
Target set.
Candidate predicates.
Returns list of non-key predicates.
List of key predicates if found, otherwise null
Adds all AND'ed expressions to the specified list.
Expression to recursively add conjuncts from.
Target list of conjucts.
Analyzes the specified call to see whether it is recognized as a
projection that is satisfied with $select usage.
Call expression to analyze.
Kind of sequence method to analyze.
Resulting expression.
true if is a projection that can be satisfied with $select; false otherwise.
Analyzes the specified method call as a WCF Data
Services navigation operation.
Expression to analyze.
Data service context instance
An expression that represents the potential navigation.
Analyzes a .Select or .SelectMany method call to determine
whether it's allowed, to identify transparent identifiers
in appropriate .SelectMany() cases, returning the method
call or a resource set expression.
Expression to analyze.
Data service context instance
, or a new resource set expression for
the target resource in the method call for navigation properties.
Analyzes the nav prop reference for a SelectMany method call
building the appropriate ResourceSetExpression if one can be
created.
Input resource expression to the collector
The navigation property reference to analyze
Data service context instance
The resource set expression
true if succesful, else false
Analyzes a SelectMany method call that ranges over a resource set and
returns the same method or the annotated resource set.
SelectMany method to analyze.
Source resource set for SelectMany result.
Context of expression to analyze.
The visited expression.
The expression represents the
navigation produced by the collector of the SelectMany() method call.
Ensures that there's a limit on the cardinality of a query.
for the method to limit First/Single(OrDefault).
Maximum cardinality to allow.
An expression that limits to no more than elements.
This method is used by .First(OrDefault) and .Single(OrDefault) to limit cardinality.
Analyzes the OfType method call
The OfType method call expression
The MaxProtocolVersion of the client
, or a resource set expression with ResourceTypeAs set.
Analyzes Any and All method calls
Any/All method call expression
The MaxProtocolVersion of the client
, resource set or a collection property expression.
Creates a new resource set as produced by a navigation.
The type of the expression as it appears in the tree (possibly
with transparent scopes).
The source of the set.
The member access on that yields the set.
The resource type on the set.
A new instance.
Creates a new resource singleton as produced by a navigation.
The type of the expression as it appears in the tree (possibly
with transparent scopes).
The source of the singleton.
The member access on that yields the singleton.
A new instance.
Produces a new that is a clone of in all respects,
other than its result type - which will be - and its transparent scope,
which will be null. This is a shallow clone operation - sequence query options, key predicate, etc are
not cloned, but are reassigned to the new instance. The resource expression should be
discarded after being used with this method.
The result type - - that the new resource set expression should have.
The resource set expression from which the transparent scope is being removed
A new resource set expression without an enclosing transparent scope and with the specified result type.
Returns the specified expression, stripping redundant converts.
Expression to return.
e, or the underlying expression for redundant converts.
Strips the specifed of intermediate
expression (unnecessary converts and quotes) and returns
the underlying expression of type T (or null if it's not of that type).
Type of expression to return.
Expression to consider.
The underlying expression for .
Strips the specifed of intermediate unnecessary converts
and quotes, and returns the underlying expression of type T (or null if it's not of that type).
Type of expression to return.
Expression to consider.
The converted type for typeAs expressions.
The underlying expression for .
Strips calls to .Cast() methods, returning the underlying expression.
Expression to strip calls from.
The underlying expression.
Note that this method drops information about what the casts were,
and is only supported for collector selectors in SelectMany() calls,
to enable scenarios such as from t in ctx.Tables from Customer c in t.Items...
Convenience property: model.
Use this class to perform pattern-matching over expression trees.
Following these guidelines simplifies usage:
- Return true/false for matches, and interesting matched information in out parameters.
- If one of the inputs to be matched undergoes "skipping" for unnecesary converts,
return the same member as an out parameter. This forces callers to be aware that
they should use the more precise representation for computation (without having
to rely on a normalization step).
Checks whether the is a convert that
always succeeds because it converts to the same target type or a
base type.
Expression to match.
true if is a convert to same or base type; false otherwise.
Checks whether is a lambda of the
form (p) => p.member[.member]* (possibly quoted).
Expression to match.
true if the expression is a match; false otherwise.
This method strip .Call methods because it's currently used only
to supporte .SelectMany() collector selectors. If this method
is reused for other purposes, this behavior should be made
conditional or factored out.
Checks whether the specified expression is a path of member
access expressions.
Expression to match.
Data service context instance
Expression equivalent to , without unnecessary converts.
Expression from which the path starts.
Path of member names from .
Uri version.
true if there is at least one property in the path; false otherwise.
Checks whether the specified member expression refers to a member
that is a non-private property (readable and with getter and/or setter).
Expression to check.
Non-null property info when result is true.
The property access target.
Whether the member refers to a non-private, readable property.
Checks whether the specified is a member access to a key.
Expression to check.
If this is a key access, the property for the key.
true if is a member access to a key; false otherwise.
Checks whether the specified matches
a call to System.Object.ReferenceEquals.
Expression to check.
true if the expression matches; false otherwise.
Checks whether the specifed refers to a resource.
Expression to check.
Resource expression if successful.
true if the expression is a resource expression; false otherwise.
Checks whether the specified expression is a lambda with a two parameters
(possibly quoted).
Expression to match.
If the expression matches, the lambda with the two parameters.
true if the expression is a lambda with two parameters.
Checks whether the specified is a selector
of the form (p) => p.
Expression to check.
true if the lambda is an identity selector; false otherwise.
Checks whether the specified expression is a lambda with a single parameter
(possibly quoted).
Expression to match.
If the expression matches, the lambda with the single parameter.
true if the expression is a lambda with a single argument.
Checked whether the specified has the
form [input's transparent scope].[accessor].
Input expression (source) for the selector.
Selector lambda.
Data service context
true if the selector's body looks like [input's transparent scope].[accesor].
Checks wheter the specified lambda matches a selector that yields
a transparent identifier.
The input expression for the lambda, used to set up the
references from the transparent scope if one is produced.
Lambda expression to match.
After invocation, information on the accessors if the result
is true; null otherwise.
true if is a selector for a transparent
identifier; false otherwise.
Note that C# and VB.NET have different patterns for accumulating
parameters.
C# uses a two-member anonymous type with "everything so far"
plus the newly introduced range variable.
VB.NET uses an n-member anonymous type by pulling range variables
from a previous anonymous type (or the first range variable),
plus the newly introduced range variable.
For additional background, see:
Transparent Identifiers - http://blogs.msdn.com/wesdyer/archive/2006/12/22/transparent-identifiers.aspx
http://msdn.microsoft.com/en-us/library/bb308966.aspx
In particular:
- 26.7.1.4 From, let, where, join and orderby clauses
- 26.7.1.7 Transparent identifiers
is the expression that represents the
navigation resulting from the collector selector in the
SelectMany() call under analysis.
Checks whether the specified is a member access
that references .
Expression to check.
InputReferenceExpression to consider as source.
Data service context instance.
Navigation member, equivalent to without unnecessary casts.
true if is a property collection that originates in
; false otherwise.
Checks whether the specified is a member access
that references .
Expression to check.
InputReferenceExpression to consider as source.
Data service context instance
Member expression, equivalent to without unnecessary casts.
true if is a scalar property or singleton navigation property that originates in
; false otherwise.
Checks whether the specified is a member access with the specified cardinality (per )
that references .
Expression to check.
InputReferenceExpression to consider as source.
Whether the match should be for a set of related entities or a singleton property.
Singleton properties can be scalar types (including collection and other enumerable types like byte[]), complex types, or singleton navigation properties.
Related set properties are only navigation properties.
Data service context instance.
Member expression for accessing the property, equivalent to without unnecessary casts.
true if is a property that originates in
and is the expected cardinality (per ); false otherwise.
Checks whether is a logical negation
expression.
Expression to check.
true if expression is a Not expression; false otherwise.
Checks whether the type of the specified expression could represent a set of related resources.
Expression to check.
The model that the client uses.
true if the type of the expression could represent a set of related resources; false otherwise.
Checks whether is a conditional expression
that checks whether a navigation property (reference or collection) is
null before proceeding.
Entity in scope to be checked.
Expression to check.
Check results.
Checks whether the specified is a null constant.
Expression to check.
true if is a constant null value; false otherwise.
Checks whether is a "new DataServiceCollection of T".
The expression to match
true if the expression matches the "new DataServiceCollection of T" or false otherwise.
Checks whether is a "new ICollection of T".
The expression to match
Checks whether is a check for
equality on two expressions.
Expression to match.
A structure describing whether the expression is a match,
whether it yields true on equality (ie, '==' as opposed to '!='),
and the compared expressions.
This pattern recognizes the following:
- Calls to object.ReferenceEquals
- Equality checks (ExpressionNodeType.Equals and ExpressionNodeType.NotEquals)
- Negation (ExpressionNodeType.Not)
Checks whether the expression is a
simple access (standalone or member-access'ed) on one of the
parameter .
Argument to match.
Candidate parameters.
true if the argument is a parmater or a member from a
parameter; false otherwise.
Checks whether the specified expression is a lambda with a parameterCount parameters
(possibly quoted).
Expression to match.
Expected number of parametrs.
If the expression matches, the lambda with the two parameters.
true if the expression is a lambda with parameterCount parameters.
Use this class to represent the results of a match on an expression
that does a null check before accessing a property.
Expression used to assign a value when the reference is not null.
Whether the expression analyzed matches a null check pattern.
Expression being checked againt null.
Use this class to represent the results of a match on an expression
that checks for equality .
Whether a positive equality yields 'true' (ie, is this '==' as opposed to '!=').
Whether the expression analyzed matches an equality check pattern.
The left-hand side of the check.
The right-hand side of the check.
Throws the NotSupportedException for the $format query option.
Detect and disallow member access for certain known types, in 'where' requests.
Detect and disallow member access for certain known types, in 'orderby' requests.
Used to identify and block navigation to members of collection property in select statement.
e.g. from c in ctx.Customers select c.CollectionProperty.member
We do not support type identifier at the end of a path.
For example, these would throw:
select p as Employee
select p.BestFriend as Employee
Expand(p => p.BestFriend as Employee)
expression passed to validate
The context of where is applied
Checks whether the specified is a valid expand path.
The lambda expression for the expand path
Data service context instance.
Expand path
Uri version
Detect and disallow member access for certain known types, in 'where' and 'orderby' requests.
Equality and comparison implementation for PropertyInfo.
private constructor for the singleton pattern
Static property which returns the single instance of the EqualityComparer
Checks whether the given property info's refers to the same property or not.
first property info
second property info
true if they refer to the same property, otherwise returns false.
Computes the hashcode for the given property info
property info whose hash code needs to be computed.
the hashcode for the given property info.
Use this visitor to detect whether an Expression is found in an
Expression tree.
Target expression being sought.
Whether the target has been found.
Initializes a new that
searches for the given .
Target expression to look for.
Checks whether the specified can
be found in the given .
Expression sought.
Expression tree to look into.
true if target is found at least once; false otherwise.
Visits the specified expression.
Expression to visit.
The visited expression ().
Enum for resource expression types
ResourceSet Expression
Resource Navigation Expression
Resource Navigation Expression to Singleton
Take Query Option Expression
Skip Query Option Expression
OrderBy Query Option Expression
Filter Query Option Expression
Reference to a bound component of the resource set path
Projection Query Option Expression
Expand Query Option Expression
Expression for a navigation property into a single entity (eg: Customer.BestFriend).
property member name
resource type
Creates a NavigationPropertySingletonExpression expression
the return type of the expression
the source expression
property member name
resource type for expression
expand paths for resource set
count option for the resource set
custom query options for resourcse set
projection expression
target expression type for a TypeAs conversion
version of the Uri from the expand and projection paths
Cast changes the type of the ResourceExpression
new type
new NavigationPropertySingletonExpression
The of the .
Gets the member expression.
The resource type of the singe instance produced by this singleton navigation.
Singleton navigation properties always produce at most 1 result
Does Singleton navigation have query options.
ResourceSet Expression
The (static) type of the resources in this resource set.
The resource type can differ from this.Type if this expression represents a transparent scope.
For example, in TransparentScope{Category, Product}, the true element type is Product.
property member name
key predicate
sequence query options
enclosing transparent scope
Key Predicate conjuncts that will make a key predicate
Creates a ResourceSet expression
the return type of the expression
the source expression
property member name
the element type of the resource set
expand paths for resource set
count query option for the resource set
custom query options for resourcse set
the projection expression
TypeAs type
version of the Uri from the expand and projection paths
Cast ResourceSetExpression to new type
Cast ResourceSetExpression to new type without affecting member type
Converts the key expression to filter expression
Adds a filter to this ResourceSetExpression.
If filter is already presents, adds the predicateConjunts to the
PredicateConjucts of the filter
Add query option to resource expression
Removes the filter expression from current resource set.
This happens when a separate Where clause is specified in a LINQ
expression for every key property.
Instructs this resource set expression to use the input reference expression from as it's
own input reference, and to retarget the input reference from to this resource set expression.
The resource set expression from which to take the input reference.
Used exclusively by .
Sets key predicate from given values
Gets the key properties from KeyPredicateConjuncts
Creates a clone of the current ResourceSetExpression with the specified expression and resource types
The new expression type
The new resource type
A copy of this with the new types
The of the .
Member for ResourceSet
Type of resources contained in this ResourceSet - it's element type.
Is this ResourceSet enclosed in an anonymously-typed transparent scope produced by a SelectMany operation?
Applies to navigation ResourceSets.
The property accesses required to reference this ResourceSet and its source ResourceSet if a transparent scope is present.
May be null. Use to test for the presence of a value.
Has a key predicate restriction been applied to this ResourceSet?
The list of key expressions that comprise the key predicate (if any) applied to this ResourceSet.
A resource set produces at most 1 result if constrained by a key predicate
Have sequence query options (filter, orderby, skip, take), expand paths, projection
or custom query options been applied to this resource set?
If this expresssion contains at least one non-key predicate
This indicates that a filter should be used
Filter query option for ResourceSet
OrderBy query option for ResourceSet
Skip query option for ResourceSet
Take query option for ResourceSet
Gets sequence query options for ResourceSet
Whether there are any query options for the sequence.
Represents the property accesses required to access both
this resource set and its source resource/set (for navigations).
These accesses are required to reference resource sets enclosed
in transparent scopes introduced by use of SelectMany.
For example, this query:
from c in Custs where c.id == 1
from o in c.Orders from od in o.OrderDetails select od
Translates to:
c.Where(c => c.id == 1)
.SelectMany(c => o, (c, o) => new $(c=c, o=o))
.SelectMany($ => $.o, ($, od) => od)
PatternRules.MatchPropertyProjectionSet identifies Orders as the target of the collector.
PatternRules.MatchTransparentScopeSelector identifies the introduction of a transparent identifer.
A transparent accessor is associated with Orders, with 'c' being the source accesor,
and 'o' being the (introduced) accessor.
The property reference that must be applied to reference this resource set
The property reference that must be applied to reference the source resource set.
Note that this set's Accessor is NOT required to access the source set, but the
source set MAY impose it's own Transparent Accessors
Constructs a new transparent scope with the specified set and source set accessors
The name of the property required to access the resource set
The names of the property required to access the resource set's sources.
Provides a string representation of this accessor.
The text represntation of this accessor.
An resource specific expression representing a skip query option.
amount to skip
Creates a SkipQueryOption expression
the return type of the expression
the query option value
Composes the expression with this one when it's specified multiple times.
to compose.
The expression that results from composing the expression with this one.
The of the .
query option value
An resource specific expression representing a take query option.
amount to skip
Creates a TakeQueryOption expression
the return type of the expression
the query option value
Composes the expression with this one when it's specified multiple times.
to compose.
The expression that results from composing the expression with this one.
The of the .
query option value
Utility functions for processing Expression trees
VB Assembly name
VB Assembly public key token
Method map for methods in URI query options
VB Method map for methods in URI query options
Properties that should be represented as methods
Cache used to store element type (TElement) for key Type if key Type implements IEnumerable{TElement} or
null if the key Type does not implement IEnumerable{T} e.g.:
List{Entity} - Entity
Entity - null
Initializes method map
Sees if method has URI equivalent
The method info
uri method name
true/ false
Sees if property can be represented as method for translation to URI
The property info
get method for property
true/ false
Gets the elementtype for a sequence
The sequence type
The element type
Determines whether a property is private
The PropertyInfo structure for the property
true/ false if property is private
Finds type that implements IEnumerable so can get element type
The Type to check
returns the type which implements IEnumerable
Finds whether a non-primitive implements IEnumerable and returns element type if it does.
Type to check.
Type of the element if the implements IEnumerable{T}. Otherwise null.
Checks if the given assembly is the VisualBasic assembly.
assembly to check.
true if the assembly is Microsoft.VisualBasic, otherwise returns false.root
utility class for helping construct uris
forwardslash character
leftparan character
rightparan character
questionmark character
ampersand character
equals character
at sign
dollar sign character
space
comma
colon
single quote
asterisk
top
skip
orderby
where
desc
expand
inlinecount
select
The $format query option.
allpages
value
and
or
eq
ne
lt
le
gt
ge
add
sub
mul
div
mod
negate
not
null
isof
cast
Gets the type name to be used in the URI for the given .
Type to get name for.
Data context used to generate type names for types.
The name for the , suitable for including in a URI.
Gets the type name to be used in the URI for the given .
Type to get name for.
Data context used to generate type names for types.
Data service version for the uri
The name for the , suitable for including in a URI.
Appends a type segment to the which is building up a URI from a query.
The string builder.
The type for the segment.
The data service context.
Whether or not the type segment is being appended within the path (as opposed to within a $filter or $orderby expression).
The current version.
Special visitor to serialize supported expression as query parameters
in the generated URI.
Internal buffer.
Data context used to generate type names for types.
Stack of expressions being visited.
Whether or not the expression being written is part of the path of the URI.
set if can't translate expression
Parent expression of the current expression (expression.Peek()); possibly null.
the request data service version for the uri
number of sub scopes (any/all calls) on stack
Creates an ExpressionWriter for the specified .
Data context used to generate type names for types.
Whether or not the expression being written is part of the path of the URI.
Serializes an expression to a string
Data context used to generate type names for types.
Expression to serialize
Whether or not the expression being written is part of the path of the URI.
the request data service version for the uri
serialized expression
Main visit method.
Expression to visit
Visited expression
ConditionalExpression visit method
The ConditionalExpression expression to visit
The visited ConditionalExpression expression
LambdaExpression visit method
The LambdaExpression to visit
The visited LambdaExpression
NewExpression visit method
The NewExpression to visit
The visited NewExpression
MemberInitExpression visit method
The MemberInitExpression to visit
The visited MemberInitExpression
ListInitExpression visit method
The ListInitExpression to visit
The visited ListInitExpression
NewArrayExpression visit method
The NewArrayExpression to visit
The visited NewArrayExpression
InvocationExpression visit method
The InvocationExpression to visit
The visited InvocationExpression
Input resource set references are intentionally omitted from the URL string for the top level
refences to input parameter (i.e. outside of any/all methods).
For parameter references to input (range variable for Where) inside any/all methods we write "$it".
The input reference
The same input reference expression
MethodCallExpression visit method
The MethodCallExpression expression to visit
The visited MethodCallExpression expression
Serializes an MemberExpression to a string
Expression to serialize
MemberExpression
ConstantExpression visit method
The ConstantExpression expression to visit
The visited ConstantExpression expression
Serializes an UnaryExpression to a string
Expression to serialize
UnaryExpression
Serializes an BinaryExpression to a string
BinaryExpression to serialize
serialized expression
Serializes an TypeBinaryExpression to a string
TypeBinaryExpression to serialize
serialized expression
ParameterExpression visit method.
The ParameterExpression expression to visit
The visited ParameterExpression expression
Indicates if two expression types are collapsible, e.g., ((a or b) or c) can be collapsed to (a or b or c).
The expression type
The expression type of the parent expression
Indicates if the expression is to the left or the right of the parent expression
True if the two expression types are collapsible, false otherwise
Returns the precedence of a binary operator for comparison purposes, or -1 if not applicable.
The ExpressionType representing the binary operator
The precedence of a binary operator for comparison purposes, or -1 if not applicable
Visits operands for Binary and Unary expressions.
Will only output parens if operand is complex expression,
this is so don't have unecessary parens in URI.
The operand expression to visit
Visits operands for Binary and Unary expressions.
Will only output parens if operand is complex expression,
this is so don't have unecessary parens in URI.
The operand expression to visit
The node type of the parent expression (if applicable)
Indicates if the expression is to the left or the right of the parent expression
Serializes an expression to a string
Expression to serialize
serialized expression
The references to parameter for the main predicate (.Where()) is implicit outside any/all methods.
The expression to test
true if the expression represents a reference to the current (resource set) input and it is not in any/all method; otherwise false.
Whether inside any/all lambda or not
An enumeration indicating the direction of a child operand
The operand is the left child
The operand is the right child
Translates resource bound expression trees into URIs.
Data context used to generate type names for types.
stringbuilder for constructed URI
the request data service version for the uri
the leaf resourceset for the URI being written
For caching query options to be grouped
Private constructor for creating UriWriter
Data context used to generate type names for types.
Translates resource bound expression tree to a URI.
Data context used to generate type names for types.
flag to indicate whether generated URI should include () if leaf is ResourceSet
The expression to translate
uri
version for query
MethodCallExpression visit method
The MethodCallExpression expression to visit
The visited MethodCallExpression expression
UnaryExpression visit method
The UnaryExpression expression to visit
The visited UnaryExpression expression
BinaryExpression visit method
The BinaryExpression expression to visit
The visited BinaryExpression expression
ConstantExpression visit method
The ConstantExpression expression to visit
The visited ConstantExpression expression
TypeBinaryExpression visit method
The TypeBinaryExpression expression to visit
The visited TypeBinaryExpression expression
ConditionalExpression visit method
The ConditionalExpression expression to visit
The visited ConditionalExpression expression
ParameterExpression visit method
The ParameterExpression expression to visit
The visited ParameterExpression expression
MemberExpression visit method
The MemberExpression expression to visit
The visited MemberExpression expression
LambdaExpression visit method
The LambdaExpression to visit
The visited LambdaExpression
NewExpression visit method
The NewExpression to visit
The visited NewExpression
MemberInitExpression visit method
The MemberInitExpression to visit
The visited MemberInitExpression
ListInitExpression visit method
The ListInitExpression to visit
The visited ListInitExpression
NewArrayExpression visit method
The NewArrayExpression to visit
The visited NewArrayExpression
InvocationExpression visit method
The InvocationExpression to visit
The visited InvocationExpression
NavigationPropertySingletonExpression visit method.
NavigationPropertySingletonExpression expression to visit
Visited NavigationPropertySingletonExpression expression
ResourceSetExpression visit method.
ResourceSetExpression expression to visit
Visited ResourceSetExpression expression
Visit Query options for Resource
Resource Expression with query options
SkipQueryOptionExpression visit method.
SkipQueryOptionExpression expression to visit
TakeQueryOptionExpression visit method.
TakeQueryOptionExpression expression to visit
FilterQueryOptionExpression visit method.
FilterQueryOptionExpression expression to visit
OrderByQueryOptionExpression visit method.
OrderByQueryOptionExpression expression to visit
VisitExpandOptions visit method.
Expand Paths
ProjectionPaths visit method.
Projection Paths
VisitCountOptions visit method.
VisitCustomQueryOptions visit method.
Custom query options
Caches query option to be grouped
The key.
The value
Append all cached query options to uri.
Serializes an expression to a string.
Expression to serialize
Whether or not the expression being written is part of the path of the URI.
The serialized expression.
QueryProvider implementation
DataServiceContext for query provider
Constructs a query provider based on the context passed in
The context for the query provider
Factory method for creating DataServiceOrderedQuery based on expression
The expression for the new query
new DataServiceQuery
Factory method for creating DataServiceOrderedQuery based on expression
generic type
The expression for the new query
new DataServiceQuery
Creates and executes a DataServiceQuery based on the passed in expression
The expression for the new query
the results
Creates and executes a DataServiceQuery based on the passed in expression
generic type
The expression for the new query
the results
Creates and executes a DataServiceQuery based on the passed in expression which results a single value
generic type
The expression for the new query
single valued results
Builds the Uri for the expression passed in.
The expression to translate into a Uri
Query components
a set, collection of unordered, distinct objects, implemented as an array
element type
item array of T
count of elements in the items array
number of Add and RemoveAt operations
array set with an intial capacity
initial capacity
add new element to the set
element to add
equality comparison function to avoid duplicates
true if actually added, false if a duplicate was discovered
is the element contained within the set
item to find
comparer
true if the element is contained
enumerator
enumerator
enumerator
enumerator
Find the current index of element within the set
item to find
comparision function
index of the item else (-1)
Find the current index of element within the set
selected type
item to find
selector for item to compare
item to compare
index of the item else (-1)
Remove the matched item from within the set
item to find within the set
comparer to find item to remove
the item that was actually contained else its default
Remove an item at a specific index from within the set
index of item to remove within the set
Sort array based on selected value out of item being stored
selected type
selector
comparer
Sets the capacity to the actual number of elements in the ArraySet.
identity selector, returns self
input
output
count of elements in the set
get an item from an index in the set
index to access
Compare selected value out of t
comparison type
Select something out of T
Comparer of selected value
Compare
x
y
int
Use this class to keep a log of changes done by the materializer.
The merge option.
The client edm model.
The entity tracker.
Dictionary of identity URI to instances created during previous AppendOnly moves.
Dictionary of identity URI to tracked entities.
List of link descriptors (data for links and state).
Target instance to refresh.
Initializes a new instance.
The merge option for the log.
The model for the log.
The entity tracker for the log.
Note that the merge option can't be changed.
This method is used to merge all the metadata that come in the response payload.
entityDescriptor that is getting tracked by the client
entityDescriptor that is returned by the materializer
if true, we will need to merge all entity descriptor info, otherwise not.
merge option depending on which etag information needs to be merged.
Applies all accumulated changes to the associated data context.
The log should be cleared after this method successfully executed.
Clears all state in the log.
Invoke this method to notify the log that an existing
instance was found while resolving an object.
Entry for instance.
Invoke this method to notify the log that the
target instance of a "directed" update was found.
Entry found.
The target instance is typically the object that we
expect will get refreshed by the response from a POST
method.
For example if a create a Customer and POST it to
a service, the response of the POST will return the
re-serialized instance, with (important!) server generated
values and URIs.
Attempts to resolve an entry from those tracked in the log.
Entry to resolve.
After invocation, an existing entry with the same identity as
; possibly null.
true if an existing entry was found; false otherwise.
Invoke this method to notify the log that a new link was
added to a collection.
Instance with the collection to which
was added.
Property name for collection.
Object which was added.
Invoke this method to notify the log that a new instance
was created.
Entry for the created instance.
Invoke this method to notify the log that a link was removed
from a collection.
Instance with the collection from which
was removed.
Property name for collection.
Object which was removed.
Invoke this method to notify the log that a link was set on
a property.
Entry for source object.
Name of property set.
Target object.
Returns true the specified entry represents an entity.
The materializer entry
True if the entry represents an entity.
Returns true the specified entry represents an entity.
The resolved instance
The client model.
True if the entry represents an entity.
Whether changes are being tracked.
Type of property stored in BindingPropertyInfo.
Property type is a complex type.
Property type is an entity type with keys.
Property is a DataServiceCollection.
Property is a collection of primitives or complex types.
Cache of information about entity types and their observable properties
Object reference used as a 'False' flag.
Object reference used as a 'True' flag.
Lock on metadata caches.
Types which are known not to be entity types.
Types which are known to be (or not) collection types.
Mapping between types and their corresponding entity information
Obtain binding info corresponding to a given type
Type for which to obtain information
the client model.
Info about the
Gets the ClientType corresponding to the given type
Input type
The client model.
Corresponding ClientType
Get the entity set name for the target entity object.
An entity object.
The 'currently known' entity set name for the target object.
The client model.
The entity set name for the target object.
Allow user code to provide the entity set name. If user code does not provide the entity set name, then
this method will get the entity set name from the value of the EntitySetAttribute.
The 'currently known' entity set name for top level collections can be provided through OEC constructor
Determine if the specified type is an DataServiceCollection.
If there a generic class in the inheritance hierarchy of the type, that has a single
entity type paramenter T, and is assignable to DataServiceCollection(Of T), then
the type is an DataServiceCollection.
An object type specifier.
The client model.
true if the type is an DataServiceCollection; otherwise false.
Determine if the specified type is an entity type.
An object type specifier.
The client model.
true if the type is an entity type; otherwise false.
Tries to get the value of a property and corresponding BindingPropertyInfo or ClientPropertyAnnotation if the property exists
Source object whose property needs to be read
Name of the source object property
The client model.
BindingPropertyInfo corresponding to
Instance of ClientProperty corresponding to
Value of the property
true if the property exists and the value was read; otherwise false.
Obtain binding info corresponding to a given type
Type for which to obtain information
The client model.
Info about the
Checks whether a given type can be a complex type i.e. implements INotifyPropertyChanged.
Input type.
true if the type is complex type, false otherwise.
Gets entity set corresponding to a given type
Intput type
The client model.
Entity set name for the type
Information about a property interesting for binding
Property information
Kind of the property i.e. complex, entity or collection.
Holder of information about entity properties for a type
Collection of properties interesting to the observer
Constructor
Entity set of the entity
Corresponding ClientTyp
Collection of properties interesting to the observer
Color of each vertex to be used for Depth First Search
White color means un-visited
Gray color means added to queue for DFS
Black color means already visited hence reachable from root
The BindingGraph maps objects tracked by the DataServiceContext to vertices in a
graph used to manage the information needed for data binding. The objects tracked
by the BindingGraph are entity type objects and observable entity collections.
The observer of the graph
Graph containing entities, collections and their relationships
Constructor
Observer of the graph
Adds a DataServiceCollection to the graph
Source object for the collection, this object has navigation property corresponding to collection
Property in that corresponds to the collection
Collection being added
Entity set of entities in the collection
true if a new vertex had to be created, false if it already exists
Adds a collection of primitives or complex types to the graph
Source object for the collection, this object has property corresponding to collection
Property in that corresponds to the collection
Collection being added
Type of item in the collection
Adds an entity to the graph
Source object for the entity, this object has navigation property that links to entity
Property in that links to entity
Entity being added
Entity set of entity being added
Item from which the directed edge in the graph goes into . This can be a collection
true if a new vertex had to be created, false if it already exists
This method processes the current 'target' entity and then recursively moves into the graph through
the navigation properties. The 'source' is a previously processed item - it is the 'parent'
of the target entity.
The code generated EntitySetAttribute is processed by this method.
A source entity can reference the target entity directly through an entity reference navigation property,
or indirectly through a collection navigation property.
Removes the from the binding graph
Item to remove
Parent of the
Parent property that refers to
Removes the from the binding graph
Item to remove
Collection that contains the
Removes all of a collection's items from the graph, but does not remove the collection.
Collection containing the items to remove.
This is used for both DataServiceCollection and collections of primitives or complex types.
Removes a relationship between two items based on source and relation label
Source item
Label for relation
Remove all non-tracked entities from the graph
Returns a sequence of items belonging to a collection. Uses the children of a collection
vertex for this enumeration.
Collection being enumerated.
Sequence of items belonging to the collection.
Reset the graph after detaching notifications for everything
Removes the un-reachable vertices from the graph and un-registers notification handlers
Get the binding information for a DataServiceCollection
Collection
The source object that reference the target object through a navigation property.
The navigation property in the source object that reference the target object.
The entity set of the source object.
The entity set name of the target object.
Get the binding information for a collection
Collection
The source object that reference the target object through a collection property.
The collection property in the source object that reference the target object.
Type of item in the collection
Obtains the closest ancestor entity type in the graph corresponding to a complex object vertex.
On input this is a complex object, on output it is the closest entity ancestor.
On input this is a complex object's member property name, on output it is the name of corresponding property of the ancestor entity.
On input this is a complex object's member property value, on output it is the value of the corresponding property of the ancestor entity.
Adds a complex typed object to the graph, also traverses all the child complex properties and adds them.
Source object that contains the complex object, can be an entity, complex object, or a collection.
Source property of complex type, is null if complex type is in a collection, otherwise is the property that references the complex object on source.
Target complex object value.
Adds complex items to the graph from the specified collection.
Collection that contains .
Items in to add to the binding graph. May be only a subset of the total items in .
Add items to the graph, from the object's properties
Object whose properties are to be explored
Attach the CollectionChanged handler to an DataServiceCollection.
An DataServiceCollection.
Attach the CollectionChanged handler to a collection of primitives or complex types.
An ICollection of T, where T is the type of the item in the collection.
True if the collection is attached; otherwise false.
Attach the PropertyChanged handler to an entity or complex object.
An entity or complex object.
True if the target is attached; otherwise false.
Detach CollectionChanged or PropertyChanged handlers from the target
An entity object or collection.
Detach CollectionChanged handlers from the target
A collection object
Sets the observer for a child DataServiceCollection
Entity type for the collection
Non-typed collection interface
Graph implementation for tracking entities, collections for binding
Vertices of the graph, which also hold edges
The root vertex for the graph, DFS traversals start from this vertex
Constructor
Adds vertex to the graph
Item corresponding to vertex
Newly created vertex
Removes all edges going out of and coming into the given vertex
Vertex whose edges are to be cleared
Checks if a vertex exists corresponding to given
Item to lookup
true if vertex found, false otherwise
Looksup the vertex corresponding to
Item to lookup
Vertex corresponding to item
Adds edge between vertices corresponding to and
objects which will be labeled with
Outgoing end of the edge
Incoming end of the edge
Label for the vertex
Newly created edge
Removes edge between vertices corresponding to and
objects which was labeled with
Outgoing end of the edge
Incoming end of the edge
Label for the vertex
Checks if an edge exists between and labeled
with
Outgoing end of the edge
Incoming end of the edge
Label for the vertex
true if an edge exists between source and target with given label, false otherwise
Selects collection of objects tracked by the graph based on the given filter
Filter for the objects
Filtered list of objects tracked by the graph
Removes everything from the graph after applying
Action to apply before removal of each node
Remove all vertices from graph that are unreachable from the root collection vertex
Action to perform for each removed vertex
Collects all vertices unreachable from the root collection vertex
Sequence of vertices that are unreachable from the root collection vertex
Performs a depth first traversal of the graph starting from the root collection
vertex and checks if some vertices were unreachable was reached while doing the traversal.
Alogrithm from Introduction to Algorithms 22.2 by Cormen et al.
Root vertex of the graph
Vertex of the
Collection of incoming edges for the vertex
Collection of outgoing edges for the vertex
Constructor
Item corresponding to vertex
Get the binding information for a collection vertex
The source object that reference the target object through a navigation property corresponding to current collection vertex.
The navigation property in the source object that reference the target object.
The entity set of the source object.
The entity set of the target object.
Get the binding information for a collection vertex
The source object that reference the target object through a collection property corresponding to current collection vertex.
The collection property in the source object that references the collection object.
Type of item in the collection.
Item corresponding to the vertex
Entity set of the item held by the vertex
Is item a DataServiceCollection object
Is item a complex type object
Is item a collection of primitives or complex types
Type of items in the collection if this items represents a collection of primitives or complex types
Parent vertex, only exists for non-top level collection vertices or complex objects
Property of the object that associates this vertex with it's parent
Is item a root collection object
Color of the vertex
Edges coming into this vertex
Edges going out of this vertex
Edge between two vertices of graph, directed and labeled
IEquatable override
Comparand
true if equal, false otherwise
Source vertex
Target vertex
Label of the edge
The BindingObserver class
The BindingGraph maps objects tracked by the DataServiceContext to vertices in a
graph used to manage the information needed for data binding. The objects tracked
by the BindingGraph are entities, complex types and DataServiceCollections.
Constructor
The DataServiceContext associated with the BindingObserver.
EntityChanged delegate.
EntityCollectionChanged delegate.
Start tracking the specified DataServiceCollection.
An entity type.
An DataServiceCollection.
The entity set of the elements in .
Stop tracking the root DataServiceCollection associated with the observer.
Looks up parent entity that references .
Type of DataServiceCollection.
DataService collection
Parent entity that references . May return null if there is none.
Navigation property in the parentEntity that references . May return null if there is no parent entity.
True if parent entity was found, otherwise false.
Handle changes to tracked entity.
The entity that raised the event.
Information about the event such as changed property name.
Handle changes to tracked DataServiceCollection.
The DataServiceCollection that raised the event.
Information about the event such as added/removed entities, operation.
Handle changes to collection properties.
The collection that raised the event.
Information about the event such as added/removed items, operation.
Handle Adds to a tracked DataServiceCollection. Perform operations on context to reflect the changes.
The source object that reference the target object through a navigation property.
The navigation property in the source object that reference the target object.
The entity set of the source object.
The collection containing the target object.
The target entity to attach.
The entity set name of the target object.
Handle Deletes from a tracked DataServiceCollection. Perform operations on context to reflect the changes.
The source object that reference the target object through a navigation property.
The navigation property in the source object that reference the target object.
The entity set of the source object.
The collection containing the target object.
The target entity.
The entity set name of the target object.
Handle changes to navigation properties of a tracked entity. Perform operations on context to reflect the changes.
The source object that reference the target object through a navigation property.
The navigation property in the source object that reference the target object.
The entity set of the source object.
The target entity.
The entity set name of the target object.
Determine if the DataServiceContext is tracking the specified entity.
An entity object.
true if the entity is tracked; otherwise false.
Handle changes to an entity object tracked by the BindingObserver
The entity object that has changed.
The property of the target entity object that has changed.
The value of the changed property of the target object.
Processes the INotifyCollectionChanged.Add event.
Event information such as added items.
Parent entity to which collection belongs.
Parent entity property referring to collection.
Entity set of the collection.
Collection that changed.
Processes the INotifyCollectionChanged.Remove event.
Event information such as deleted items.
Parent entity to which collection belongs.
Parent entity property referring to collection.
Collection that changed.
Removes a collection from the binding graph and detaches each item.
Collection whose elements are to be removed and detached.
Performs a Deep removal of all entities in a collection.
Collection whose items are removed from binding graph.
Parent item whose property refer to the being cleared.
Property of the that refers to .
Validation method if any that checks the individual item in for validity.
Handles additions to collections of complex types.
Collection that contains the new items.
Items that were added to the collection.
Handles removals from collections of complex types.
Collection that no longer contains the items.
Items that were removed from the collection.
Handle the DataServiceContext.SaveChanges operation.
DataServiceContext for the observer.
Information about SaveChanges operation results.
Collects a list of entities that observer is supposed to stop tracking
Entity being delete along with it's children
Parent of the
Property by which refers to
List in which entities to be untracked are collected
Determine if the DataServiceContext is tracking link between and .
The source object side of the link.
A property in the source side of the link that references the target.
The target object side of the link.
True if the link is tracked; otherwise false.
Checks whether the given entity is in detached or deleted state.
Entity being checked.
true if the entity is detached or deleted, otherwise returns false.
Entity validator that checks if the is of entity type.
Entity being validated.
The DataServiceContext associated with the BindingObserver.
The behavior of add operations should be Attach or Add on the context.
The behavior of remove operations should be Detach on the context.
Callback invoked when a property of an entity object tracked by the BindingObserver has changed.
Entity objects tracked by the BindingObserver implement INotifyPropertyChanged. Events of this type
flow throw the EntityChangedParams. If this callback is not implemented by user code, or the user code
implementation returns false, the BindingObserver executes a default implementation for the callback.
Callback invoked when an DataServiceCollection tracked by the BindingObserver has changed.
DataServiceCollection objects tracked by the BindingObserver implement INotifyCollectionChanged.
Events of this type flow throw the EntityCollectionChanged callback. If this callback is not
implemented by user code, or the user code implementation returns false, the BindingObserver executes
a default implementation for the callback.
Information regarding each entity to be untracked
Entity to untrack
Parent object of
Parent object property referring to
Utilities for binding related operations
Throw if the entity set name is null or empty
entity set name.
entity instance for which the entity set name is generated.
Given a collection type, gets it's entity type
Input collection type
Generic type argument for the collection
Verifies the absence of observer for an DataServiceCollection
Type of DataServiceCollection
Non-typed collection object
Collection property of the source object which is being assigned to
Type of the source object
Encapsulates the arguments for the DataServiceContext ChangesSaved event
DataServiceContext SaveChanges response
Construct a DataServiceSaveChangesEventArgs object.
DataServiceContext SaveChanges response
Encapsulates the arguments of a delegate
Context associated with the BindingObserver.
The entity object that has changed.
The property of the entity that has changed.
The current value of the target property.
Entity set to which the entity object belongs
Entity set to which the target propertyValue entity belongs
Construct an EntityChangedParams object.
Context to which the entity and propertyValue belong.
The entity object that has changed.
The property of the target entity object that has changed.
The current value of the entity property.
Entity set to which the entity object belongs
Entity set to which the target propertyValue entity belongs
The context that is associated with the entity object that has changed.
The context that is tracking the changed object.
The entity object that has changed.
The changed object.
The name of the property on the entity object that references the target object.
The name of the changed property.
The object that is currently referenced by the changed property on the entity object.
The current value that references a target entity.
The entity set of the source object.
An entity set name.
The entity set to which the target entity object belongs
An entity set name.
Encapsulates the arguments of a delegate.
Context associated with the BindingObserver.
The source object that references the target object through a collection navigation property.
The property of the source object that references the collection that has changed.
The entity set of the source object.
The collection that has changed.
The target entity object involved in the change.
The entity set name of the target object.
The action that indicates how the collection was changed. The value will be Add or Remove.
Construct an EntityCollectionChangedParams object.
The DataServiceContext associated with the BindingObserver.
The source object that references the target object through a collection navigation property.
The property of the source object that references the collection that has changed.
The entity set of the source object.
The collection that has changed.
The target entity object involved in the change.
The entity set name of the target object.
The action that indicates how the collection was changed. The value will be Add or Remove.
The associated with the that has changed.
The context associated with the collection that has changed
The source object that references the target object in the collection by using a navigation property.
The source object.
The navigation property on the source object that references the collection that has changed.
The navigation property name.
The entity set of the source object.
An entity set name.
The entity object in the collection that has changed.
The changed entity object in the collection.
The entity set name of the object in the collection.
An entity set name.
The that has changed.
A reference to the collection that has changed.
A value that indicates how the collection was changed.
A value that indicates how the collection was changed.
Determines whether changes that are made to a are tracked.
The collection should not track changes.
The collection should automatically track changes to the entities
in the collection.
Represents a dynamic entity collection that provides notifications when items get added, removed, or when the list is refreshed.
An entity type.
The BindingObserver associated with the DataServiceCollection
Is this a root collection
The continuation for partial collections.
True if tracking setup was deferred to first Load() call.
Callback tracked until tracking is enabled.
Callback tracked until tracking is enabled.
Entity set name tracked until tracking is enabled.
The async handle for the current LoadAsync Operation
Initializes a new instance of the class.
Creates a default data service collection, with auto-change tracking enabled as soon as data is loaded into it.
Initializes a new instance of the class based on query execution.
A or LINQ query that returns an collection of objects that are used to initialize the collection.
Initializes a new instance of the class based on query execution and with the specified tracking mode.
A or LINQ query that returns an collection of objects that are used to initialize the collection.
A value that indicated whether or not changes made to items in the collection are automatically tracked.
Initializes a new instance of the class that uses the specified .
The used to track changes to objects in the collection.
Initializes a new instance of the class with the supplied change method delegates and that uses the specified .
The used to track items in the collection.
The entity set of the objects in the collection.
A delegate that encapsulates a method that is called when an entity changes.
A delegate that encapsulates a method that is called when the collection of entities changes.
Initializes a new instance of the class based on query execution and with the supplied change method delegates.
A or LINQ query that returns an collection of objects that are used to initialize the collection.
A value that indicated whether or not changes made to items in the collection are automatically tracked.
The entity set of the objects in the collection.
A delegate that encapsulates a method that is called when an entity changes.
A delegate that encapsulates a method that is called when the collection of entities changes.
Initializes a new instance of the class based on query execution, with the supplied change method delegates, and that uses the supplied .
The used to track items in the collection.
A or LINQ query that returns an collection of objects that are used to initialize the collection.
A value that indicated whether or not changes made to items in the collection are automatically tracked.
The entity set of the objects in the collection.
A delegate that encapsulates a method that is called when an entity changes.
A delegate that encapsulates a method that is called when the collection of entities changes.
Creates new DataServiceCollection.
The materializer
associated with the new collection.
Enumeration of items to initialize the new DataServiceCollection with.
The tracking mode for the new collection.
The name of the entity set the elements in the collection belong to.
Delegate that gets called when an entity changes.
Delegate that gets called when an entity collection changes.
This is the internal constructor called from materializer and used inside our projection queries.
Loads a collection of entity objects into the collection.Not supported by the WCF Data Services 5.0 client for Silverlight.
Collection of entity objects to be added to the .
When tracking is enabled, the behavior of Load would be to attach all those entities that are not already tracked by the context
associated with the collection. The operation will go deep into the input entities so that all related
entities are attached to the context if not already present. All entities in
will be tracked after Load is done.
Load method checks for duplication. The collection will ignore any duplicated items been loaded.
For large amount of items, consider DataServiceContext.LoadProperty instead.
Asynchronously loads the collection by executing a .Supported only by the WCF Data Services 5.0 client for Silverlight.
The that, when executed, returns the entities to load into the collection.
When query is null or not a .
When a previous call to is not yet complete.
This method uses the event-based async pattern.
The method returns immediately without waiting for the query to complete. Then it calls the handler of the
event exactly once on the UI thread. The event will be raised regradless
if the query succeeded or not.
This class only support one asynchronous operation in flight.
Loads the collection asynchronously by loading the results from the request Uri.
The request uri to download results from.
This method uses the event-based async pattern.
The method returns immediately without waiting for the query to complete. Then it calls the handler of the
event exactly once on the UI thread. The event will be raised regradless
if the query succeeded or not.
This class only support one asynchronous operation in flight.
Asynchronously loads items into the collection, when it represents the navigation property of an entity.Supported only by the WCF Data Services 5.0 client for Silverlight.
When the collection does not belong to a parent entity.-or-When the parent entity is not tracked by the .-or-When a previous call to is not yet complete.
This method loads the content of a property represented by this DataServiceCollection.
If this instance is not associated with any property and entity the method will fail.
This method uses the event-based async pattern.
The method returns immediately without waiting for the query to complete. Then it calls the handler of the
event exactly once on the UI thread. The event will be raised regradless
if the query succeeded or not.
This class only support one asynchronous operation in flight.
Loads the next page of data into the collection.Supported only by the WCF Data Services 5.0 client for Silverlight.
A value that is true when the has a continuation token; otherwise false.
This method is the same as except that it runs the query as defined
by the continuation token of this collection.
The method returns immediately without waiting for the query to complete. Then it calls the handler of the
event exactly once on the UI thread. The event will be raised regradless
if the query succeeded or not. Even if the method returns false, the event will be raised (immeditaly)
This class only support one asynchronous operation in flight.
If this collection doesn't have a continuation token (this.Continuation == null) then this method
returns false and does not issue any request.
If there is a continuation token the method will return true and will start a request to load
the next partial set based on that continuation token.
Cancels any running LoadAsync operations and calls the LoadCompleted event handler after cancellation.
Loads a single entity object into the collection.Not supported by the WCF Data Services 5.0 client for Silverlight.
Entity object to be added.
When tracking is enabled, the behavior of Load would be to attach the entity if it is not already tracked by the context
associated with the collection. The operation will go deep into the input entity so that all related
entities are attached to the context if not already present. The will be
tracked after Load is done.
Load method checks for duplication. The collection will ignore any duplicated items been loaded.
Indicates whether all the items from the collection are removed.
true if all the items from the collection are removed; otherwise, false.
Disables the tracking of all items in the collection.
All the entitities in the root collection and all it's related objects will be untracked at the
end of this operation.
Adds a specified item to the collection at the specified index.
Index at which to add the item.
The item to add.
Override to prevent additions to the collection in "deferred tracking" mode, and to verify that the item implements INotifyPropertyChanged.
Overridding this method will cover items that are added to the collection via Add and Insert.
Verifies that input iterator parameter is not null and in case
of Silverlight, it is not of DataServiceQuery type.
Input iterator parameter.
Obtain the DataServiceContext from the incoming enumerable
An IEnumerable that may be a DataServiceQuery or QueryOperationResponse object
DataServiceContext instance associated with the input
Populate this collection with another collection of items
The items to populate this collection with
Prepare the collection for loading. For tracked collections, we enter the attaching state
Reset the collection after loading. For tracked collections, we exit the attaching state.
Initialize and start tracking an DataServiceCollection
The context
Collection to initialize with
The entity set of the elements in the collection.
delegate that needs to be called when an entity changes.
delegate that needs to be called when an entity collection is changed.
Helper method to start a LoadAsync operation.
Function which calls the Begin method for the load. It should take
parameter which should be used as the callback for the Begin call. It should return
of the started asynchronous operation (or throw).
Function which calls the End method for the load. It should take
which represents the asynchronous operation in flight. It should return
with the result of the operation (or throw).
The method takes care of error handling as well as maintaining the .
Note that it does not check the to disallow multiple operations in flight.
The method makes sure that the will be called from the UI thread. It makes no assumptions
about the calling thread of this method.
The method does not process the results of the , it just raises the
event as appropriate. If there's some processing to be done for the results it should all be done by the
method before it returns.
Calls the end method for the LoadAsync operation and fires the LoadCompleted event.
End method to complete the asynchronous query execution.
IAsyncResult to be passed to .
A completion event for the ,
and method.
This event is raised exactly once for each call to the ,
or method. It is called both when the operation
succeeded and/or when it failed.
Gets a continuation object that is used to return the next set of paged results.
A object that contains the URI to return the next set of paged results.
Observer for the collection.
The setter would get called only for child collections in the graph.
Whether this collection is actively tracking
Used as the class for the event.Supported only by the WCF Data Services 5.0 client for Silverlight.
The which represents
the response for the Load operation.
This field is non-null only when the Load operation was successfull.
Otherwise it's null.
Constructor
The response for the Load operation. null when the operation didn't succeed.
which represents the error if the Load operation failed. null if the operation
didn't fail.
This constructor doesn't allow creation of canceled event args.
Constructor
The response for the Load operation. null when the operation didn't succeed.
which represents the error if the Load operation failed. null if the operation
didn't fail.
True, if the LoadAsync operation was cancelled, False otherwise.
This constructor doesn't allow creation of canceled event args.
Gets the response to an asynchronous load operation.Supported only by the WCF Data Services 5.0 client for Silverlight.
A that represents the response to a load operation.
Accessing this property will throw exception if the Load operation failed
or it was canceled.
Indicates the entity set to which a client data service class belongs.
This attribute is generated only when there is one entity set associated with the type.
When there are more than one entity set associated with the type, then the entity set
name can be passed in through the EntitySetNameResolver event.
The entity set name.
Creates a new instance of the .
The entity set to which the class belongs.
Gets the entity set to which the class belongs.
The entity set as string value.
Marks a class as an entity type in WCF Data Services.
Creates a new instance of the class.
Denotes the key property or properties of an entity.
Name of the properties that form the key.
Initializes a new instance of the class.
The string that contains name of the key attribute.
Initializes a new instance of the class.
An array of string values that contain key attribute names.
Gets the names of key attributes.
String value that contains names of key attributes.
Represents the versions of the Open Data Protocol (OData) that the data service may support.
Version 1
Version 2
Version 3
Indicates that a class that is an entity type has a default binary data stream.
Indicates that a class that is an entity type has a related named binary stream.
Creates a new instance of the class.
The name of a binary stream that belongs to the attributed entity.
The name of a binary stream that belongs to the attributed entity.
The name of the binary stream.
Exception that indicates an error occurred while querying the data service.
Actual response object.
Initializes a new instance of the class with a system-supplied message that describes the error.
Initializes a new instance of the class with a specified message that describes the error.
The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.The string value that the contains error message.
Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture. The string value that contains the error message.
The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception. The inner exception object.
Initializes a new instance of the class.
The string value that contains the error message.
The inner exception object.
The object.
Initializes a new instance of the DataServiceQueryException class from the
specified SerializationInfo and StreamingContext instances.
A SerializationInfo containing the information required to serialize
the new DataServiceQueryException.
A StreamingContext containing the source of the serialized stream
associated with the new DataServiceQueryException.
Gets the that indicates the exception results.
A object that indicates the exception results.
Represents additional metadata that is included in a request message to WCF Data Services.
Creates a new instance of the class.
Gets or sets the Accept header of the request message.
The value of the Accept header.
Sets the mime type (ex. image/png) to be used when retrieving the stream.
Note that no validation is done on the contents of this property.
It is the responsibility of the user to format it correctly to be used
as the value of an HTTP Accept header.
Gets or sets the Content-Type header of the request message.
The value of the Content-Type header.
Sets the Content-Type header to be used when sending the stream to the server.
Note that no validation is done on the contents of this property.
It is the responsibility of the user to format it correctly to be used
as the value of an HTTP Content-Type header.
Gets or sets the value of the Slug header of the request message.
A value that is the Slug header of the request.
Sets the Slug header to be used when sending the stream to the server.
Note that no validation is done on the contents of this property.
It is the responsibility of the user to format it correctly to be used
as the value of an HTTP Slug header.
Gets the headers in the request message.
The headers in the request message.
Dictionary containing all the request headers to be used when retrieving the stream.
The user should take care so as to not alter an HTTP header which will change
the meaning of the request.
No validation is performed on the header names or values.
This class will not attempt to fix up any of the headers specified and
will try to use them "as is".
Request header collection.
Represents the error thrown if the data service returns a response code less than 200 or greater than 299, or the top-level element in the response is <error>. This class cannot be inherited.
Actual response object.
Initializes a new instance of the class with a system-supplied message that describes the error.
Initializes a new instance of the class with a specified message that describes the error.
The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.The error message text.
Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception.
Initializes a new instance of the class.
Error message text.
Exception object that contains the inner exception.
object.
Initializes a new instance of the DataServiceQueryException class from the
specified SerializationInfo and StreamingContext instances.
A SerializationInfo containing the information required to serialize
the new DataServiceException.
A StreamingContext containing the source of the serialized stream
associated with the new DataServiceException.
Gets the response as a object.
A object.
Represents a response from WCF Data Services that contains binary data as a stream.
IODataResponseMessage containing all the response information.
Lazy initialized cached response headers.
Response stream. Caching the response stream so that IODataResponseStream.GetStream is only called once.
This helps us to assert that no one internally calls the GetStream method more than once.
Constructor for the response. This method is internal since we don't want users to create instances
of this class.
The web response to wrap.
Releases all resources used by the current instance of the class.
Checks if the object has already been disposed. If so it throws the ObjectDisposedException.
If the object has already been disposed.
Gets the content type of the response stream.
The content type of the response stream.
If the Content-Type header was not present in the response this property will return null.
Gets the Content-Disposition header field for the response stream.
The contents of the Content-Disposition header field.
/// If the Content-Disposition header was not present in the response this property will return null.
Gets the collection of headers from the response.
The headers collection from the response message as a object.
Gets the binary property data from the data service as a binary stream.
The stream that contains the binary property data.
When the is already disposed.
Returns the stream obtained from the data service. When reading from this stream
the operations may throw if a network error occurs. This stream is read-only.
Caller must call Dispose/Close on either the returned stream or on the response
object itself. Otherwise the network connection will be left open and the caller
might run out of available connections.
enum to describe the descriptor kind
Entity Descriptor
Link Descriptor
Named stream descriptor
Service Operation descriptor
represents the association between two entities
equivalence comparer
source entity
name of property on source entity that references the target entity
target entity
Constructor
Source entity
Navigation property on the source entity
Target entity
The client model.
Constructor
Source entity
Navigation property on the source entity
Target entity
The link state
Clear all the changes associated with this descriptor
This method is called when the client is done with sending all the pending requests.
If the current instance of link descriptor is equivalent to the parameters supplied
The source entity
The source property name
The target entity
true if equivalent
The source entity in a link returned by a .
.
A source entity in a link returned by a .
.
The identifier property of the source entity in a link returned by a .
The string identifier of an identity property in a source entity.
this is a link
is this a collection property or not
equivalence comparer
are two LinkDescriptors equivalent, ignore state
link descriptor x
link descriptor y
true if equivalent
compute hashcode for LinkDescriptor
link descriptor
hashcode
Response from SaveChanges.
Descriptor containing the response object.
Initializes a new instance of the class.
HTTP headers
response object containing information about resources that got changed.
Gets the or modified by a change operation.
An or modified by a change operation.
static utility functions for conversions
convert from string to the appropriate type
incoming string value
type to convert to
converted value
Tries to converts a binary value to a byte array.
The binary value to convert.
The equivalent value converted to a byte array.
Whether the value was binary.
change primtive typeName into non-nullable type
like Edm.String or Edm.Binary
the mapped output type
true if named
Convert from primitive value to an xml payload string.
NOTE: We need to pay special attention to DateTimes - if the converted value is going to be used as a content of
atom:updated or atom:published element we have to ensure it contains information about time zone. At the same time we
must not touch datetime values that in content or are mapped to custom elements.
incoming object value
converted value
type edm type string for content
type to analyze
edm type string for payload, null for unknown
Annotates a type on the client.
Back reference to the EdmType this annotation is part of.
what is the clr full name using ToString for generic name expansion
what clr type does this represent
Storage for the client model.
Set to true if the type is marked as ATOM-style media link entry
Property that holds data for ATOM-style media link entries
Whether any property (including properties on descendant types) of this type is a collection of primitive or complex types.
object to manage and encapsulate the lazy loading of the EPM data.
Cached client properties.
Cached Edm properties
discover and prepare properties for usage
Back reference to the EdmType this annotation is part of.
type being processed
the qualified name of the type being processed
The client model.
Ensures that EPM is loaded
Returns the list of EdmProperties for this type.
Returns the list of EdmProperties for this type.
Returns the list of properties from this type.
Returns the list of properties from this type.
Gets the set of properties on this type that should be serialized into insert/update payloads.
The properties to serialize.
get property wrapper for a property name, might be method around open types for otherwise unknown properties
property name
are missing properties ignored
property wrapper
for unknown properties on closed types
Checks if any of the properties (including properties of descendant types) is a collection of primitive or complex types.
true if any if any of the properties (including properties of descendant types) is a collection of primitive or complex types. Otherwise false.
Determines whether a given property should be serialized into an insert or update payload.
The declaring type of the property.
The property.
Whether or not the property should be serialized.
build the clientPropertyCache from EdmProperties
Check if this type represents an ATOM-style media link entry and
if so mark the ClientType as such
Set the HasStream boolean annotation in the EdmType to true.
Computes the metadata version of the property.
List of properties for which metadata version needs to be computed.
List of complex type already visited.
the metadata version of the property collection.
Discovers and returns edm properties for this type.
Edm properties on this type.
if true then EntityType else if !KnownType then ComplexType else PrimitiveType
Property that holds data for ATOM-style media link entries
Returns true if the type is marked as ATOM-style media link entry
Target tree for s on this type
Are there any entity property mappings on this type
The minimum DSVP required for EPM mappings
Gets the EdmTypeReference for the client Type annotation.
Class to encpsulate the lazy loading logic for EPM data
Souce Epm mappings
Target Epm mappings
object to lock on when building the epm info
the current client annotation that the mappings are for
Initializes a new instance of the class.
The client type annotation.
Ensures that the EPM data is loaded.
By going over EntityPropertyMappingInfoAttribute(s) defined on the ElementType
builds the corresponding EntityPropertyMappingInfo
The ClientTypeAnnotation to refer to
The source tree to populate.
This method should be called after all properties are set on the edm type.
By going over EntityPropertyMappingInfoAttribute(s) defined on
builds the corresponding EntityPropertyMappingInfo
Type being looked at
The ClientTypeAnnotation to refer to
The source tree to populate.
Builds the EntityPropertyMappingInfo corresponding to an EntityPropertyMappingAttribute, also builds the delegate to
be invoked in order to retrieve the property provided in the
Source EntityPropertyMappingAttribute
ResourceType on which to look for the property
The ClientTypeAnnotation to refer to
The source tree to populate.
Initializes the epm fields and builds the information into the fields
Target tree for s on this type
Source tree for s on this type
Determines if the Epm fields need initializing
The exception that is thrown when the server returns an error.
Contains the state for this exception.
Initializes a new instance of the class with a system-supplied message that describes the error.
Initializes a new instance of the class with a specified message that describes the error.
The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception.
Initializes a new instance of the class.
The string value that contains the error message.
The integer value that contains status code.
Initializes a new instance of the class.
The string value that contains the error message.
The System.Exception object that contains the inner exception.
The integer value that contains status code.
Gets the HTTP error status code returned after .
An integer value that represents the exception.
Contains the state of the exception, used for serialization in security transparent code.
Called when deserialization of the exception is complete.
The deserialized exception.
Gets or sets the status code as returned by the server.
non-generic placeholder for generic implementation
non-generic placeholder for generic implementation
internal constructor so that only our assembly can provide an implementation
get an enumerable materializes the objects the response
context
query components
Projection plan (if compiled in an earlier query).
contentType
the message
expected payload kind.
atom materializer
Creates a instance of strongly typed DataServiceRequest with the given element type.
element type for the DataServiceRequest.
constructor parameter.
returns the strongly typed DataServiceRequest instance.
Ends an asynchronous request to an Internet resource.
Element type of the result.
Source object of async request.
The data service context.
async method name.
The asyncResult being ended.
The response - result of the request.
The QueryComponents associated with this request
The client model.
instance of query components
execute uri and materialize result
element type
context
query components for request to execute
enumerable of results
Synchronizely get the query set count from the server by executing the $count=value query
The context
The server side count of the query set
Begins an asynchronous request to an Internet resource.
source of execute (DataServiceQuery or DataServiceContext
context
The AsyncCallback delegate.
The state object for this request.
async method name.
An IAsyncResult that references the asynchronous request for a response.
Creates the result object for the specified query parameters.
The source object for the request.
The data service context.
The AsyncCallback delegate.
The state object for the callback.
async method name at the source.
Result representing the create request. The request has not been initiated yet.
Gets the type of object submitted as a batch to the data service.
Type object.
Gets the URI of the request object submitted to a data service.
URI of the request object.
The ProjectionPlan for the request, if precompiled in a previous page; null otherwise.
Gets or sets the payload kind for this request.
internal constructor so that only our assembly can provide an implementation
Gets the object that can be used to iterate through the collection returned by the query.
An enumerator over the query results.
Expect derived class to override this with an explict interface implementation
Executes the query against the data service.Not supported by the WCF Data Services 5.0 client for Silverlight.
An that contains the results of the query operation.
When the data service returns an HTTP 404: Resource Not Found error.
Asynchronously sends a request to execute the data service query.
An object that is used to track the status of the asynchronous operation.
Delegate to invoke when results are available for client consumption.
User-defined state object passed to the callback.
Called to complete the asynchronous operation of executing a data service query.
An that contains the results of the query operation.
The result from the operation that contains the query results.
When the data service returns an HTTP 404: Resource Not Found error.
Synchronous methods not available
Returns an IEnumerable from an Internet resource.
An IEnumerable that contains the response from the Internet resource.
Begins an asynchronous request to an Internet resource.
The AsyncCallback delegate.
The state object for this request.
An IAsyncResult that references the asynchronous request for a response.
Ends an asynchronous request to an Internet resource.
The pending request for a response.
An IEnumerable that contains the response from the Internet resource.
Represents an expression that contains the query to the data service.
An object that represents the query.
Represents the query provider instance.
An representing the data source provider.
Holds a Uri and type for the request.
The type to construct for the request results
The ProjectionPlan for the request (if precompiled in a previous page).
Request uri for the current request.
The QueryComponents for the request
Initializes a new instance of the class.
The URI object that contains the request string.
Create a request for a specific Uri
The URI for the request.
The query components for the request
Projection plan to reuse (possibly null).
Represents the URI of the query to the data service.
The requested URI as a value.
The QueryComponents associated with this request
The client model.
an instance of QueryComponents.
Gets the type of the object used to create the instance.
A value that indicates the type of data returned.
Gets the URI object that contains the request string.
A object that contains the request string.
The ProjectionPlan for the request, if precompiled in a previous page; null otherwise.
Data service response to ExecuteBatch & SaveChanges
Http headers of the response.
Http status code of the response.
responses
true if this is a batch response, otherwise false.
constructor
HTTP headers
HTTP status code
list of responses
true if this represents a batch response, otherwise false.
Gets an enumerator that enables retrieval of responses to operations being tracked by objects within the .
An enumerator over the response received from the service.
Gets an enumerator that enables retrieval of responses to operations being tracked by objects within the .
An enumerator over the response received from the service.
The headers from an HTTP response associated with a batch request.
An object containing the name-value pairs of an HTTP response.
The status code from an HTTP response associated with a batch request.
An integer based on status codes defined in Hypertext Transfer Protocol.
Gets a Boolean value that indicates whether the response contains multiple results.
A Boolean value that indicates whether the response contains multiple results.
Response to a batched query or Execute call.
The type to construct for the request results
Response to a batched query.
Original query
Enumerable of objects in query
constructor
HTTP headers
original query
retrieved objects
Executes the and returns items.
The enumerator to a collection of items.
In the case of Collection(primitive) or Collection(complex), the entire collection is
materialized when this is called.
Gets a object containing the URI that is used to retrieve the next results page.
An object containing the URI that is used to return the next results page.
Gets a object containing the URI that is used to retrieve the next page of related entities in the specified collection.
A continuation object that points to the next page for the collection.
The collection of related objects being loaded.
Gets a object that contains the URI that is used to retrieve the next page of related entities in the specified collection.
A continuation object that points to the next page for the collection.
The collection of related objects being loaded.
The type of the items in the collection.
Creates a generic instance of the QueryOperationResponse and return it
generic type for the QueryOperationResponse.
constructor parameter1
constructor parameter2
constructor parameter3
returns a new strongly typed instance of QueryOperationResponse.
Gets the enumeration helper for the .
The enumerator.
The generic type.
An enumerator to enumerator through the results.
Gets the that generates the items.
A object.
Gets the server result set count value from a query, if the query has requested the value.
The return value can be either a zero or positive value equal to the number of entities in the set on the server.
Thrown when the count tag is not found in the response stream.
get a non-null enumerable of the result
constructor
HTTP headers
original query
retrieved objects
Gets a object that contains the URI that is used to retrieve the next results page.
An object that contains the URI that is used to return the next results page.
Executes the and gets items.
An enumerator to a collection of items.
In the case of Collection(primitive) or Collection(complex), the entire collection is
materialized when this is called.
The server result set count value from a query, if the query has requested the value.
The return value can be either zero or a positive value equal to the number of entities in the set on the server.
Event args for the event fired during reading or writing of
an entity serialization/deserialization
The entity being (de)serialized
The ATOM entry data to/from the network
The xml base of the feed or entry containing the current ATOM entry
Constructor
The entity being (de)serialized
The ATOM entry data to/from the network
The xml base of the feed or entry containing the current ATOM entry
Gets the object representation of data returned from the property.
representation of the property.
Gets an entry or feed data represented as an .
Gets the base URI base of the entry or feed.
Returns .
Strongly-typed and parameterized exception factory.
Strongly-typed and parameterized exception factory.
create and trace new ArgumentException
exception message
parameter name in error
ArgumentException
create and trace new InvalidOperationException
exception message
InvalidOperationException
create and trace new InvalidOperationException
exception message
innerException
InvalidOperationException
Create and trace a NotSupportedException with a message
Message for the exception
NotSupportedException
create and throw a ThrowObjectDisposed with a type name
type being thrown on
create and trace a
errorCode
message
InvalidOperationException
method not supported
method
exception to throw
throw an exception because unexpected batch content was encounted
internal error
throw an exception because expected batch content was not encountered
internal error
unexpected xml when reading web responses
internal error
exception to throw
throw exception for unexpected xml when reading web responses
internal error
Trace the exception
type of the exception
exception object to trace
the exception parameter
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.
The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method.
The exception that is thrown when the author has yet to implement the logic at this point in the program. This can act as an exception based TODO tag.
The exception that is thrown when an invoked method is not supported, or when there is an attempt to read, seek, or write to a stream that does not support the invoked functionality.
unique numbers for repeated error messages for unlikely, unactionable exceptions
Use this class to materialize objects from an application/atom+xml stream.
Backreference to the context to allow type resolution.
base type of the object to create from the stream.
when materializing a known type (like string)
<property> text-value </property>
Materializer from which instances are read.
The log for the materializer stores all changes for the
associated data context.
untyped current object
has GetEnumerator been called?
Whether anything has been read.
output writer, set using reflection
constructor
originating context
Query components (projection, expected type)
Projection plan (if compiled in an earlier query).
responseMessage
The kind of the payload to materialize.
constructor
originating context
entries that needs to be materialized.
result type.
The format of the response being materialized from.
Private internal constructor used for creating empty wrapper.
dispose
as IEnumerable
this
Gets the type that of the instances that will be returned by materializer.
Whether the expected is a primitive type.
Actual type on the client.
The client model used.
The actual type that implements ICollection<>
Type of the instances that will be returned by materializer.
For collection navigation properties (i.e. ICollection<T> where T is an entity the method returns T. Materializer will
return single entity each time MoveNext() is called. However for collection properties we need the whole property instead of just a
single collection item.
Creates the next object from the stream.
false if stream is finished
Creates the next object from the stream.
false if stream is finished
Not supported.
Always thrown
Creates materializer for results
Context of expression to analyze.
the results to wrap
a new materializer
Creates a materializer for partial result sets.
Context of expression to analyze.
The current page of results
The continuation for the results.
A new materializer.
set the inserted object expected in the response
object being inserted that the response is looking for
The count tag's value, if requested
The count value returned from the server
Returns the next link URI for the collection key
The collection for which the Uri is returned, or null, if the top level link is to be returned
An Uri pointing to the next page for the collection
verify the GetEnumerator can only be called once
Loosely typed current object property.
For collection properties this property will be of AtomContentProperties to allow further materialization processing.
Otherwise the value should be of the right type, as the materializer takes the expected type into account.
A materializer for empty results
Returns true if the underlying object used for counting is available
The data service context object this materializer belongs to
Private type to wrap partial (paged) results and make it look like standard materialized results.
The results to wrap
A continuation to the next page of results.
The data service context this result belongs to
Creates a wrapper for raw results
Context of expression to analyze.
the results to wrap
The continuation for this query.
Get the next link to the result set
When equals to null, returns the next link associated with this collection. Otherwise throws InvalidOperationException.
The continuation for this query.
Gets Enumerator for wrapped results.
IEnumerator for results
The data service context this result belongs to
Materializer state for a given ODataEntry
The entry.
entity descriptor object which keeps track of the entity state and other entity specific information.
True if the context format is Atom or if the MergeOption is anything other than NoTracking.
Entry flags.
List of navigation links for this entry.
Creates a new instance of MaterializerEntry.
Creates a new instance of MaterializerEntry.
The entry.
The format the entry was read in.
True if the contents of the entry will be tracked in the context, otherwise False.
The client model.
Creates a new instance of MaterializerEntry using the given entity descriptor for LoadProperty.
Entity descriptor.
OData Format.
Whether this entity is being tracked.
Use this constructor only for LoadProperty scenario.
Creates an empty entry.
An empty entry.
Creates the materializer entry.
The entry.
The format the entry was read in.
True if the contents of the entry will be tracked in the context, otherwise False.
The client model.
A new materializer entry.
Creates the materializer entry for LoadProperty scenario.
The entity descriptor.
The format the entry was read in.
True if the contents of the entry will be tracked in the context, otherwise False.
A new materializer entry.
Gets an entry for a given ODataEntry.
The ODataEntry.
The materializer entry
Adds a navigation link.
The link.
Updates the entity descriptor.
Gets the value for a masked item.
Mask value.
true if the flag is set; false otherwise.
Sets the value for a masked item.
Mask value.
Value to set
Gets the entry.
True if the context format is Atom or if the context's MergeOption is anything other than NoTracking.
This is used to avoid building URI metadata information that is not needed outside of the context, such
as odata.id and odata.editlink. Since this information is always available in the payload with Atom, for
backward compatibility we continue using it as we always have, even for NoTracking cases.
Entry ID.
Properties of the entry.
Non-property content goes to annotations.
The entity descriptor.
Resolved object.
Actual type of the ResolvedObject.
Whether values should be updated from payload.
Whether the entity has been resolved / created.
Whether the materializer has created the ResolvedObject instance.
Is this entry created for LoadProperty.
The navigation links.
Gets the format
Whether the entity descriptor has been updated.
Masks used get/set the status of the entry
Bitmask for ShouldUpdateFromPayload flag.
Bitmask for CreatedByMaterializer flag.
Bitmask for EntityHasBeenResolved flag.
Bitmask for MediaLinkEntry flag (value).
Bitmask for LoadProperty scenario.
Materializer state for a given ODataFeed
The feed.
The entries.
Prevents a default instance of the struct from being created.
The feed.
The entries.
Creates the materializer feed.
The feed.
The entries.
The materializer feed.
Gets the materializer feed.
The feed.
The materializer feed.
Gets the feed.
Gets the entries.
URI representing the next page link.
Materializer state for a given ODataNavigationLink
The navigation link.
An object field for the feed or enty.
Prevents a default instance of the struct from being created.
The link.
Value of the link.
Creates the materializer link with an entry.
The link.
The entry.
The materializer link.
Creates the materializer link with a feed.
The link.
The feed.
The materializer link.
Gets the materializer link.
The link.
The materializer link.
Gets the link.
Gets the entry.
Gets the feed.
This class marks a type that represents an Astoria client entity
such that the Astoria client will treat it as a media entry
according to ATOM's "media link entry" concept.
Name of the member that contains the data for the media entry
Creates a new instance of .
A string value that identifies the property that holds media data.
Creates a new MediaEntryAttribute attribute and sets the name
of the member that contains the actual data of the media entry
(e.g. a byte[] containing a picture, a string containing HTML, etc.)
The name of the property on the class that holds the media, usually binary data.
A string value that identifies the property that holds media data.
Used to specify a value synchronization strategy.
Equivalent to System.Data.dll!System.Data.LoadOption
Equivalent to System.Data.Linq.dll!System.Data.Linq.RefreshMode
Equivalent to System.Data.Entity.dll!System.Data.Objects.MergeOption
No current values are modified.
Equivalent to System.Data.Objects.MergeOption.AppendOnly
Equivalent to System.Data.Linq.RefreshMode.KeepCurrentValues
All current values are overwritten with current store values,
regardless of whether they have been changed.
Equivalent to System.Data.LoadOption.OverwriteChanges
Equivalent to System.Data.Objects.MergeOption.OverwriteChanges
Equivalent to System.Data.Linq.RefreshMode.OverwriteCurrentValues
Current values that have been changed are not modified, but
any unchanged values are updated with the current store
values. No changes are lost in this merge.
Equivalent to System.Data.LoadOption.PreserveChanges
Equivalent to System.Data.Objects.MergeOption.PreserveChanges
Equivalent to System.Data.Linq.RefreshMode.KeepChanges
Equivalent to System.Data.Objects.MergeOption.NoTracking
This attribute indicates another property in the same type that
contains the MIME type that should be used for the data contained
in the property this attribute is applied to.
The name of the property that contains the data
The name of the property that contains the mime type
Creates a new instance of the MimeTypePropertyAttribute.
A string that contains the name of the new property attribute.
A string that contains the Mime type of the new property attribute.
Gets the name of the MimeTypePropertyAttribute.
A string that contains the name of the property attribute.
Gets the Mime type of the MimeTypePropertyAttribute
A string that contains the Mime type of the property attribute.
represents the cached entity
uri to identitfy the entity
<atom:id>identity</id>
entity
tracks information about the default stream, if any.
uri of the resource set to add the entity to during save
uri to query the entity
<atom:link rel="self" href="queryLink" />
uri to edit the entity. In case of deep add, this can also refer to the navigation property name.
<atom:link rel="edit" href="editLink" />
Contains the LinkInfo (navigation and relationship links) for navigation properties
entity descriptor instance which contains metadata from responses which haven't been fully processed/materialized yet.
This is used only in non-batch SaveChanges scenario.
List of named streams for this entity
List of service operation descriptors for this entity.
Create a new instance of Entity descriptor.
The client model
returns the most recent identity of the entity
the identity of the entity, as returned in the latest response.
return the most recent edit link for the entity
the uri to edit the entity associated with the entity descriptor.
return the most recent edit link for the MR associated with the entity
the uri to edit the MR associated with the entity descriptor.
return the most recent etag for the entity
etag for the entity associated with the entity descriptor.
return the most return etag for the MR associated with the entity
etag for the MR associated with the entity descriptor.
return the most recent type name of the entity as returned in the response payload.
the type name of the entity as returned in the response payload.
uri to edit the entity
retrieves the baseUri to use for a given entity set.
whether to return the query link or edit link
absolute uri which can be used to edit the entity
is the entity the same as the source or target entity
related end
true if same as source or target entity
Return the related end for this resource. One should call this method, only if the resource is inserted via deep resource.
returns the related end via which the resource was inserted.
clears all the changes - like closes the save stream, clears the transient entity descriptor.
This method is called when the client is done with sending all the pending requests.
Closes the save stream if there's any and sets it to null
Add the given navigation link to the entity descriptor
name of the navigation property via which this entity is related to the other end.
uri that can be used to navigate from this entity to the other end.
Add the given association link to the entity descriptor
name of the navigation property via which this entity is related to the other end.
uri that can be used to navigate associations for this property.
Merges the given linkInfo to the entity descriptor,
overwrites existing links with new ones (coming from the payload)
linkInfo
Try and get the navigation link. If the navigation link is not specified, then its used the self link of the entity and
appends the property name.
retrieves the appropriate baseUri for a given entitySet.
ClientProperty instance representing the navigation property.
returns the uri for the given link. If the link is not present, its uses the self link of the current entity and appends the navigation property name.
Returns the LinkInfo for the given navigation property.
name of the navigation property
LinkInfo for the navigation propery
true if LinkInfo is found for the navigation property, false if not found
Check if there is a stream with this name. If yes, returns the information about that stream, otherwise add a streams with the given name.
name of the stream.
an existing or new namedstreaminfo instance with the given name.
Adds an operation descriptor to the list of operation descriptors.
the operation descriptor to add.
Clears all operator descriptors
Appends OperationDescriptors to the existing list of OperationDescriptors
List containing OperationDescriptors to add for this entityDescriptor
Gets the stream info with the given name.
name of the stream.
information about the stream with the given name.
true if there is a stream with the given name, otherwise returns false.
Merges the given named stream info object.
If the stream descriptor is already present, then this method merges the info from the given stream descriptor
into the existing one, otherwise justs add this given stream descriptor to the list of stream descriptors for
this entity.
namedStreamInfo instance containing information about the stream.
Sets up the descriptor's parent descriptor and parent property. Only valid if the descriptor is in the Added state.
The parent descriptor.
The property for insert.
Sets the entity set URI to use for inserting the entity tracked by this descriptor. Only valid if the descriptor is in the added state.
The entity set insert URI.
Returns LinkInfo for the given property, if it does not exists than a new one is created.
name of the navigation property
LinkInfo for propertyName
In V1, we used to not support self links. Hence we used to use edit links as self links.
IN V2, we are adding support for self links. But if there are not specified, we need to
fall back on the edit link.
whether to get query link or the edit link.
the query or the edit link, as specified in the parameter.
Creates a default stream descriptor, if there is none yet, and returns it.
If there is one already present, then returns the current instance.
stream descriptor representing the default stream.
Gets the URI that is the identity value of the entity.
The property corresponds to the identity element of the entry that represents the entity in the Atom response.
Gets the URI that is used to return the entity resource.
A URI that returns the entity.
Gets the URI that modifies the entity.
The edit link URI for the entity resource.
Gets the URI that accesses the binary property data of the entity.
A URI that accesses the binary property as a stream.
If the entity for the box is an MLE this property stores the content source URI of the MLE.
That is, it stores the read URI for the associated MR.
Setting it to non-null marks the entity as MLE.
Gets the URI that modifies the binary property data of the entity.
The property contains the edit-media link URI for the Media Resource that is associated with the entity, which is a Media Link Entry.
If the entity for the box is an MLE this property stores the edit-media link URI.
That is, it stores the URI to send PUTs for the associated MR.
Setting it to non-null marks the entity as MLE.
Gets the entity that contains the update data.
An object that contains update data.
Gets an eTag value that indicates the state of data targeted for update since the last call to .
The state of data.
Gets the eTag for the media resource associated with an entity that is a media link entry.
A string value that indicates the state of data.
Gets the parent entity that is related to the entity.
An object that is the parent entity in the relationship link.
This is only set for entities added through AddRelateObject call
Gets the name of the property of the entity that is a navigation property and links to the parent entity.
The name of the parent property.
Gets the name of the type in the data source to which the entity is mapped.
A string that is the name of the data type.
Returns a collection of links that are the relationships in which the entity participates.
A of objects that represents links in which the entity participates.
Returns a collection of named binary data streams that belong to the entity.
A of objects that are the named binary data streams that belong to the entity.
Gets a collection of operation descriptors associated with the entity.
A collection of operation descriptors associated with the entity.
Gets the client model.
Parent entity
this is a entity
Returns true if the resource was inserted via its parent. E.g. POST customer(0)/Orders
The stream which contains the new content for the MR associated with this MLE.
This stream is used during SaveChanges to POST/PUT the MR.
Setting it to non-null marks the entity as MLE.
Describes whether the SaveStream is for Insert or Update.
The value NoStream is for both non-MLEs and MLEs with unmodified stream.
Returns true if we know that the entity is MLE. Note that this does not include the information
from the entity type. So if the entity was attributed with HasStream for example
this boolean might not be aware of it.
Returns true if the entry has been modified (and thus should participate in SaveChanges).
entity descriptor instance containing metadata from responses, which hasn't been fully processed yet.
Returns the stream descriptor for the default stream associated with this entity.
If this entity is not an MLE, then returns null;
Gets the edm structured value associated with this entity.
The entity set name provided in either AttachTo or AddObject.
Describes the insert/update/delete state of an entity or link.
Deleting an inserted resource will detach it.
After SaveChanges, deleted resources will become detached and Added & Modified resources will become unchanged.
The resource is not tracked by the context.
The resource is tracked by a context with no changes.
The resource is tracked by a context for insert.
The resource is tracked by a context for deletion.
The resource is tracked by a context for update.
options when saving changes
default option, using multiple requests to the server stopping on the first failure
save the changes in a single changeset in a batch request.
save all the changes using multiple requests
Use replace semantics when doing update.
Use PATCH verb when doing update (retains the merge semantics).
save each change independently in a batch request.
Handle the request (both sync and async) for non batch scenarios
keeps track of all the parsed responses.
We cache the current response and then parse it. we need to do this for the async case only.
http web response
remove it later
constructor for SaveResult
context
method
options
user callback
user state object
This starts the next change
This starts the next change
Read and store response data for the current change, and try to start the next one
the completed per request object
IODataResponseMessage contain response for the operation.
IODataResponseMessage instance.
Handle the response.
an instance of the DataServiceResponse, containing individual responses for all the requests made during this SaveChanges call.
Get the materializer to process the response.
entity descriptor whose response is getting materialized.
information about the response to be materialized.
an instance of MaterializeAtom, that can be used to materialize the response.
Returns the request message to write the headers and payload into.
Http method for the request.
Base Uri for the request.
Request headers.
HttpStack to use.
Descriptor for the request, if there is one.
an instance of IODataRequestMessage.
Create memory stream for descriptor (entity or link or MR or named stream).
Index into changed entries.
RequestMessage to be used to generate the payload.
Stream of data for descriptor.
Create request message from the next change.
An instance of ODataRequestMessage for the next change.
Check to see if the resource to be inserted is a media descriptor, and if so
setup a POST request for the media content first and turn the rest of
the operation into a PUT to update the rest of the properties.
The resource to check/process
An instance of ODataRequestMessage to do POST to the media resource
Checks if the entity descriptor represents an MLE with modified MR and if so creates a PUT request
to update the MR.
The entity descriptor for the entity to be checked.
An instance of ODataRequestMessage for the newly created MR PUT request or null if the entity is not MLE or its MR hasn't changed.
Creates HTTP request for the media resource (MR)
The URI to request
The HTTP method to use (POST or PUT)
version to be sent in the DSV request header.
Send the request using chunked encoding to avoid buffering.
If the response preference setting should be applied to the request
(basically means if the response is expected to contain an entity or not).
Collection of request headers
Descriptor for this media resource request.
An instance of ODataRequestMessage.
Sets the content and the headers of the media resource request
The header collection to setup.
DataServiceSaveStream instance containing all information about the stream.
ETag header value to be set. If passed null, etag header is not set.
This only works with the V2 MR support (SetSaveStream), this will not setup
the request for V1 property based MRs.
List of headers to reset
operation with exception
exception object
response object
Decide whether we should continue when there is an error thrown
copy the response data
response object
Handle the response payload.
httpwebresponse instance.
stream containing the response payload.
Creates a request for the given named stream.
NamedStreamInfo instance containing information about the stream.
An instance of ODataRequestMessage for the given named stream.
returns false since this class handles only non-batch scenarios
returns true if the payload needs to be processed.
In async case, this is a memory stream used to cache responses, as we are reading async from the underlying http web response stream.
In non-async case, this is the actual response stream, as returned by the http request.
cached response
response headers
response status code
Parsed response DataServiceVersion header.
entry containing the parsed response.
Exception if encountered.
descriptor for which the response is getting parsed.
Constructor
descriptor whose response is getting processed.
headers
status code
Parsed response DataServiceVersion header.
atom entry, if there is a non-error response payload.
exception, if the request threw an exception.
Event args for the event fired before executing a web request. Gives a
chance to customize or replace the request object to be used.
The web request reported through this event
The request header collection.
Constructor
The request reported through this event
The request header collection.
Gets or sets the instance about to be sent by the client library to the data service.
.
Gets the collection protocol headers that are associated with the request to the data service.
A collection of protocol headers that are associated with the request.
Serializes the request data into the given format using the given message writer.
where to pull the changes from
The property converter to use for creating ODataProperty instances.
Creates a new instance of the Serializer.
the request info.
Creates an instance of ODataMessageWriter.
Instance of IODataRequestMessage.
RequestInfo containing information about the client settings.
true if the writer is intended to for a parameter payload, false otherwise.
An instance of ODataMessageWriter.
Creates an ODataEntry for the given EntityDescriptor and fills in its ODataLib metadata.
The entity descriptor.
Name of the server type.
The client-side entity type.
The current client format.
An odata entry with its metadata filled in.
Writes the body operation parameters associated with a ServiceAction.
The list of operation parameters to write.
The OData request message used to write the operation parameters.
Write the entry element.
The entity.
Collection of links related to the entity.
The OData request message.
Writes a navigation link.
The entity
The links related to the entity
The ODataWriter used to write the navigation link.
Writes an entity reference link.
The link descriptor.
The request message used for writing the payload.
Enumerates through the list of URI operation parameters and creates a new Uri with the uri operation parameters written as query string of the new Uri.
The Uri used to construct the new Uri.
The non-empty list of uri parameters which will be converted to query string.
Uri containing the uri parameters as query string.
Returns the new XmlWriter to cache the payload for firing WritingEntity event.
ODataEntry instance that is currently getting serialized.
XmlWriter that is used to write the payload.
XmlWriter instance that needs to be used to write the payload for the given odataentry.
Fires the WritingEntity event, and then copies the payload into the parent writer.
ODataEntry that is currently getting serialized.
XmlWriter writer instance that got returned by StartEntryXmlCustomizer method.
Parent writer to which the payload needs to get copied to, after firing the event.
Converts a value to an escaped string for use in a Uri. Wraps the call to ODL's ConvertToUriLiteral and escapes the results.
The name of the . Used for error reporting.
The value of the .
A string representation of for use in a Url.
To cache the entity instance as annotation for firing WritingEntity event
Entity instance that is currently getting serialized.
XDocument instance to cache the payload.
RequestInfo instance.
Creates a new instance of WritingEntityInfo
Entity instance that is currently getting serialized.
RequestInfo instance.
Holds information about stream.
The Data service stream link object
entity descriptor refering the parent entity.
transient named stream info, which contains metadata from the response which has not been materialized yet.
Creates a StreamDescriptor class with the given name and other information
name of the stream.
instance of entity descriptor that contains this stream.
Creates a StreamDescriptor class for the default stream (MR) associated with an entity.
instance of entity descriptor that contains this stream.
Merge the information from the new stream info into the existing one.
stream info into which the data needs to be merged.
stream info which contains the latest data.
clears all the changes - like closes the save stream, clears the transient entity descriptor.
This method is called when the client is done with sending all the pending requests.
return the most recent edit link for the named stream
the uri to edit the named stream.
return the most recent etag for the named stream
the etag for the named stream.
Closes the save stream if there's any and sets it to null
The that represents the binary resource stream.
Returns .
The that represents the entity to which the named resource stream belongs.
The of the entity.
Returns the name of the stream.
Returns the URI to get the named stream.
Returns the URI to update the named stream.
Returns the content type of the named stream.
Returns the etag for the named stream.
Returns the stream associated with this name.
return true, since this class represents entity descriptor.
Transient named stream info, if there are responses which hasn't been fully processed yet.
Class which contains all the logic for resolving the type from the wire name.
Dictionary instance to map the edm type name to the client type annotation.
In V1/V2, we never used to cache this and call this during materialization. Hence 2 different contexts can resolve the same wire type
differently and that would have been fine. Also, someone could have written a logic that might differ based on queries within the same context.
For e.g. before executing a projection query, the user can set a flag so that the resolver behaves differently.
Hence caching this locally for every request to simulate that behavior.
The callback for resolving client CLR types.
The callback for resolving server type names.
The client model.
The service model, or null if one has not been provided.
Indicates whether or not to skip the type assignability check.
Creates an instance of TypeResolver class.
The client model.
The callback to resolve client CLR types.
The callback for resolving server type names.
The service model.
In V2, in projection path, we do not use to check for assignability between the expected type
and the type returned by the type resolver. This variable is used to track that scenario.
If this is true, the current request is a projection request otherwise not.
Resolves the client type that should be used for materialization.
Expected client clr type based on the API called.
The name surfaced by the ODataLib reader.
If we have a server model, this will be a server type name that needs to be resolved.
If not, then this will already be a client type name.
The resolved annotation for the client type to materialize into.
ODL callback for client type resolution
The expected type for the given wire name
The name of the type from the payload
An IEdmType
Resolves the expected EDM type to give to the ODataLib reader based on a client CLR type.
The client side CLR type.
The resolved EDM type to provide to ODataLib.
Determines whether or not the client type should be written for a property that is not defined on the server.
DEVNOTE: If there is no server model, the declaring type is complex, or the server type cannot be
found then the server type will be assumed to match the client type.
This is done this way to prevent getting this wrong if the server property is defined, but we cannot find it for some reason.
So if the types do not match, or we aren't able to align them, we will not write the type name, allowing the server to interpret it as the correct type.
The client-side property.
The server type name of the current entity.
True if the client property type should be written because the property definitely not defined on the server type.
Tries to resolve the name of the base type of the given entity set if a server model has been provided.
The name of the entity set.
The server type name if one could be found.
Whether the type name could be found.
Tries to resolve the name of a navigation property's target if a server model has been provided.
The name of the server side source type.
The name of the navigation property.
The server type name if one could be found.
Whether the type name could be found.
Tries to resolve the server type corresponding to the client type.
The client type annotation.
The server type, if the server type could be resolved.
Whether or not the server type could be resolved.
User hook to resolve name into a type.
Name to resolve.
Expected type for the name.
the type as returned by the resolver. If no resolver is registered or resolver returns null, expected type is returned.
if ResolveType function returns a type not assignable to the userType
Gets the reader model.
Represents a parameter associated with a service operation or a service function.
Instantiates a new UriOperationParameter
The name of the uri operation parameter.
The value of the uri operation parameter.
This immutable class is responsible for knowing how to correctly resolve base uri requests
The baseUri provided by the user. can be null.
The function provided by the user to resolve the baseUri of entity sets. can be null
base uri with guranteed trailing slash
Ctor for BaseUriResolver
The baseUri provided by the user.
The function provider by the user to resolve the baseUri of the entity sets.
Creates a UriResolver from a baseUri
The baseUri to use in the UriResolver
The name of the paramter that the user passed the baseUri in from.
The new UriResolver using the passed in baseUri
Creates a new BaseUriResolver with all the same values except a new BaseUri value
The new BaseUri value
The name of the paramter that the user passed the baseUri in from.
A new BaseUriResolver with the BaseUri property set to the new value.
Creates a new BaseUriResolver with all the same values except a new ResolveEntitySet value
The new BaseUri value
A new BaseUriResolver with the ResolveEntitySet property set to the new value.
base uri with no trailing slash
the name of the entitSet whose Uri will be retrieved.
the baseUri ended with a slash for the entitySetName passed in.
returns the BaseUri property followed by a slash.
if the BaseUri property is null, an InvalidOperationException is thrown
The BaseUri property with a slash.
If necessary will create an absolute uri by combining the BaseUri and requestUri
The uri specified by the user
An absolute Uri based on the requestUri and if nessesary the BaseUri
Converts the baseUri passed in to an absolute Uri and then validates that it is
usable by the system.
The user provided baseUri value.
The name of the paramter that the user passed the baseUri in from.
Validates that the passed in BaseUri
the baseUri that needs to be validated
True if the baseUri is valid, otherwise false
Updates a relative silverlight uri to an absolute uri
the uri passed by the client
the updated absolute uri
Returns a Uri that is not slash terminated
Will be the passed in one if it is slash termination free, or a new one
if the passed in one is slash terminated.
The Uri to be un slash terminated
A slash termination free version of the passed in Uri.
Returns a slash terminated Uri.
Will be the passed in one if it is already slash terminated, or a new one
if the passed in one is not slash terminated.
The Uri to be slash terminated
A slash terminated version of the passed in Uri.
returns the BaseUri property followed by a slash.
if the BaseUri property is null, an InvalidOperationException is thrown
Returns the error message to use if the BaseUri is not available. Using a function so we only have to
look up the resource if an error is actually thrown;
The BaseUri property with a slash.
Gets a Uri from the ResolveEntitySet property if available
The name of the entity set to resolve to a URI
An absolute URI for the entitySet or null
Gets the ResolveEntitySet value.
This property returns the baseUri value with no validation at all
NOTE: this property should only be used to show the user what the BaseUri value is, all
other access should go through the GetBaseUriWithSlash() method
the baseUri value
Gets the base URI of the resolver regardless of whether or not it is null.
static utility functions for uris
forward slash char array for triming uris
Turn Uri instance into string representation
This is needed because Uri.ToString unescapes the string
The uri instance
The string representation of the uri
new Uri(string uriString, UriKind uriKind)
value
kind
new Uri(value, kind)
new Uri(Uri baseUri, Uri requestUri)
baseUri
relativeUri
new Uri(baseUri, requestUri)
Appends the absolute baseUri with the relativeUri to create a new absolute uri
An absolute Uri
A relative Uri
An absolute Uri that is the combination of the base and relative Uris passed in.
Component for controlling what convention set is used for generating URLs.
Singleton instance of the default conventions.
Singleton instance of the key-as-segment conventions.
The key serializer to use.
The url convention to use.
Prevents a default instance of the class from being created.
The url convention to use.
Appends the key expression for the given entity to the given
The entity to build the key expression from.
The builder to append onto.
Appends the key expression for the given entity to the given
The type of the properties.
The properties of the key.
Delegate to get the name of a property.
Delegate to get the value of a property.
The builder to append onto.
Adds the required headers for the url convention.
The request headers to add to.
Gets the raw CLR value for the given .
The property to get the value for.
The type which declared the property.
The raw CLR value of the property.
An instance of which uses default URL conventions. Specifically, this instance will produce keys that use parentheses like "Customers('ALFKI')".
An instance of which uses key-as-segment URL conventions. Specifically, this instance will produce keys that use segments like "Customers/ALFKI".
static utility function
String Suffix on outgoing version numbers
Tool name for the GeneratedCode attribute used by Astoria CodeGen
Method name for the LoadProperty method.
Method name for the Execute method.
Method name for the Async Execute method overload which expects void result.
Method name for the SaveChanges method.
Empty Data Service Version - represents a blank DSV header
Data Service Version 1
Data Service Version 2
Data Service Version 3
Data service versions supported on the client
static char[] for indenting whitespace when tracing xml
Converts the DataServiceProtocolVersion to a Version instance.
The max protocol version value.
The same version expressed as Version instance.
DebugInjectFault is a test hook to inject faults in specific locations. The string is the ID for the location
The injector state parameter
Checks the argument value for null and throw ArgumentNullException if it is null
type of the argument to prevent accidental boxing of value types
argument whose value needs to be checked
name of the argument
if value is null
value
Checks the string value is not empty
value to check
parameterName of public function
if value is null
if value is empty
Checks the string value is not empty, but allows it to be null
value to check
parameterName of public function
if value is empty
Checks the array value is not empty
type of the argument to prevent accidental boxing of value types
value to check
parameterName of public function
if value is null
if value is empty or contains null elements
Validate MergeOption
option to validate
name of the parameter being validated
if option is not valid
option
Validate MaxProtocolVersion
version to validate
name of the parameter being validated
if version is not valid
version
Validate HttpStack
option to validate
name of the parameter being validated
if option is not valid
option
get char[] for indenting whitespace when tracing xml
how many characters to trace
char[]
dispose of the object and set the reference to null
type that implements IDisposable
object to dispose
dispose of the object
type that implements IDisposable
object to dispose
Checks whether the exception type is one of the DataService*Exception
exception to test
true if the exception type is one of the DataService*Exception
validate value is non-null
type of value
value
error code to throw if null
the non-null value
check the atom:null="true" attribute
XmlReader
true of null is true
Set the continuation for the following results for a collection.
The collection to set the links to
The continuation for the collection.
Determines if the current type is nullable or not
The type parameter.
true if its nullable false otherwise
Similar to Activator.CreateInstance, but uses LCG to avoid
more stringent Reflection security constraints.in Silverlight
Type to create.
Arguments.
The newly instantiated object.
Similar to ConstructorInfo.Invoke, but uses LCG to avoid
more stringent Reflection security constraints in Silverlight
Constructor to invoke.
Arguments.
The newly instantiated object.
checks whether the given flag is set on the options
options as specified by the user.
whether the given flag is set on the options
true if the given flag is set, otherwise false.
checks whether any batch flag is set on the options
options as specified by the user.
true if the given flag is set, otherwise false.
checks whether the batch flag is set on the options for the single changeset
options as specified by the user.
true if the given flag is set, otherwise false.
checks whether the batch flag with independent Operation per change set is set
options as specified by the user.
true if the given flag is set, otherwise false.
modified or unchanged
state to test
true if modified or unchanged
trace Element node
XmlReader
TextWriter
trace EndElement node
XmlReader
TextWriter
indent or not
trace string value
TextWriter
value
Converts the given IEnumerable into IEnumerable
Type parameter.
IEnumerable which contains the list of the objects that needs to be converted.
Delegate to use to convert the value.
An instance of IEnumerable which contains the converted values.
Given a enumeration returns the instance with the same version number.
The protocol version enum value to convert.
The version instance with the version number for the specified protocol version.
A workaround to a problem with FxCop which does not recognize the CheckArgumentNotNull method
as the one which validates the argument is not null.
This has been suggested as a workaround in msdn forums by the VS team. Note that even though this is production code
the attribute has no effect on anything else.
The represents the runtime context of the data service.
string constant for the 'serviceRoot' parameter to UriResolver
Same version as but stored as instance of for easy comparisons.
The client model for the current context instance.
The tracker for user-specified format information.
The maximum protocol version the client should support (send and receive).
Class which tracks all the entities and links for the given context
The response preference for add and update operations
The resolver for baseUris
Authentication interface for retrieving credentials for Web client authentication.
Override the namespace used for the data parts of the ATOM entries
resolve type from a typename
resolve typename from a type
time-out value in seconds, 0 for default
whether to use post-tunneling for PUT/DELETE
Options when deserializing properties to the target type.
Used to specify a value synchronization strategy.
Default options to be used while doing savechanges.
Override the namespace used for the scheme in the category for ATOM entries.
Client will ignore 404 resource not found exception and return an empty set when this is set to true
The URL conventions to use.
The HTTP stack to use for requests.
Test hook which gets called after the HttpWebRequest has been created and all headers have been set.
Test hook which gets called after we call HttpWebRequest.GetRequestStream, so that the test code can wrap the stream and see what gets written to it.
Test hook which gets called after the HttpWebResponse is received.
Test hook which gets called after we call HttpWebRequest.GetResponseStream, so that the test code can wrap the stream and see what gets read from it.
A flag indicating if the data service context is applying changes
Initializes a new instance of the class.
It is expected that the BaseUri or ResolveEntitySet properties will be set before using the newly created context.
Initializes a new instance of the class with the specified .
An absolute URI that identifies the root of a data service.
When the is null.
If the is not an absolute URI -or-If the is a well formed URI without a query or query fragment.
The library expects the Uri to point to the root of a data service,
but does not issue a request to validate it does indeed identify the root of a service.
If the Uri does not identify the root of the service, the behavior of the client library is undefined.
A Uri provided with a trailing slash is equivalent to one without such a trailing character.
With Silverlight, the can be a relative Uri
that will be combined with System.Windows.Browser.HtmlPage.Document.DocumentUri.
Initializes a new instance of the class with the specified and targeting the specific .
An absolute URI that identifies the root of a data service.
A value that is the maximum protocol version that the client understands.
The library expects the Uri to point to the root of a data service,
but does not issue a request to validate it does indeed identify the root of a service.
If the Uri does not identify the root of the service, the behavior of the client library is undefined.
A Uri provided with a trailing slash is equivalent to one without such a trailing character.
With Silverlight, the can be a relative Uri
that will be combined with System.Windows.Browser.HtmlPage.Document.DocumentUri.
Instantiates a new context with the specified Uri.
The library expects the Uri to point to the root of a data service,
but does not issue a request to validate it does indeed identify the root of a service.
If the Uri does not identify the root of the service, the behavior of the client library is undefined.
An absolute, well formed http or https URI without a query or fragment which identifies the root of a data service.
A Uri provided with a trailing slash is equivalent to one without such a trailing character
max protocol version that the client understands.
The client edm model to use. Provided for testability.
If the is not a valid value.
With Silverlight, the can be a relative Uri
that will be combined with System.Windows.Browser.HtmlPage.Document.DocumentUri.
Gets the for the supplied entity object.
The instance for the , or null if an does not exist for the object.
The object for which to return the entity descriptor.
Gets the for a specific link that defines the relationship between two entities.
The instance for the specified relationship, or null if a does not exist for the relationship.
Source object in the link
The name of the navigation property on the object that returns the related object.
The related entity.
Attempts to cancel the operation that is associated with the supplied object.
The object from the operation being canceled.
DataServiceContext is not safe to use until asyncResult.IsCompleted is true.
Creates a data service query for data of a specified generic type.
A new instance that represents a data service query.
A string that resolves to a URI.
The type returned by the query
create a query based on (BaseUri + relativeUri)
Gets a URI of the location of .edmx metadata.
A URI that identifies the location of the metadata description, in .edmx format, for the data service identified by the base URI that is passed to the constructor.
Asynchronously loads the value of the specified property from the data service.
An IAsyncResult that represents the status of the asynchronous operation.
The entity that contains the property to load.
The name of the property on the specified entity to load.
The delegate called when a response to the request is received.
The user-defined state object that is used to pass context data to the callback method.
actually doesn't modify the property until EndLoadProperty is called.
Asynchronously loads a page of related entities from the data service by using the supplied next link URI.
An object that is used to track the status of the asynchronous operation.
The entity that contains the property to load.
The name of the property of the specified entity to load.
The URI used to load the next results page.
Delegate to invoke when results are available for client consumption.
User-defined state object passed to the callback.
Asynchronously loads the next page of related entities from the data service by using the supplied query continuation object.
An that represents the status of the operation.
The entity that contains the property to load.
The name of the property of the specified entity to load.
A object that represents the next page of related entity data to return from the data service.
Delegate to invoke when results are available for client consumption.
User-defined state object passed to the callback.
Called to complete the operation.
The response to the load operation.
An that represents the status of the asynchronous operation.
Loads deferred content for a specified property from the data service.Not supported by the WCF Data Services 5.0 client for Silverlight.
The response to the load operation.
The entity that contains the property to load.
The name of the property of the specified entity to load.
If is in in detached or added state, this method will throw an InvalidOperationException
since there is nothing it can load from the server.
If is in unchanged or modified state, this method will load its collection or
reference elements as unchanged with unchanged bindings.
If is in deleted state, this method will load the entities linked to by its collection or
reference property in the unchanged state with bindings in the deleted state.
Loads a page of related entities by using the supplied next link URI.Not supported by the WCF Data Services 5.0 client for Silverlight.
An instance of that contains the results of the request.
The entity that contains the property to load.
The name of the property of the specified entity to load.
The URI that is used to load the next results page.
When is in a or state.
If is in in detached or added state, this method will throw an InvalidOperationException
since there is nothing it can load from the server.
If is in unchanged or modified state, this method will load its collection or
reference elements as unchanged with unchanged bindings.
If is in deleted state, this method will load the entities linked to by its collection or
reference property in the unchanged state with bindings in the deleted state.
Loads the next page of related entities from the data service by using the supplied query continuation object.Not supported by the WCF Data Services 5.0 client for Silverlight.
The response that contains the next page of related entity data.
The entity that contains the property to load.
The name of the property of the specified entity to load.
A object that represents the next page of related entities to load from the data service.
When is in the or state.
If is in in detached or added state, this method will throw an InvalidOperationException
since there is nothing it can load from the server.
If is in unchanged or modified state, this method will load its collection or
reference elements as unchanged with unchanged bindings.
If is in deleted state, this method will load the entities linked to by its collection or
reference property in the unchanged state with bindings in the deleted state.
Loads the next page of related entities from the data service by using the supplied generic query continuation object.Not supported by the WCF Data Services 5.0 client for Silverlight.
The response that contains the next page of related entity data.
The entity that contains the property to load.
The name of the property of the specified entity to load.
A object that represents the next page of related entities to load from the data service.
Element type of collection to load.
When is in the or state.
If is in in detached or added state, this method will throw an InvalidOperationException
since there is nothing it can load from the server.
If is in unchanged or modified state, this method will load its collection or
reference elements as unchanged with unchanged bindings.
If is in deleted state, this method will load the entities linked to by its collection or
reference property in the unchanged state with bindings in the deleted state.
Gets the URI that is used to return a binary data stream.
The read URI of the binary data stream.
The entity that has a related binary stream to retrieve.
If the entity specified is null.
The is not tracked by this .
If the specified entity is a Media Link Entry, this method will return an URI which can be used to access the content of the Media Resource. This URI should only be used to GET/Read the content of the MR. It may not respond to POST/PUT/DELETE requests.
Gets the URI that is used to return a named binary data stream.
The read URI of the binary data stream.
The entity that has the named binary data stream to retrieve.
The name of the stream to request.
If the specified entity has a stream with the given name, this method will return an URI which can be used to access the content of the stream. This URI should only be used to GET/Read the content of the stream. It may not respond to POST/PUT/DELETE requests.
If the entity specified is null.
If the name parameter is empty or the entity specified is not being tracked.
Asynchronously gets the binary data stream that belongs to the specified entity, by using the specified message headers.
An object that is used to track the status of the asynchronous operation.
The entity that has a the binary data stream to retrieve.
Instance of the class that contains settings for the HTTP request message.
Delegate to invoke when results are available for client consumption.
User-defined state object passed to the callback.
Any of the parameters supplied to the method is null.
The is not tracked by this .-or-The is in the state.-or-The is not a Media Link Entry and does not have a related binary data stream.
Asynchronously gets a named binary data stream that belongs to the specified entity, by using the specified message headers.
An object that is used to track the status of the asynchronous operation.
The entity that has the binary data stream to retrieve.
The name of the binary stream to request.
Instance of the class that contains settings for the HTTP request message.
Delegate to invoke when results are available for client consumption.
User-defined state object passed to the callback.
Called to complete the asynchronous operation of retrieving a binary data stream.
An instance of which contains the response stream along with its metadata.
The result from the operation that contains the binary data stream.
The method will block if the request have not finished yet.
Gets the binary data stream that belongs to the specified entity.
An instance of that represents the response.
The entity that has the binary stream to retrieve.
The is null.
The is not tracked by this .-or-The is in the state.-or-The is not a Media Link Entry and does not have a related binary stream.
Gets the binary data stream that belongs to the specified entity, by using the specified Content-Type message header.
An instance of that represents the response.
The entity that has the binary data stream to retrieve.
The Content-Type of the binary data stream requested from the data service, specified in the Accept header.
is null.-or- is null.
The is not tracked by this .-or-The is in the state.-or-The is not a Media Link Entry and does not have a related stream.
Gets binary data stream for the specified entity by using the specified message headers.
An instance of that represents the response.
The entity that has the binary stream to retrieve.
Instance of class that contains settings for the HTTP request message.
is null.-or- is null.
The is not tracked by this .-or-The is in the state.-or-The is not a Media Link Entry and does not have a related binary stream.
Gets a named binary data stream that belongs to the specified entity, by using the specified Content-Type message header.
An instance of that represents the response.
The entity that has the binary data stream to retrieve.
The name of the binary stream to request.
Instance of class that contains settings for the HTTP request message.
Either entity or args parameters are null.
The specified entity is either not tracked, is in the added state.
Sets a binary data stream that belongs to the specified entity, with the specified Content-Type and Slug headers in the request message.
The entity to which the data stream belongs.
The from which to read the binary data.
A value that determines whether the data stream is closed when the method is completed.
The Content-Type header value for the request message.
The Slug header value for the request message.
Any of the parameters supplied to the method are null.
The is not being tracked by this instance. -or-The entity has the applied.
Calling this method marks the entity as media link resource (MLE). It also marks the entity as modified
so that it will participate in the next call to SaveChanges.
Sets a binary data stream for the specified entity, with the specified headers in the request message.
The entity to which the binary stream belongs.
The from which to read the binary data.
A value that determines whether the data stream is closed when the method is completed.
An instance of the class that contains settings for the HTTP request message.
Any of the parameters supplied to the method are null.
The is not being tracked by this instance. -or-The has the applied.
Calling this method marks the entity as media link resource (MLE). It also marks the entity as modified
so that it will participate in the next call to SaveChanges.
Sets a binary data stream for the specified entity.
The entity to which the binary stream belongs.
The name of the binary stream to save.
The from which to read the binary data.
A value that determines whether the data stream is closed when the method is completed.
The Content-Type header value for the request message.
The entity is not being tracked or name is an empty string.
Any of the arguments is null.
Sets a named binary data stream that belongs to the specified entity, with the specified headers in the request message.
The entity to which the binary stream belongs.
The name of the binary stream to save.
The from which to read the binary data.
A value that determines whether the data stream is closed when the method is completed.
An instance of the class that contains settings for the HTTP request message.
Calling this method marks the entity as media link resource (MLE). It also marks the entity as modified
so that it will participate in the next call to SaveChanges.
The entity is not being tracked. The entity has the MediaEntry attribute
marking it to use the older way of handling MRs.
Any of the arguments is null.
Asynchronously submits a group of queries as a batch to the data service.
An object that is used to track the status of the asynchronous operation.
The delegate that is called when a response to the batch request is received.
User-defined state object that is used to pass context data to the callback method.
The array of query requests to include in the batch request.
Called to complete the .
The DataServiceResult object that indicates the result of the batch operation.
An that represents the status of the asynchronous operation.
Synchronously submits a group of queries as a batch to the data service.Not supported by the WCF Data Services 5.0 client for Silverlight.
The response to the batch operation.
Array of objects that make up the queries.
Asynchronously sends the request so that this call does not block processing while waiting for the results from the service.
An object that is used to track the status of the asynchronous operation.
The URI to which the query request will be sent. The URI may be any valid data service URI; it can contain $ query parameters.
Delegate to invoke when results are available for client consumption.
User-defined state object passed to the callback.
The type returned by the query.
Asynchronously sends a request to the data service to execute a specific URI.
The result of the operation.
The URI to which the query request will be sent.
Delegate to invoke when results are available for client consumption.
User-defined state object passed to the callback.
The HTTP data transfer method used by the client.
The operation parameters used.
This overload expects the to end with a ServiceOperation
or ServiceAction that returns void.
Asynchronously sends a request to the data service to execute a specific URI.
The result of the operation.
The URI to which the query request will be sent.
Delegate to invoke when results are available for client consumption.
User-defined state object passed to the callback.
The HTTP data transfer method used by the client.
Attribute used on service operations to specify that they return a single instance of their return element.
The operation parameters used.
The type returned by the query.
Asynchronously sends a request to the data service to retrieve the next page of data in a paged query result.
An that represents the status of the operation.
A object that represents the next page of data to return from the data service.
Delegate to invoke when results are available for client consumption.
User-defined state object passed to the callback.
The type returned by the query.
Called to complete the .
The results returned by the query operation.
object.
The type returned by the query.
When is null.
When did not originate from this instance. -or- When the method was previously called.
When an error is raised either during execution of the request or when it converts the contents of the response message into objects.
When the data service returns an HTTP 404: Resource Not Found error.
Called to complete the .
The result of the operation.
An that represents the status of the asynchronous operation.
This method should be used in combination with the BeginExecute overload which
expects the request uri to end with a service operation or service action that returns void.
Sends a request to the data service to execute a specific URI.Not supported by the WCF Data Services 5.0 client for Silverlight.
The results of the query operation.
The URI to which the query request will be sent. The URI may be any valid data service URI. Can contain $ query parameters.
The type that the query returns.
When a response is not received from a request to the .
When is null.
When is not a valid URI for the data service.
When an error is raised either during execution of the request or when it converts the contents of the response message into objects.
When the data service returns an HTTP 404: Resource Not Found error.
Sends a request to the data service to retrieve the next page of data in a paged query result.Not supported by the WCF Data Services 5.0 client for Silverlight.
The response that contains the next page of data in the query result.
A object that represents the next page of data to return from the data service.
The type returned by the query.
Sends a request to the data service to execute a specific URI by using a specific HTTP method.Not supported by the WCF Data Services 5.0 client for Silverlight.
The response of the operation.
The URI to which the query request will be sent. The URI may be any valid data service URI. Can contain $ query parameters.
The HTTP data transfer method used by the client.
The operation parameters used.
This overload expects the to end with a ServiceOperation
or ServiceAction that returns void.
null requestUri
The is not GET nor POST.
problem materializing results of query into objects
failure to get response for requestUri
Sends a request to the data service to execute a specific URI by using a specific HTTP method.Not supported by the WCF Data Services 5.0 client for Silverlight.
Returns .
The URI to which the query request will be sent. The URI may be any valid data service URI. Can contain $ query parameters.
The HTTP data transfer method used by the client.
Attribute used on service operations to specify that they return a single instance of their return element.
The operation parameters used.
The type returned by the query.
null requestUri
The is not GET nor POST.
problem materializing results of query into objects
failure to get response for requestUri
Asynchronously submits the pending changes to the data service collected by the since the last time changes were saved.
An IAsyncResult that represents the status of the asynchronous operation.
The delegate to call when the operation is completed.
The user-defined state object that is used to pass context data to the callback method.
Asynchronously submits the pending changes to the data service collected by the since the last time changes were saved.
An that represents the status of the asynchronous operation.
The options for how the client can save the pending set of changes.
The delegate to call when the operation is completed.
The user-defined state object that is used to pass context data to the callback method.
BeginSaveChanges will asynchronously attach identity Uri returned by server to sucessfully added entites.
EndSaveChanges will apply updated values to entities, raise ReadingEntity events and change entity states.
Called to complete the operation.
A object that indicates the result of the batch operation.
An that represents the status of the asynchronous operation.
Saves the changes that the is tracking to storage.Not supported by the WCF Data Services 5.0 client for Silverlight.
A that contains status, headers, and errors that result from the call to .
Saves the changes that the is tracking to storage.Not supported by the WCF Data Services 5.0 client for Silverlight.
A that contains status, headers, and errors that result from the call to .
A member of the enumeration that specifies the materialization option.
Adds the specified link to the set of objects the is tracking.
The source object for the new link.
The name of the navigation property on the source object that returns the related object.
The object related to the source object by the new link.
When , , or are null.
If a link already exists.-or-If either the or objects are in a or state.-or-If is not a collection.
Notifies the context that a new link exists between the and objects
and that the link is represented via the source. which is a collection.
The context adds this link to the set of newly created links to be sent to
the data service on the next call to SaveChanges().
Links are one way relationships. If a back pointer exists (ie. two way association),
this method should be called a second time to notify the context object of the second link.
Notifies the to start tracking the specified link that defines a relationship between entity objects.
The source object in the new link.
The name of the property on the source object that represents the link between the source and target object.
The target object in the link that is bound to the source object specified in this call. The target object must be of the type identified by the source property or a subtype.
When , , or is null.
When the link between the two entities already exists.-or-When or is in an or state.
Removes the specified link from the list of links being tracked by the .
Returns true if the specified entity was detached; otherwise false.
The source object participating in the link to be marked for deletion.
The name of the property on the source object that represents the source in the link between the source and the target.
The target object involved in the link that is bound to the source object. The target object must be of the type identified by the source property or a subtype.
When or are null.
When is an empty string.
Any link being tracked by the context, regardless of its current state, can be detached.
Changes the state of the link to deleted in the list of links being tracked by the .
The source object in the link to be marked for deletion.
The name of the navigation property on the source object that is used to access the target object.
The target object involved in the link that is bound to the source object. The target object must be of the type identified by the source property or a subtype.
When , , or is null.
When or is in a or state.-or-When is not a collection.
Notifies the context that a link exists between the and object
and that the link is represented via the source. which is a collection.
The context adds this link to the set of deleted links to be sent to
the data service on the next call to SaveChanges().
If the specified link exists in the "Added" state, then the link is detached (see DetachLink method) instead.
Notifies the that a new link exists between the objects specified and that the link is represented by the property specified by the parameter.
The source object for the new link.
The property on the source object that identifies the target object of the new link.
The child object involved in the new link that is to be initialized by calling this method. The target object must be a subtype of the type identified by the parameter. If is set to null, the call represents a delete link operation.
When , or are null.
When the specified link already exists.-or-When the objects supplied as or are in the or state.-or-When is not a navigation property that defines a reference to a single related object.
Notifies the context that a modified link exists between the and objects
and that the link is represented via the source. which is a reference.
The context adds this link to the set of modified created links to be sent to
the data service on the next call to SaveChanges().
Links are one way relationships. If a back pointer exists (ie. two way association),
this method should be called a second time to notify the context object of the second link.
Adds the specified object to the set of objects that the is tracking.
The name of the entity set to which the resource will be added.
The object to be tracked by the .
When or is null.
When is empty.-or-When does not have a key property defined.
When the entity is already being tracked by the context.
It does not follow the object graph and add related objects.
Any leading or trailing forward slashes will automatically be trimmed from entitySetName.
Adds a related object to the context and creates the link that defines the relationship between the two objects in a single request.
The parent object that is being tracked by the context.
The name of the navigation property that returns the related object based on an association between the two entities.
The related object that is being added.
Notifies the to start tracking the specified resource and supplies the location of the resource within the specified resource set.
The name of the set that contains the resource.
The resource to be tracked by the . The resource is attached in the Unchanged state.
When or is null.
When is an empty string.-or-When the does not have a key property defined.
When the is already being tracked by the context.
It does not follow the object graph and attach related objects.
Notifies the to start tracking the specified resource and supplies the location of the resource in the specified resource set.
The string value that contains the name of the entity set to which to the entity is attached.
The entity to add.
An etag value that represents the state of the entity the last time it was retrieved from the data service. This value is treated as an opaque string; no validation is performed on it by the client library.
When is null.-or-When is null.
When is an empty string.-or-When the supplied object does not have a key property.
When the supplied object is already being tracked by the context
It does not follow the object graph and attach related objects.
Changes the state of the specified object to be deleted in the .
The tracked entity to be changed to the deleted state.
When is null.
When the object is not being tracked by the .
Existings objects in the Added state become detached.
Removes the entity from the list of entities that the is tracking.
Returns true if the specified entity was detached; otherwise false.
The tracked entity to be detached from the .
When is null.
Changes the state of the specified object in the to .
The tracked entity to be assigned to the state.
When is null.
When is in the state.
Changes the state of the given entity.
Note that the 'Added' state is not supported by this method, and that AddObject or AddRelatedObject should be used instead.
If the state 'Modified' is given, calling this method is exactly equivalent to calling UpdateObject.
If the state 'Deleted' is given, calling this method is exactly equivalent to calling DeleteObject.
If the state 'Detached' is given, calling this method is exactly equivalent to calling Detach.
If the state 'Unchanged' is given, the state will be changed, but no other modifications will be made to the entity or entity descriptor associated with it.
The entity whose state to change.
The new state of the entity.
Test retrieval of an entity being tracked by the by reference to the URI of the entity.
If an entity is found at , the entity is returned in the out parameter and true is returned. If no entity is found, false is returned.
The URI of the tracked entity to be retrieved.
The entity to be retrieved.
The type of the entity.
When is null.
entities in added state are not likely to have a identity
Retrieves the canonical URI associated with the specified entity, if available.
Returns true if the canonical URI is returned in the out parameter. If the specified entity is not tracked by the or is in the added state, no URI is available and false is returned.
The entity identified by the .
The URI of the entity.
When is null.
Entities in added state are not likely to have an identity. Though the identity might use a dereferencable scheme, you MUST NOT assume it can be dereferenced.
Execute the using .
Element type of the result.
Request URI to execute.
HttpMethod to use. Only GET or POST are supported.
If set to true, indicates that a single result is expected as a response.
False indicates that a collection of TElement is assumed. Should be null for void, entry, and feed cases.
This function will check if TElement is an entity type and set singleResult to null in this case.
The operation parameters associated with the service operation.
A QueryOperationResponse that is enumerable over the results and holds other response information.
null requestUri
The is not GET nor POST.
problem materializing results of query into objects
failure to get response for requestUri
Begins the execution of the request uri based on the http method.
element type of the result
request to execute
User callback when results from execution are available.
user state in IAsyncResult
HttpMethod to use. Only GET and POST are supported.
async method name at the source.
If set to true, indicates that a single result is expected as a response.
The operation parameters associated with the service operation.
async result object
Track a binding.
Source resource.
Property on the source resource that relates to the target resource.
Target resource.
merge operation
Creates the OData request message to write the headers and payload into.
The arguments for creating the message.
List of header names that needs to be reset after calling SendingRequest event.
Descriptor to expose in SendingRequest2
An instance of IODataRequestMessage with the given headers and version.
user hook to resolve name into a type
name to resolve
Null if no type resolver is registered, otherwise returns whatever is returned by the type resolver.
The reverse of ResolveType, use for complex types and LINQ query expression building
client type
type for the server
Fires the WritingEntity event
Entity being serialized
XML data of the ATOM entry
The xml base of the feed or entry containing the current ATOM entry
Fires the SendingRequest event.
SendingRequestEventArgs instance containing all information about the request.
Fires the SendingRequest2 event.
SendingRequest2EventArgs instance containing all information about the request.
Fires the ReceivingResponse event.
Args instance containing information about the response.
This method wraps the HttpWebRequest.GetSyncronousResponse method call. The reasons for doing this are to give us a place
to invoke internal test hook callbacks that can validate the response headers, and also so that we can do
debug validation to make sure that the headers have not changed since they were originally configured on the request.
HttpWebRequest instance
If set to true, this method will only re-throw the WebException that was caught if
the response in the exception is null. If set to false, this method will always re-throw in case of a WebException.
Returns the HttpWebResponse from the wrapped GetSyncronousResponse method.
This method wraps the HttpWebRequest.EndGetResponse method call. The reason for doing this is to give us a place
to invoke internal test hook callbacks that can validate the response headers.
HttpWebRequest instance
Async result obtained from previous call to BeginGetResponse.
Returns the HttpWebResponse from the wrapped EndGetResponse method.
Invokes the sendRequest test hook callback with a reference to the HttpWebRequest
HttpWebRequest to provide in the callback.
Invokes the getRequestWrappingStream test hook callback, so that the test code can wrap the stream and see what gets written to it.
Underlying HTTP stream to be wrapped
If the test hook is being used, returns the stream provided by the callback, otherwise returns the original stream.
Invokes the sendResponse test hook callback with a reference to the HttpWebResponse
HttpWebResponse to provide in the callback.
Invokes the getResponseWrappingStream test hook callback, so that the test code can wrap the stream and see what gets read from it.
Underlying HTTP stream to be wrapped
If the test hook is being used, returns the stream provided by the callback, otherwise returns the original stream.
Gets an entity metadata builder to evaluate metadata which is not present in payloads, or for which the payload is not available.
Name of the entity set to which the entity belongs.
The entity to build metadata for.
A metadata builder for the entity tracked by the given entity instance.
This is used for example to determine the edit link for an entity if the payload didn't have one, or to determine the URL for a navigation when building a query through LINQ.
Fires the BuildingRequest event to get a new RequestMessageArgs object.
Http method for the request.
Base Uri for the request.
Http stack to use for the request.
Http stack to use for the request.
Descriptor for the request, if there is one.
A new RequestMessageArgs object for building the request message.
Determines the type that
Name of the type to resolve.
Namespace of the type.
Namespace of the type, can be different in VB than the fullNamespace.
Type that the name resolved to or null if none found.
Function was added for Portable Lib support to handle the differences in accessing the assembly of the context.
validate and trim leading and trailing forward slashes
resource name to validate
if entitySetName was null
if entitySetName was empty or contained only forward slash
validate is entity type
entity to validate
The client model.
if entity was null
if entity does not have a key property
Validates a given list of operation parameter and returns two seperated list of body operation parameter
and uri operation parameter respectively.
the http method used in the request. Only POST and GET http methods are supported with operation parameters.
The list of operation parameters to be validated.
The list of body operation parameters to be returned.
The list of uri operation parameters to be returned.
Verify that the format is set to Atom, and fail otherwise.
Fires the BuildingRequest event so the user can add custom query parameters.
Information about the request so they user can selectively add query parameters.
A new RequestMessageArgs object that contains any changes the user made to the query string.
Validate the SaveChanges Option
options as specified by the user.
Validate and process the input parameters to all the execute methods. Also seperates and returns
the input operation parameters list into two seperate list - one of body operation parameters and the other
for uri operation parameters.
element type. See Execute method for more details.
request to execute
HttpMethod to use. Only GET and POST are supported.
If set to true, indicates that a single result is expected as a response.
The list of body operation parameters to be returned.
The list of uri operation parameters to be returned.
The operation parameters associated with the service operation.
create the load property request
entity
name of collection or reference property to load
The AsyncCallback delegate.
user state
The request uri, or null if one is to be constructed
Continuation, if one is available.
a aync result that you can get a response from
verify the source and target are relatable
source Resource
source Property
target Resource
destination state of relationship to evaluate for
true if DeletedState and one of the ends is in the added state
if source or target are null
if source or target are not contained
if source property is null
if source property empty
Can only relate ends with keys.
If target doesn't match property type.
If adding relationship where one of the ends is in the deleted state.
If attaching relationship where one of the ends is in the added or deleted state.
This method creates an async result object around a request to get the read stream for a Media Resource
associated with the Media Link Entry represented by the entity object.
The entity which is the Media Link Entry for the requested Media Resource. Thist must specify
a tracked entity in a non-added state.
Instance of class with additional metadata for the request.
Must not be null.
User defined callback to be called when results are available. Can be null.
User state in IAsyncResult. Can be null.
name of the stream.
The async result object for the request, the request hasn't been started yet.
Either entity or args parameters are null.
The specified entity is either not tracked,
is in the added state or it's not an MLE.
Ensures that the required data service protocol version is lesser than the maxprotocolversion on this instance.
throws an invalidoperationexception if the max protocolversion is lesser than the required protocol version
Ensures that the maxprotocolversion on this instance is lesser than
The property being modified.
The max allowed dataserviceversion for modifying this property.
throws a NotSupportedException if the max protocolversion is greater than
Helper method for calling the overridable GetEntityMetadataBuilder API and performing common logic/verification.
The entity descriptor tracking the entity.
A metadata builder for the entity tracked by the given descriptor.
This method wraps the HttpWebRequest.GetSyncronousResponse method call. It fires the ReceivingResponse event.
It also gives us a place to invoke internal test hook callbacks that can validate the response headers, and also so that we can do
debug validation to make sure that the headers have not changed since they were originally configured on the request.
HttpWebRequest instance
IAsyncResult for EndGetResponse if this is an async call.
If set to true, this method will only re-throw the WebException that was caught if
the response in the exception is null. If set to false, this method will always re-throw in case of a WebException.
Returns the HttpWebResponse from the wrapped GetSyncronousResponse method.
Mark an existing object for update in the context.
entity to be mark for update
If true, then an exception should be thrown if the entity is in neither the unchanged nor modified states.
if entity is null
if entity is detached
if entity is not unchanged or modified and is true.
Mark an existing object being tracked by the context for deletion.
entity to be mark deleted
If true, then an exception will be thrown if the entity is in the added state.
if entity is null
if entity is not being tracked by the context, or if the entity is in the added state and is true.
Existings objects in the Added state become detached if is false.
Sets the entity's state to unchanged.
The entity to set back to unchanged.
Occurs when a new has been created.
This event is fired before a request is sent to the server, giving
the handler the opportunity to inspect, adjust and/or replace the
WebRequest object used to perform the request.
When calling BeginSaveChanges and not using SaveChangesOptions.Batch and SaveChangesOptions.BatchWithIndependentOperations,
this event may be raised from a different thread.
This event is fired before a request is sent to the server, giving
the handler the opportunity to inspect, adjust and/or replace the
WebRequest object used to perform the request.
When calling BeginSaveChanges and not using SaveChangesOptions.Batch and SaveChangesOptions.BatchWithIndependentOperations,
this event may be raised from a different thread.
This event is fired before a request message object is built, giving
the handler the opportunity to inspect, adjust and/or replace some
request information before the message is built. This event should be
used to modify the outgoing Url of the request or alter request headers.
After the request is built, other modifications on the WebRequest object can be made
in SendingRequest2.
When calling BeginSaveChanges and not using SaveChangesOptions.Batch and SaveChangesOptions.BatchWithIndependentOperations,
this event may be raised from a different thread.
Occurs after entity data has been completely read into the entity object.
This event fires once an entry has been read into a .NET object
but before the serializer returns to the caller, giving handlers
an opporunity to read further information from the incoming ATOM
entry and updating the object.
This event should only be raised from the thread that was used to
invoke Execute, EndExecute, SaveChanges, EndSaveChanges.
This event fires when a response is received by the client.
It fires for both top level responses and each operation or query within a batch response.
On top level requests, the event is fired before any processing is done.
For inner batch operations, the event is also fired before any processing is done, with
the exception that the content-ID of a changeset operation will be read before the event is fired.
Occurs after an entity has been fully serialized into XML in a request message.
This event fires once an ATOM entry is ready to be written to
the network for a request, giving handlers an opportunity to
customize the entry with information from the corresponding
.NET object or the environment.
When calling BeginSaveChanges and not using SaveChangesOptions.Batch and SaveChangesOptions.BatchWithIndependentOperations,
this event may be raised from a different thread.
This event fires when SaveChanges or EndSaveChanges is called
Internal event instance used by the public SendingRequest event.
Internal event instance used by the public BuildingRequest event.
Internal event instance used by the public WritingEntity event.
Gets or sets the delegate method that is used to resolve the entity set URI when the value cannot be determined from an edit-link or self-link URI.
A delegate that takes a and returns a value.
Gets the absolute URI identifying the root of the target data service.
An absolute URI that identifies the root of a T data service.
A Uri provided with a trailing slash is equivalent to one without such a trailing character.
Example: http://server/host/myservice.svc
Gets or sets whether the client requests that the data service return entity data in the response message to a change request.
A object that determines whether to request a response form the data service.
Whether POST/PUT/MERGE requests will process response from the server. Corresponds to Prefer header in HTTP POST/PUT/MERGE request.
Gets the maximum version of the Open Data Protocol (OData) that the client is allowed to use.
The maximum version of OData that the client is allowed to use.
If the request or response would require higher version the client will fail.
Gets or sets the authentication information that is used by each query created by using the object.
The base authentication interface for retrieving credentials for Web client authentication.
Gets or sets the synchronization option for receiving entities from a data service.
One of the members of the enumeration.
Used to specify a synchronization strategy when sending/receiving entities to/from a data service.
This value is read by the deserialization component of the client prior to materializing objects.
As such, it is recommended to set this property to the appropriate materialization strategy
before executing any queries/updates to the data service.
The default value is .AppendOnly.
Gets a value that indicates whether the is currently applying changes to tracked objects.
Returns true when changes are currently being applied; otherwise returns false.
Gets or sets whether the properties read from the type must be mapped to properties on the client-side type.
A Boolean value that indicates whether the properties read from the type must be mapped to properties on the client-side type.
This also affects responses during SaveChanges.
Gets or sets the XML namespace for data items, not metadata items, of an Atom payload.
A string representing the XML namespace for data items of a payload in the ATOM format.
Gets or sets a function to override the default type resolution strategy used by the client library when you send entities to a data service.
Returns a string that contains the name of the .
Enables one to override the default type resolution strategy used by the client library.
Set this property to a delegate which identifies a function that resolves
a type within the client application to a namespace-qualified type name.
This enables the client to perform custom mapping between the type name
provided in a response from the server and a type on the client.
This method enables one to override the entity name that is serialized
to the target representation (ATOM,JSON, etc) for the specified type.
Gets or sets a function that is used to override the default type resolution option that is used by the client library when receiving entities from a data service.
A function delegate that identifies an override function that is used to override the default type resolution option that is used by the client library.
Enables one to override the default type resolution strategy used by the client library.
Set this property to a delegate which identifies a function that resolves a
namespace-qualified type name to type within the client application.
This enables the client to perform custom mapping between the type name
provided in a response from the server and a type on the client.
Overriding type resolution enables inserting a custom type name to type mapping strategy.
It does not enable one to affect how a response is materialized into the identified type.
Gets or sets the time-out option (in seconds) that is used for the underlying HTTP request to the data service.
An integer that indicates the time interval (in seconds) before time-out of a service request.
A value of 0 will use the default timeout of the underlying HTTP request.
This value must be set before executing any query or update operations against
the target data service for it to have effect on the on the request.
The value may be changed between requests to a data service and the new value
will be picked up by the next data service request.
Gets or sets the URI used to indicate what type scheme is used by the service.
A object that contains the type scheme.
Gets or sets a Boolean value that indicates whether to use post tunneling.
A Boolean value that indicates whether to use post tunneling.
Gets the collection of all associations or links currently being tracked by the object.
A collection of objects that represent all associations or links current being tracked by the current being tracked by the object.
If no links are being tracked, a collection with 0 elements is returned.
Gets a list of all the resources currently being tracked by the .
A list of objects that represent all the resources currently being tracked by the .
If no resources are being tracked, a collection with 0 elements is returned.
Gets or sets the values that are used by the method.
The current options for the save changes operation.
Gets or sets whether an exception is raised when a 404 error (resource not found) is returned by the data service.
When set to true, the client library returns an empty set instead of raising a when the data service returns an HTTP 404: Resource Not Found error.
Gets the configurations.
Gets an object which allows the user to customize the format the client will use for making requests.
Gets or sets the URL conventions the client should use.
Gets or sets a System.Boolean value that controls whether default credentials are sent with requests.
Gets a value that indicates the type of HTTP implementation to use when accessing the data service in Silverlight.
A value that indicates the HTTP implementation to use when accessing the data service.
Default value is HttpStack.Auto
Indicates if there are subscribers for the WritingEntity event
True if any event handlers are registered for events that are only supported with Atom.
Indicates if there are subscribers for the SendingRequest event.
We do not fire SendingRequest event if there are subscribers to SendingRequest2 event.
Indicates if there are subscribers for the SendingRequest2 event.
INdicates if there are any subscribers for the BuildingRequestEvent.
Returns the instance of entity tracker which tracks all the entities and links tracked by the context.
The tracker for user-specified format information.
Returns the instance of entity tracker which tracks all the entities and links tracked by the context.
Gets the client model.
Cache for client edm models by version.
A cache that maps a data service protocol version to its corresponding .
Note that it is initialized in a static ctor and must not be changed later to avoid threading issues.
Static constructor used to initialize modelCache.
Get the cached model for the specified max protocol version.
The to get the cached model for.
The cached model for the .
query object
type of object to materialize
Method info for the v1 Expand method.
Method info for the generic version of the Expand method
Linq Expression
Linq Query Provider
Uri, Projection, Version for translated query
query object
expression for query
query provider for query
Starts an asynchronous network operation that executes the query represented by this object instance.
An that represents the status of the asynchronous operation.
The delegate to invoke when the operation completes.
User defined object used to transfer state between the start of the operation and the callback defined by .
Ends an asynchronous query request to a data service.
Returns an that contains the results of the query operation.
The pending asynchronous query request.
When the data service returns an HTTP 404: Resource Not Found error.
Executes the query and returns the results as a collection that implements IEnumerable.Not supported by the WCF Data Services 5.0 client for Silverlight.
An in which TElement represents the type of the query results.
When the data service returns an HTTP 404: Resource Not Found error.
When during materialization an object is encountered in the input stream that cannot be deserialized to an instance of TElement.
Expands a query to include entities from a related entity set in the query response.
A new query that includes the requested $expand query option appended to the URI of the supplied query.
The expand path in the format Orders/Order_Details.
Expands a query to include entities from a related entity set in the query response, where the related entity is of a specific type in a type hierarchy.
Returns a that with the expand option included.
A lambda expression that indicates the navigation property that returns the entity set to include in the expanded query.
Target type of the last property on the expand path.
Requests that the count of all entities in the entity set be returned inline with the query results.
A new object that has the inline count option set.
Creates a new with the query option set in the URI generated by the returned query.
A new query that includes the requested query option appended to the URI of the supplied query
The string value that contains the name of the query string option to add.
The object that contains the value of the query string option.
Executes the query and returns the results as a collection.
A typed enumerator over the results in which TElement represents the type of the query results.
Represents the URI of the query to the data service.
A URI as string that represents the query to the data service for this instance.
Executes the query and returns the results as a collection.
An enumerator over the query results.
gets the UriTranslateResult for a the query
The client model.
an instance of QueryComponents.
Synchronous methods not available
Returns an IEnumerable from an Internet resource.
An IEnumerable that contains the response from the Internet resource.
Begins an asynchronous request to an Internet resource.
The AsyncCallback delegate.
The state object for this request.
An IAsyncResult that references the asynchronous request for a response.
Ends an asynchronous request to an Internet resource.
The pending request for a response.
An IEnumerable that contains the response from the Internet resource.
gets the query components for the query after translating
QueryComponents for query
Returns the type of the object used in the template to create the instance.
Returns representing the type used in the template when the query is created.
Represents an expression containing the query to the data service.
A object representing the query.
Represents the query provider instance.
A representing the data source provider.
Get the URI for the query.
The URI of the request.
The ProjectionPlan for the request (if precompiled in a previous page).
Context associated with this query.
Ordered DataServiceQuery which implements IOrderedQueryable.
constructor
expression for query
query provider for query
web utility functions
Default buffer size used for stream copy.
Whether DataServiceCollection<> type is available.
Method info for GetDefaultValue<T>.
copy from one stream to another
input stream
output stream
reusable buffer
count of copied bytes
get response object from possible WebException
exception to probe
http web respose object from exception
an instance of InvalidOperationException.
is this a success status code
status code
true if status is between 200-299
Checks if the provided type is a collection type (i.e. it implements ICollection and the collection item type is not an entity).
Type being checked.
The client model.
True if the CLR type is a collection compatible type. False otherwise.
Checks if the provided type name is a name of a collection type.
Type name read from the payload.
true if is a name of a collection type otherwise false.
Returns collection item type name or null if the provided type name is not a collection.
Collection type name read from payload.
Collection item type name or null if not a collection.
Resolves and creates if necessary a backing type for the .
Type of a collection property as defined by the user - can be just an interface or generic type.
Type of items stored in the collection.
Resolved concrete type that can be instantiated and will back the collection property. Can be the type.
Checks the argument value for null and throw ArgumentNullException if it is null
type of the argument
argument whose value needs to be checked
name of the argument
returns the argument back
Checks if the collection is valid. Throws if the collection is not valid.
The type of the collection item. Can not be null.
Collection instance to be validated.
The name of the property being serialized (for exception messages). Can be null if the type is not a property.
Checks if the value of a collection item is valid. Throws if it finds the value invalid.
The value of the collection item.
This method should be called first to validate all items in a collection regardless of their type.
Checks if the value of a primitive collection item is valid. Throws if it finds the value invalid.
The value of the collection item.
The name of the collection property being serialized. Can be null.
The type of the collection item as declared by the collection.
Checks if the value of a complex collection item is valid. Throws if it finds the value invalid.
The value of the collection item.
The name of the collection property being serialized. Can be null if the type is not a property.
The type of the collection item as declared by the collection.
Validates the value of the identity, the atom:id or DataServiceId
The value to validate
Validates the value of the 'Location' response header.
the value as seen on the wire.
an absolute uri or
Determines the value of the Prefer header based on the response preference settings. Also modifies the request version as necessary.
The response preference setting for the request.
The request version so far, this might be modified (raised) if necessary due to response preference being applied.
The value of the Prefer header to apply to the request.
Raises the version specified to the new minimal version (if it's lower than the current one)
The version to be raised.
The minimal version needed.
Checks if the given type is DataServiceCollection<> type.
Type to be checked.
true if the provided type is DataServiceCollection<> or false otherwise.
Creates an instance of DataServiceCollection<> class using provided types.
Types to be used for creating DataServiceCollection<> object.
Instance of DataServiceCollection<> class created using provided types or null if DataServiceCollection<>
type is not avaiable.
Returns the default value for the given type
type to get the default value
returns the default value for .
Returns the default value for the given type
type to get the default value
returns the default value for .
Dispose the message if it implements IDisposable.
IODataResponseMessage to dispose.
Forces loading WindowsBase assembly. If WindowsBase assembly is not present JITter will throw an exception.
This method MUST NOT be inlined otherwise we won't be able to catch the exception by JITter in the caller.
typeof(DataServiceCollection<>)
Returns true if DataServiceCollection<> type is available or false otherwise.
A workaround to a problem with FxCop which does not recognize the CheckArgumentNotNull method
as the one which validates the argument is not null.
This has been suggested as a workaround in msdn forums by the VS team. Note that even though this is production code
the attribute has no effect on anything else.
Represents an EDM property for client types and caches methods for the propertyInfo.
Back reference to the EdmProperty this annotation is part of.
property name for debugging
Exact property type; possibly nullable but not necessarily so.
type of the property
what is the dictionary value type
what type was this property declared on?
Is this a known primitive/reference type or an entity/complex/collection type?
property getter
property setter
"set_Item" method supporting IDictionary properties
"Add" method supporting ICollection<> properties
"Remove" method supporting ICollection<> properties
"Contains" method supporting ICollection<> properties
"Clear" method supporting ICollection<> properties
ICollection<> generic type
cached value for IsPrimitiveOrComplexCollection property
cached value of IsGeographyOrGeometry property
The other property in this type that holds the MIME type for this one
constructor
Back reference to the EdmProperty this annotation is part of.
propertyInfo instance.
The client model.
get property value from an object
object to get the property value from
property value
remove a item from the collection instance
collection
item to remove
set property value on an object
object to set the property value on
property value
used for open type
allow add to a collection if available, else allow setting collection property
Clears .
ICollection instance that needs to be cleared.
Adds value to a collection.
ICollection Instance to add to.
Value to be added to .
Gets the client model.
The other property in this type that holds the MIME type for this one
what is the nested collection element
Is this property a collection of entities?
Type of items in the primitive or complex collection.
Is this property a collection of primitive or complex types?
Returns true if the type of property is a Geography or Geometry type, otherwise returns false.
Is this property a dictionary?
Returns true if this property is a stream link property, otherwise false.
Utility methods for client types.
A static empty PropertyInfo array.
Sets the single instance of on the given instance of .
The model the belongs to.
IEdmType instance to set the annotation on.
The annotation to set
Gets the ClientTypeAnnotation for the given type.
The model.
Type for which the annotation needs to be returned.
An instance of ClientTypeAnnotation containing metadata about the given type.
Gets the single instance of from the given instance of .
The model the belongs to.
IEdmType instance to get the annotation.
Returns the single instance of from the given instance of .
Sets the given instance of to the given instance of .
IEdmProperty instance to set the annotation.
Annotation instance to set.
Gets the single instance of ClientPropertyAnnotation from the given instance of .
The model.
IEdmProperty instance to get the annotation.
Returns the single instance of ClientPropertyAnnotation from the given instance of .
Gets the instance of ClientTypeAnnotation from the given instance of .
The model.
IEdmProperty instance to get the annotation.
Returns the instance of ClientTypeAnnotation from the given instance of .
Returns the corresponding edm type reference for the given edm type.
EdmType instance.
A boolean value indicating whether the clr type of this edm type is nullable
Returns the corresponding edm type reference for the given edm type.
Returns the full name for the given edm type
EdmType instance.
the full name of the edmType.
Returns MethodInfo instance for a generic type retrieved by using and gets
element type for the provided .
starting type
the generic type definition to find
the method to search for
the element type for if found
element types
Gets a delegate that can be invoked to add an item to a collection of the specified type.
Type of list to use.
The delegate to invoke.
Gets the Add method to add items to a collection of the specified type.
Type for the collection.
The element type in the collection if found; null otherwise.
The method to invoke to add to a collection of the specified type.
get concrete type that implements the genericTypeDefinition
starting type
the generic type definition to find
concrete type that implementats the generic type
Is the type an Entity Type?
Type to examine
The client model.
bool indicating whether or not entity type
Is the type or element type (in the case of nullableOfT or IEnumOfT) a Entity Type?
Type to examine
bool indicating whether or not entity type
Checks whether the specified type is a DataServiceCollection type (or inherits from one).
Type to check.
true if the type inherits from DataServiceCollection; false otherwise.
Whether a variable of can be assigned null.
Type to check.
true if a variable of type can be assigned null; false otherwise.
Returns the list of properties defined on .
Type instance in question.
True to to get the properties declared on ; false to get all properties defined on .
Returns the list of properties defined on .
Returns the list of key properties defined on ; null if is complex.
Type in question.
Returns the list of key properties defined on ; null if is complex.
Returns the list of key properties defined on ; null if is complex.
Type in question.
true if has any (declared or inherited) properties; otherwise false.
Returns the list of key properties defined on ; null if is complex.
Gets the type of the specified .
Member to get type of (typically PropertyInfo or FieldInfo).
The type of property or field type.
Returns the KeyKind if is declared as a key in or it follows the key naming convension.
Property in question.
DataServiceKeyAttribute instance.
Returns the KeyKind if is declared as a key in or it follows the key naming convension.
Checks whether the specified is a
closed constructed type of the generic type.
Type to check.
Generic type for checkin.
true if is a constructed type of .
The check is an immediate check; no inheritance rules are applied.
Determines whether the declared on
overrides a (virtual/abstract) property of a base type.
The declaring type of the property.
The property to check.
true if overrides a property on a base types; otherwise false.
Enumeration for the kind of key
If this is not a key
If the key property name was equal to ID
If the key property name was equal to TypeName+ID
if the key property was attributed
Caches wire type names and their mapped client CLR types.
cache <T> and wireName to mapped type
resolve the wireName/userType pair to a CLR type
type name sent by server
type passed by user or on propertyType from a class
mapped clr type
is the type a visible subclass with correct name
type name from server
the type from user for materialization or property type
type being tested
the previously discovered matching type
if the mapping is ambiguous
type + wireName combination
type
type name from server
equality comparer for TypeName
equality comparer for TypeName
left type
right type
true if x and y are equal
compute hashcode for TypeName
object to compute hashcode for
computed hashcode
Helper methods that provide a common API surface on all platforms.
Use this instead of Type.EmptyTypes.
Use this instead of Uri.UriSchemeHttp.
Use this instead of Uri.UriSchemeHttps.
Replacement for Type.Assembly.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Type.IsValueType.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Type.IsGenericParameter.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Type.IsAbstract.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Type.IsGenericType.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Type.IsGenericTypeDefinition.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Type.IsVisible.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Type.IsInterface.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Type.IsClass.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Type.IsEnum.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Type.BaseType.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Type.ContainsGenericParameters.
Type on which to call this helper method.
See documentation for property being accessed in the body of the method.
Replacement for Array.AsReadOnly(T[]).
Type of items in the array.
Array to use to create the ReadOnlyCollection.
ReadOnlyCollection containing the specified array items.
Converts a string to a DateTime.
String to be converted.
See documentation for method being accessed in the body of the method.
Converts a string to a DateTimeOffset.
String to be converted.
See documentation for method being accessed in the body of the method.
Adds the seconds padding as zeros to the date time string if seconds part is missing.
String that needs seconds padding
DateTime string after adding seconds padding
Converts the DateTime to a string, internal method.
DateTime to convert to String.
Converted String.
Converts a DateTime to a string.
DateTime to be converted.
See documentation for property being accessed in the body of the method.
Gets the specified type.
Name of the type to get.
Throws if the type could not be found.
Type instance that represents the specified type name.
Gets the TypeCode for the specified type.
Type on which to call this helper method.
TypeCode representing the specified type.
Gets the Unicode Category of the specified character.
Character to get category of.
Category of the character.
Replacement for usage of MemberInfo.MemberType property.
MemberInfo on which to access this method.
True if the specified member is a property, otherwise false.
Replacement for usage of Type.IsPrimitive property.
Type on which to access this method.
True if the specified type is primitive, otherwise false.
Replacement for usage of Type.IsSealed property.
Type on which to access this method.
True if the specified type is sealed, otherwise false.
Replacement for usage of MemberInfo.MemberType property.
MemberInfo on which to access this method.
True if the specified member is a method, otherwise false.
Compares two methodInfos and returns true if they represent the same method.
Need this for Windows Phone as the method Infos of the same method are not always instance equivalent.
MemberInfo to compare.
MemberInfo to compare.
True if the specified member is a method, otherwise false.
Gets public properties for the specified type.
Type on which to call this helper method.
True if method should return only instance properties, false if it should return both instance and static properties.
Enumerable of public properties for the type.
Gets public properties for the specified type.
Type on which to call this helper method.
True if method should return only instance properties, false if it should return both instance and static properties.
True if method should return only properties that are declared on the type, false if it should return properties declared on the type as well as those inherited from any base types.
Enumerable of public properties for the type.
Gets instance constructors for the specified type.
Type on which to call this helper method.
True if method should return only public constructors, false if it should return only non-public constructors.
Enumerable of instance constructors for the specified type.
Gets a instance constructor for the type that takes the specified argument types.
Type on which to call this helper method.
True if method should search only public constructors, false if it should search only non-public constructors.
Array of argument types for the constructor.
ConstructorInfo for the constructor with the specified characteristics if found, otherwise null.
Tries to the get method from the type, returns null if not found.
The type.
The name.
The parameter types.
Returns True if found.
Gets a method on the specified type.
Type on which to call this helper method.
Name of the method on the type.
True if method should search only public methods, false if it should search only non-public methods.
True if method should search only static methods, false if it should search only instance methods.
MethodInfo for the method with the specified characteristics if found, otherwise null.
Gets a method on the specified type.
Type on which to call this helper method.
Name of the method on the type.
Argument types for the method.
True if method should search only public methods, false if it should search only non-public methods.
True if method should search only static methods, false if it should search only instance methods.
MethodInfo for the method with the specified characteristics if found, otherwise null.
Gets all public static methods for a type.
Type on which to call this helper method.
Enumerable of all public static methods for the specified type.
Replacement for Type.GetNestedTypes(BindingFlags.NonPublic)
Type on which to call this helper method.
All types nested in the current type
Creates a Compiled Regex expression
Pattern to match.
Options to use.
Regex expression to match supplied patter
Is marked as compiled option only in platforms otherwise RegexOption.None is used
Sets public key string for friend assemblies.
ProductPublicKey is an official MS supported public key for external releases.
TestPublicKey is an unsupported strong key for testing and internal use only
Dont know what this is
Used for comparison with external assemblies for silverlight like Microsoft.VisualBasic.
Used for comparison with external assemblies for desktop like Microsoft.VisualBasic.
AutoGenerated resource class. Usage:
string s = TextRes.GetString(TextRes.MyIdenfitier);
Strongly-typed and parameterized string resources.
A string like "The expected content type for a batch requests is "multipart/mixed;boundary=batch" not "{0}"."
A string like "The POST request expected a response with content. ID={0}"
A string like "The web response contained unexpected sections. ID={0}"
A string like "The ResolveEntitySet function must return a non-null Uri for the EntitySet '{0}', otherwise you must set the BaseUri property."
A string like "Unable to convert value '{0}' into a key string for a URI."
A string like "System.Data.Services.Client internal error {0}."
A string like "The stream named '{0}' cannot be modified because it does not have an edit-media link. Make sure that the stream name is correct and that an edit-media link for this stream is included in the entry element in the response."
A string like "The property '{0}' is not supported when MaxProtocolVersion is greater than '{1}'."
A string like "Media link object of type '{0}' is configured to use the MIME type specified in the property '{1}'. However, that property's value is null or empty."
A string like "Response version '{0}' is not supported. The only supported versions are: {1}."
A string like "The response version is {0}, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the version required by the response, and then retry the request. If the client does not support the required protocol version, then upgrade the client."
A string like "The request requires that version {0} of the protocol be used, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the higher version, and then retry the operation."
A string like "The entity type {0} is marked with MediaEntry attribute but no save stream was set for the entity."
A string like "Can't use SetSaveStream on entity with type {0} which has a media entry property defined."
A string like "Calling SetSaveStream on an entity with state '{0}' is not allowed."
A string like "The entity does not have a stream named '{0}'. Make sure that the name of the stream is correct."
A string like "There is no self-link or edit-media link for the stream named '{0}'. Make sure that either the self-link or edit-media link is specified for this stream."
A string like "The serialized resource has a null value in key member '{0}'. Null values are not supported in key members."
A string like "An entity in the 'Added' state cannot be changed to '{0}', it can only be changed to 'Detached'."
A string like "The content-type value '{0}' is not supported."
A string like "{0}.{1} must return a non-null open property collection."
A string like "The open object property '{0}:{1}' is not defined."
A string like "{0} has multiple definitions for OpenObjectAttribute."
A string like "The closed type {0} does not have a corresponding {1} settable property."
A string like "{0} has key properties declared on a non-simple type."
A string like "{0} has key properties declared at different levels within its type hierarchy."
A string like "Type '{0}' has a MimeTypeProperty attribute that references the MIME type property '{1}'. However, this type does not have a property '{1}'."
A string like "Type '{0}' has a MimeTypeProperty attribute that references the data property '{1}'. However, this type does not have a property '{1}'."
A string like "Type '{0}' has a MediaEntry attribute that references a property called '{1}'. However, this type does not have a property '{1}'."
A string like "The type '{0}' has no settable properties."
A string like "The open type property '{0}' returned a null instance."
A string like "Resolving type from '{0}' that inherits from '{1}' is ambiguous."
A string like "The type '{0}' is not supported by the client library."
A string like "The type '{0}' has a property '{1}' which is a collection property. Collection properties are only supported in 'V3' version of the protocol and above."
A string like "Multiple types were found with the same name '{0}'. Type names must be unique."
A string like "The type '{0}' is a collection type. Collection types are only supported in 'V3' version of the protocol and above."
A string like "An item in the collection property '{0}' is not of the correct type. All items in the collection property must be of the collection item type."
A string like "A collection of item type '{0}' has an item which is not of the correct type. All items in the collection must be of the collection item type."
A string like "The property '{0}' is of entity type and it cannot be a property of the type '{1}', which is not of entity type. Only entity types can contain navigation properties."
A string like "The current value '{1}' type is not compatible with the expected '{0}' type."
A string like "Error processing response stream. Atom payload has a feed and the property '{0}' is not a collection."
A string like "Error processing response stream. Atom payload has an entry and the property '{0}' is a collection."
A string like "Error processing response stream. Server failed with following message:\r\n{0}"
A string like "The value of the property '{0}' is null. Properties that are a collection type of primitive or complex types cannot be null."
A string like "The value of the collection of item type '{0}' is null. A collection cannot have a null value."
A string like "The entity with identity '{0}' does not have a self-link or an edit-link associated with it. Please make sure that the entity has either a self-link or an edit-link associated with it."
A string like "The PropertyName property value '{1}' of EntityPropertyMappingAttribute on type '{0}' is not valid."
A string like "The PropertyName property value '{0}' on more than one EntityPropertyMappingAttribute on resource type '{1}' is provided more than once."
A string like "The property '{0}' provided at the end of the PropertyName property of the EntityPropertyMappingAttribute on a resource type is not a primitive type."
A string like "The property '{0}' on type '{1}' is not present or is inaccessible."
A string like "The property '{0}' on the type '{1}' is of the type 'DataServiceStreamLink'. Stream properties cannot be mapped with an entity property mapping."
A string like "The property '{0}' on the type '{1}' is a spatial type. Spatial type properties cannot be mapped with an entity property mapping."
A string like "The property '{0}' on the type '{1}' is a collection. Collection properties cannot be mapped with an entity property mapping."
A string like "The TargetName property path '{0}' set in the EntityPropertyMappingAttribute is not valid."
A string like "The attribute identifier '{0}' is provided in the middle of the TargetName property of EntityPropertyMappingAttribute."
A string like "The TargetName property '{0}' on more than one EntityPropertyMappingAttribute on resource type '{1}' have the same value. Conflicting properties are '{2}' and '{3}'."
A string like "Character set '{0}' is not supported."
A string like "Value for MIME type parameter '{0}' is incorrect because it contained escape characters even though it was not quoted."
A string like "Value for MIME type parameter '{0}' is incorrect because it terminated with escape character. Escape characters must always be followed by a character in a parameter value."
A string like "Value for MIME type parameter '{0}' is incorrect because the closing quote character could not be found while the parameter value started with a quote character."
A string like "The expression type {0} is not supported."
A string like "Could not convert constant {0} expression to string."
A string like "The method '{0}' is not supported."
A string like "The unary operator '{0}' is not supported."
A string like "The binary operator '{0}' is not supported."
A string like "The constant for '{0}' is not supported."
A string like "The member access of '{0}' is not supported."
A string like "Can't cast to unsupported type '{0}'"
A string like "The expression {0} is not supported."
A string like "Error translating Linq expression to URI: {0}"
A string like "Can't add duplicate query option '{0}'."
A string like "Can't add query option '{0}' because it would conflict with the query options from the translated Linq expression."
A string like "Can't add query option '{0}' because it begins with reserved character '$'."
A string like "Referencing public field '{0}' not supported in query option expression. Use public property instead."
A string like "The {0} query option cannot be specified after the {1} query option."
A string like "Cannot initialize an instance of entity type '{0}' because '{1}' and '{2}' do not refer to the same source entity."
A string like "The expression '{0}' is not a valid expression for navigation path. The only supported operations inside the lambda expression body are MemberAccess and TypeAs. The expression must contain at least one MemberAccess and it cannot end with TypeAs."
A string like "Initializing instances of the entity type {0} with the expression {1} is not supported."
A string like "Constructing or initializing instances of the type {0} with the expression {1} is not supported."
A string like "Cannot assign the value from the {0} property to the {1} property. When projecting results into a entity type, the property names of the source type and the target type must match for the properties being projected."
A string like "The collection property '{0}' cannot be used in an 'orderby' query expression. Collection properties are not supported by the 'orderby' query option."
A string like "The collection property '{0}' cannot be used in a 'where' query expression. Collection properties are only supported as the source of 'any' or 'all' methods in a 'where' query option."
A string like "Navigation to members of the collection property '{0}' in a 'select' query expression is not supported."
A string like "The property '{0}' of type 'DataServiceStreamLink' cannot be used in 'where' or 'orderby' query expressions. Properties of type 'DataServiceStreamLink' are not supported by these query options."
A string like "Unsupported expression '{0}' in '{1}' method. Expression cannot end with TypeAs."
A string like "The method '{0}' is not supported when MaxProtocolVersion is less than '{1}'."
A string like "The type '{0}' is not an entity type. The target type for a TypeAs operator must be an entity type."
A string like "The source parameter for the '{0}' method has to be either a navigation or a collection property."
A string like "The method '{0}' is not supported by the 'orderby' query option."
A string like "The DataServiceCollection to be tracked must contain entity typed elements with at least one key property. The element type '{0}' does not have any key property."
A string like "Setting an instance of DataServiceCollection to an entity property is disallowed if the instance is already being tracked. Error occurred on property '{0}' for entity type '{1}'."
A string like "Unexpected action '{0}' on the OnCollectionChanged event raised by DataServiceCollection."
A string like "Unexpected action '{0}' on the OnCollectionChanged event raised by a collection object of type '{1}'."
A string like "Null values are disallowed during '{0}' operations on DataServiceCollection."
A string like "A value provided during '{0}' operation on DataServiceCollection is not of an entity type with key."
A string like "Entity set name has not been provided for an entity of type '{0}'."
A string like "An attempt was made to add entity of type '{0}' to a collection in which the same entity already exists."
A string like "An attempt to track an entity or complex type failed because the entity or complex type '{0}' does not implement the INotifyPropertyChanged interface."
A string like "An attempt to track an entity or complex type failed because the entity or complex type contains a collection property of type '{0}' that does not implement the INotifyCollectionChanged interface."
A string like "An attempt to track a complex object of type '{0}' failed because the complex object is already being tracked."
A string like "An attempt to track a collection object of type '{0}' failed because the collection object is already being tracked."
A string like "The null value from property '{0}' cannot be assigned to a type '{1}'."
A string like "An entry of type '{0}' cannot be added to a collection that contains instances of type '{1}'. This may occur when an existing entry of a different type has the same identity value or when the same entity is projected into two different types in a single query."
A string like "An entry returned by the navigation property '{0}' is null and cannot be initialized. You should check for a null value before accessing this property."
A string like "An entry that contains the data required to create an instance of type '{0}' is null and cannot be initialized. You should check for a null value before accessing this entry."
A string like "An entity of type '{0}' cannot be projected because there is already an instance of type '{1}' for '{2}'."
A string like "The expected property '{0}' could not be found while processing an entry. Check for null before accessing this property."
A string like "Property '{0}' is not an entity."
A string like "Collection property '{0}' cannot be created because the type '{1}' does not have a public parameterless constructor."
A string like "The element '{0}' is not a valid collection item. The name of the collection item element must be 'element' and must belong to the 'http://schemas.microsoft.com/ado/2007/08/dataservices' namespace."
A string like "There is a type mismatch between the client and the service. Type '{0}' is an entity type, but the type in the response payload does not represent an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client."
A string like "There is a type mismatch between the client and the service. Type '{0}' is not an entity type, but the type in the response payload represents an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client."
A string like "Materialization of top level collection expected ICollection<>, but actual type was {0}."
A string like "The response payload is a not a valid response payload. Please make sure that the top level element is a valid Atom or JSON element or belongs to '{0}' namespace."
A string like "The response content type '{0}' is not currently supported."
A string like "Cannot materialize the results into a collection type '{0}' because it does not have a parameterless constructor."
A string like "Cannot materialize a collection of a primitives or complex without the type '{0}' being a collection."
A string like "A circular loop was detected while serializing the property '{0}'. You must make sure that loops are not present in properties that return a collection or complex type."
A string like "A circular loop was detected while serializing the complex type '{0}'. You must make sure that loops are not present in a collection or a complex type."
A string like "The operation parameter named '{0}' has a collection item of Edm type kind '{1}'. A collection item must be either a primitive type or a complex Edm type kind."
A string like "The operation parameter named '{0}' has a null collection item. The items of a collection must not be null."
A string like "The operation parameter named '{0}' was of Edm type kind '{1}'. An operation parameter must be either a primitive type, a complex type or a collection of primitive or complex types."
A string like "The parameter alias '{0}' was not present in the request URI. All parameters passed as alias must be present in the request URI."
A string like "An internal error '{0}' occurred."
A string like "The entity set '{0}' doesn't have the 'OData.EntitySetUri' annotation. This annotation is required."
A string like "The entity set '{0}' has a URI '{1}' which has no path segments. An entity set URI suffix cannot be appended to a URI without path segments."
A string like "Neither the 'OData.EntityInstanceUri' nor the 'OData.EntitySetUriSuffix' annotation was found for entity set '{0}'. One of these annotations is required."
A string like "The type '{0}' was found for a primitive value. In OData, the type '{0}' is not a supported primitive type."
A string like "Incompatible primitive type kinds were found. The type '{0}' was found to be of kind '{2}' instead of the expected kind '{1}'."
A string like "Incompatible primitive type kinds were found. Found type kind '{0}' instead of the expected kind '{1}'."
A string like "A value with primitive kind '{0}' cannot be converted into a primitive object value."
A string like "Not all requests in the batch had a response."
A string like "Expected an absolute, well formed http URL without a query or fragment."
A string like "You must set the BaseUri property before you perform this operation."
A string like "The Uri that is returned by the ResolveEntitySet function must be an absolute, well-formed URL with an "http" or "https" scheme name and without any query strings or fragment identifiers."
A string like "Because the requestUri is a relative Uri, you must set the BaseUri property on the DataServiceContext."
A string like "The identity value specified by either the Atom id element or the DataServiceId header must be an absolute URI."
A string like "The 'Location' header value specified in the response must be an absolute URI."
A string like "One of the link's resources failed to insert."
A string like "An error occurred for this query during batch execution. See the inner exception for details."
A string like "Expected a relative URL path without query or fragment."
A string like "Changes cannot be saved as a batch when an entity has one or more streams associated with it. Retry the SaveChanges operation without enabling the SaveChangesOptions.Batch and the SaveChangesOptions.BatchWithIndependentOperations options."
A string like "This operation requires the entity be of an Entity Type, and has at least one key property."
A string like "This operation requires the entity to be of an Entity Type, either mark its key properties, or attribute the class with DataServiceEntityAttribute"
A string like "The context is not currently tracking the entity."
A string like "The context is already tracking the entity."
A string like "The context is already tracking a different entity with the same resource Uri."
A string like "The current object did not originate the async result."
A string like "The asynchronous result has already been completed."
A string like "The operation has been canceled."
A string like "The context can not load the related collection or reference for objects in the added state."
A string like "One or both of the ends of the relationship is in the added state."
A string like "One or both of the ends of the relationship is in the deleted state."
A string like "The context is already tracking the relationship."
A string like "The sourceProperty is not a reference or collection of the target's object type."
A string like "AddLink and DeleteLink methods only work when the sourceProperty is a collection."
A string like "AddRelatedObject method only works when the sourceProperty is a collection."
A string like "AddRelatedObject method only works if the source entity is in a non-deleted state."
A string like "SetLink method only works when the sourceProperty is not a collection."
A string like "Saving entities with the [MediaEntry] attribute is not currently supported in batch mode. Use non-batched mode instead."
A string like "Unexpected result (<= 0) from stream.Read() while reading raw data for this property."
A string like "Attempt to delete a link between two objects failed because the identity of the target object of the link depends on the source object of the link."
A string like "The ContentType value for a named stream cannot be null or an empty string."
A string like "This operation requires that the specified entity be a Media Link Entry and that the ReadStreamUri be available. However, the specified entity either is not a Media Link Entry or does not have a valid ReadStreamUri value. If the entity is a Media Link Entry, re-query the data service for this entity to obtain a valid ReadStreamUri value."
A string like "There is no edit-media link for the entity's media stream. Make sure that the edit-media link is specified for this stream."
A string like "The response should have both 'Location' and 'DataServiceId' headers or the response should not have any of these headers."
A string like "OperationParameter of type BodyOperationParameter cannot be specified when the HttpMethod is set to GET."
A string like "The Name property of an OperationParameter must be set to a non-null, non-empty string."
A string like "Multiple uri operation parameters were found with the same name. Uri operation parameter names must be unique."
A string like "Multiple body operation parameters were found with the same name. Body operation parameter names must be unique."
A string like "The HttpMethod must be GET or POST."
A string like "EndExecute overload for void service operations and actions received a non-void response from the server."
A string like "The operation parameters array contains a null element which is not allowed."
A string like "An implementation of ODataEntityMetadataBuilder is required, but a null value was returned from GetEntityMetadataBuilder."
A string like "SendingRequest is a deprecated event. If using BuildingRequest, you cannot use SendingRequest. Use SendingRequest2 instead."
A string like "The ChangeState method does not support the 'Added' state because additional information is needed for inserts. Use either AddObject or AddRelatedObject instead."
A string like "The entity's state can only be changed to 'Modified' if it is currently 'Unchanged'."
A string like "DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property must not return a null value. Please return a non-null value for this property."
A string like "SendingRequest cannot be used in combination with the DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property. Please use SendingRequest2 with DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property instead."
A string like "The ReadingEntity and WritingEntity events are only supported when using the Atom format. Use the Atom format or remove all registered handlers for these events before enabling another format."
A string like "When you call the UseJson method without a parameter, you must use the LoadServiceModel property to provide a valid IEdmModel instance."
A string like "UseJson is not supported when the MaxProtocolVersion is set to less than V3. This JSON format is only supported by OData v3 or a later version."
A string like "To use the JSON format, you must first call DataServiceContext.Format.UseJson() and supply a valid service model."
A string like "Multiple implementations of ICollection<T> is not supported."
A string like "Collection properties of a collection type are not supported."
A string like "An error occurred while processing this request."
A string like "Only a single enumeration is supported by this IEnumerable."
A string like "Error processing response stream. Element value interspersed with a comment is not supported."
A string like "Error processing response stream. The XML element contains mixed content."
A string like "Error processing response stream. Atom payload has a link, local object has a simple value."
A string like "The response to this POST request did not contain a 'location' header. That is not supported by this client."
A string like "Error processing response stream. Missing id element in the response."
A string like "An item in the collection property has a null value. Collection properties that contain items with null values are not supported."
A string like "A collection property of primitive types cannot contain an item of a complex type."
A string like "A collection property of complex types cannot contain an item of a primitive type."
A string like "Content-Type header value missing."
A string like "Media type is missing a parameter value."
A string like "Media type requires a ';' character before a parameter definition."
A string like "Media type requires a '/' character."
A string like "Media type requires a subtype definition."
A string like "Media type is unspecified."
A string like "Count value is not part of the response stream."
A string like "The top level link is only available after the response has been enumerated."
A string like "The collection is not part of the current entry"
A string like "This response does not contain any nested collections. Use null as Key instead."
A string like "GetStream method is not supported."
A string like "Empty string."
A string like "Empty array."
A string like "Array contains a null element."
A string like "An operation between an expression and a type is not supported."
A string like "The conditional expression is not supported."
A string like "The parameter expression is not supported."
A string like "Lambda Expressions not supported."
A string like "New Expressions not supported."
A string like "Member Init Expressions not supported."
A string like "List Init Expressions not supported."
A string like "New Array Expressions not supported."
A string like "Invocation Expressions not supported."
A string like "Can only specify query options (orderby, where, take, skip) after last navigation."
A string like "Expand query option not allowed."
A string like "Individual properties can only be selected from a single resource or as part of a type. Specify a key predicate to restrict the entity set to a single instance or project the property into a named or anonymous type."
A string like "Multiple key predicates cannot be specified for the same entity set."
A string like "Custom query option not allowed."
A string like "Cannot specify query options (orderby, where, take, skip, count) on single resource."
A string like "Cannot add count option to the resource set."
A string like "Cannot add count option to the resource set because it would conflict with existing count options."
A string like "Can only specify 'select' query option after last navigation."
A string like "Cannot translate multiple Linq Select operations in a single 'select' query option."
A string like "Construction of entity type instances must use object initializer with default constructor."
A string like "Referencing of local entity type instances not supported when projecting results."
A string like "Can only project the last entity type in the query being translated."
A string like "Cannot create projection while there is an explicit expansion specified on the same query."
A string like "The target type for an OfType filter could not be determined."
A string like "Non-redundant type filters (OfType<T>, C# 'as' and VB 'TryCast') can only be used once per resource set."
A string like "The expression 'TypeAs' is not supported when MaxProtocolVersion is less than '3.0'."
A string like "The '$format' query option is not supported. Use the DataServiceContext.Format property to set the desired format."
A string like "DataServiceKey attribute must specify at least one property name."
A string like "Target collection for the Load operation must have an associated DataServiceContext."
A string like "The tracking of DataServiceCollection can not be stopped for child collections."
A string like "This operation is only supported on collections that are being tracked."
A string like "The DataServiceContext to which the DataServiceCollection instance belongs could not be determined. The DataServiceContext must either be supplied in the DataServiceCollection constructor or be used to create the DataServiceQuery or QueryOperationResponse object that is the source of the items in the DataServiceCollection."
A string like "An item could not be added to the collection. When items in a DataServiceCollection are tracked by the DataServiceContext, new items cannot be added before items have been loaded into the collection."
A string like "A previous LoadAsync operation has not yet completed. You cannot call the LoadAsync method on the DataServiceCollection again until the previous operation has completed."
A string like "The LoadAsync method cannot be called when the DataServiceCollection is not a child collection of a related entity."
A string like "Only a typed DataServiceQuery object can be supplied when calling the LoadAsync method on DataServiceCollection."
A string like "Add/Update/Delete operation cannot be performed on a child entity, if the parent entity is already detached."
A string like "Expected exactly one Atom entry in the response from the server, but none was found."
A string like "Expected exactly one Atom entry in the response from the server, but more than one was found."
A string like "Expected an Atom feed or entry in the response from the server, but found an unexpected element instead."
A string like "A DataServiceCollection can only contain entity types. Primitive and complex types cannot be contained by this kind of collection."
A string like "Reset should never be called for collection reader in an internal enumerable."
A string like "This target framework does not enable you to directly enumerate over a data service query. This is because enumeration automatically sends a synchronous request to the data service. Because this framework only supports asynchronous operations, you must instead call the BeginExecute and EndExecute methods to obtain a query result that supports enumeration."
A string like "Only instances of HttpWebRequest are currently allowed for this property. Other subtypes of WebRequest are not supported."
A string like "Failed to get the count value from the server."
A string like "Execute overload for void service operations and actions received a non-void response from the server."