C# Class DataServiceProvider.DSPResourceQueryProvider

Implementation of the IDataServiceQueryProvider.
Inheritance: IDataServiceQueryProvider
Afficher le fichier Open project: object/NorthwindOData

Méthodes publiques

Méthode Description
DSPResourceQueryProvider ( ) : System

Constructor.

GetOpenPropertyValue ( object target, string propertyName ) : object

Gets a value of open property for the specified resource.

The method will only be called for properties which are not declared on the resource's resource type. Properties can have null values. The type of the property is determined from the returned object, only primitive types are supported for now.

GetOpenPropertyValues ( object target ) : object>>.IEnumerable

Gets a list of all open properties for the specified resource.

This method should only return open properties. Properties declared in metadata for this resource's resource type must not be returned by this method. Properties can have null values. The type of the property is determined from the returned object, only primitive types are supported for now.

GetPropertyValue ( object target, System.Data.Services.Providers.ResourceProperty resourceProperty ) : object

Gets a value of a declared property for a resource.

The returned value's type should match the type declared in the resource's resource type.

GetQueryRootForResourceSet ( System.Data.Services.Providers.ResourceSet resourceSet ) : System.Linq.IQueryable

Returns a query which can be used to retrive resource from the specified resource set.

The data service will use the LINQ to build the actual query required for the resource set. It's up to this provider to return an IQueryable which can handle such queries. If the resource set is not recognized by the provider it should return null.

GetResourceType ( object target ) : System.Data.Services.Providers.ResourceType

Returns a resource type for the specified resource.

The method should throw if the resource is not recognized. If it returns null the data service will throw instead.

InvokeServiceOperation ( System.Data.Services.Providers.ServiceOperation serviceOperation, object parameters ) : object

Invokes the specified service operation.

Method Details

DSPResourceQueryProvider() public méthode

Constructor.
public DSPResourceQueryProvider ( ) : System
Résultat System

GetOpenPropertyValue() public méthode

Gets a value of open property for the specified resource.
The method will only be called for properties which are not declared on the resource's resource type. Properties can have null values. The type of the property is determined from the returned object, only primitive types are supported for now.
public GetOpenPropertyValue ( object target, string propertyName ) : object
target object The target resource to get a value of property from.
propertyName string The name of the property to get.
Résultat object

GetOpenPropertyValues() public méthode

Gets a list of all open properties for the specified resource.
This method should only return open properties. Properties declared in metadata for this resource's resource type must not be returned by this method. Properties can have null values. The type of the property is determined from the returned object, only primitive types are supported for now.
public GetOpenPropertyValues ( object target ) : object>>.IEnumerable
target object The target resource to get open properties from.
Résultat object>>.IEnumerable

GetPropertyValue() public méthode

Gets a value of a declared property for a resource.
The returned value's type should match the type declared in the resource's resource type.
public GetPropertyValue ( object target, System.Data.Services.Providers.ResourceProperty resourceProperty ) : object
target object The target resource to get a value of the property from.
resourceProperty System.Data.Services.Providers.ResourceProperty The name of the property to get.
Résultat object

GetQueryRootForResourceSet() public méthode

Returns a query which can be used to retrive resource from the specified resource set.
The data service will use the LINQ to build the actual query required for the resource set. It's up to this provider to return an IQueryable which can handle such queries. If the resource set is not recognized by the provider it should return null.
public GetQueryRootForResourceSet ( System.Data.Services.Providers.ResourceSet resourceSet ) : System.Linq.IQueryable
resourceSet System.Data.Services.Providers.ResourceSet The resource set to get the quqeyr for.
Résultat System.Linq.IQueryable

GetResourceType() public méthode

Returns a resource type for the specified resource.
The method should throw if the resource is not recognized. If it returns null the data service will throw instead.
public GetResourceType ( object target ) : System.Data.Services.Providers.ResourceType
target object The target resource for which to determine its type.
Résultat System.Data.Services.Providers.ResourceType

InvokeServiceOperation() public méthode

Invokes the specified service operation.
public InvokeServiceOperation ( System.Data.Services.Providers.ServiceOperation serviceOperation, object parameters ) : object
serviceOperation System.Data.Services.Providers.ServiceOperation The service operation to invoke.
parameters object The parameters for the service operation. Their types will match the types of the declared parameters for the service operation.
Résultat object