C# 클래스 DataServiceProvider.DSPMetadata

Metadata definition for the DSP. This also implements the IDataServiceMetadataProvider.
상속: IDataServiceMetadataProvider, ICloneable
파일 보기 프로젝트 열기: object/MongOData 1 사용 예제들

공개 메소드들

메소드 설명
AddCollectionProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, System.Data.Services.Providers.ResourceType itemType ) : void

Adds a collection of complex or primitive items property.

AddCollectionProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, Type itemType ) : void

Adds a collection of primitive items property.

AddComplexProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, System.Data.Services.Providers.ResourceType complexType ) : void

Adds a complex property to the specified resourceType.

AddComplexType ( string name ) : System.Data.Services.Providers.ResourceType

Adds a new complex type (without any properties).

AddEntityType ( string name ) : System.Data.Services.Providers.ResourceType

Adds a new entity type (without any properties).

AddKeyProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, Type propertyType ) : void

Adds a key property to the specified resourceType.

AddPrimitiveProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, Type propertyType ) : void

Adds a primitive property to the specified resourceType.

AddResourceReferenceProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, System.Data.Services.Providers.ResourceSet targetResourceSet ) : void

Adds a resource reference property to the specified resourceType.

This creates a property pointing to a single resource in the target resource set.

AddResourceSet ( string name, System.Data.Services.Providers.ResourceType entityType ) : System.Data.Services.Providers.ResourceSet

Adds a resource set to the metadata definition.

AddResourceSetReferenceProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, System.Data.Services.Providers.ResourceSet targetResourceSet ) : void

Adds a resource set reference property to the specified resourceType.

This creates a property pointing to multiple resources in the target resource set.

Clone ( ) : object
DSPMetadata ( string containerName, string namespaceName ) : System

Creates new empty metadata definition.

GetDerivedTypes ( System.Data.Services.Providers.ResourceType resourceType ) : System.Collections.Generic.IEnumerable

Returns list of all types derived (directly or indirectly) from the specified resourceType.

Note that this method will get called even if the HasDerivedTypes returns false. The implementation should be reasonably fast as it can be called to process a query request. (Aside from being called for the $metadata processing).

GetResourceAssociationSet ( System.Data.Services.Providers.ResourceSet resourceSet, System.Data.Services.Providers.ResourceType resourceType, System.Data.Services.Providers.ResourceProperty resourceProperty ) : System.Data.Services.Providers.ResourceAssociationSet

Gets the ResourceAssociationSet instance when given the source association end.

This method returns a ResourceAssociationSet representing a reference which is specified by the resourceProperty on the resourceType for instances in the resourceSet.

HasDerivedTypes ( System.Data.Services.Providers.ResourceType resourceType ) : bool

Returns true if the specified type has some derived types.

The implementation should be fast as it will get called during normal request processing.

TryResolveResourceSet ( string name, System.Data.Services.Providers.ResourceSet &resourceSet ) : bool

Returnes a resource set specified by its name.

The implementation of this method should be very fast as it will get called for almost every request. It should also be fast for non-existing resource sets to avoid possible DoS attacks on the service.

TryResolveResourceType ( string name, System.Data.Services.Providers.ResourceType &resourceType ) : bool

Returnes a resource type specified by its name.

The implementation of this method should be very fast as it will get called for many requests. It should also be fast for non-existing resource types to avoid possible DoS attacks on the service.

TryResolveServiceOperation ( string name, System.Data.Services.Providers.ServiceOperation &serviceOperation ) : bool

Returns a service operation specified by its name.

The implementation of this method should be very fast as it will get called for many requests. It should also be fast for non-existing service operations to avoid possible DoS attacks on the service.

비공개 메소드들

메소드 설명
AddPrimitiveProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, Type propertyType, bool isKey ) : void

Adds a key property to the specified resourceType.

AddReferenceProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, System.Data.Services.Providers.ResourceSet targetResourceSet, bool resourceSetReference ) : void

Helper method to add a reference property.

SetReadOnly ( ) : void

Marks the metadata as read-only.

메소드 상세

AddCollectionProperty() 공개 메소드

Adds a collection of complex or primitive items property.
public AddCollectionProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, System.Data.Services.Providers.ResourceType itemType ) : void
resourceType System.Data.Services.Providers.ResourceType The resource type to add the property to.
name string The name of the property to add.
itemType System.Data.Services.Providers.ResourceType The resource type of the item in the collection.
리턴 void

AddCollectionProperty() 공개 메소드

Adds a collection of primitive items property.
public AddCollectionProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, Type itemType ) : void
resourceType System.Data.Services.Providers.ResourceType The resource type to add the property to.
name string The name of the property to add.
itemType System.Type The primitive CLR type of the item in the collection.
리턴 void

AddComplexProperty() 공개 메소드

Adds a complex property to the specified resourceType.
public AddComplexProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, System.Data.Services.Providers.ResourceType complexType ) : void
resourceType System.Data.Services.Providers.ResourceType The resource type to add the property to.
name string The name of the property to add.
complexType System.Data.Services.Providers.ResourceType Complex type to use for the property.
리턴 void

AddComplexType() 공개 메소드

Adds a new complex type (without any properties).
public AddComplexType ( string name ) : System.Data.Services.Providers.ResourceType
name string The name of the type.
리턴 System.Data.Services.Providers.ResourceType

AddEntityType() 공개 메소드

Adds a new entity type (without any properties).
public AddEntityType ( string name ) : System.Data.Services.Providers.ResourceType
name string The name of the type.
리턴 System.Data.Services.Providers.ResourceType

AddKeyProperty() 공개 메소드

Adds a key property to the specified resourceType.
public AddKeyProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, Type propertyType ) : void
resourceType System.Data.Services.Providers.ResourceType The resource type to add the property to.
name string The name of the property to add.
propertyType System.Type The CLR type of the property to add. This can be only a primitive type.
리턴 void

AddPrimitiveProperty() 공개 메소드

Adds a primitive property to the specified resourceType.
public AddPrimitiveProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, Type propertyType ) : void
resourceType System.Data.Services.Providers.ResourceType The resource type to add the property to.
name string The name of the property to add.
propertyType System.Type The CLR type of the property to add. This can be only a primitive type.
리턴 void

AddResourceReferenceProperty() 공개 메소드

Adds a resource reference property to the specified resourceType.
This creates a property pointing to a single resource in the target resource set.
public AddResourceReferenceProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, System.Data.Services.Providers.ResourceSet targetResourceSet ) : void
resourceType System.Data.Services.Providers.ResourceType The resource type to add the property to.
name string The name of the property to add.
targetResourceSet System.Data.Services.Providers.ResourceSet The resource set the resource reference property points to.
리턴 void

AddResourceSet() 공개 메소드

Adds a resource set to the metadata definition.
public AddResourceSet ( string name, System.Data.Services.Providers.ResourceType entityType ) : System.Data.Services.Providers.ResourceSet
name string The name of the resource set to add.
entityType System.Data.Services.Providers.ResourceType The type of entities in the resource set.
리턴 System.Data.Services.Providers.ResourceSet

AddResourceSetReferenceProperty() 공개 메소드

Adds a resource set reference property to the specified resourceType.
This creates a property pointing to multiple resources in the target resource set.
public AddResourceSetReferenceProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, System.Data.Services.Providers.ResourceSet targetResourceSet ) : void
resourceType System.Data.Services.Providers.ResourceType The resource type to add the property to.
name string The name of the property to add.
targetResourceSet System.Data.Services.Providers.ResourceSet The resource set the resource reference property points to.
리턴 void

Clone() 공개 메소드

public Clone ( ) : object
리턴 object

DSPMetadata() 공개 메소드

Creates new empty metadata definition.
public DSPMetadata ( string containerName, string namespaceName ) : System
containerName string Name of the container to report.
namespaceName string Namespace name.
리턴 System

GetDerivedTypes() 공개 메소드

Returns list of all types derived (directly or indirectly) from the specified resourceType.
Note that this method will get called even if the HasDerivedTypes returns false. The implementation should be reasonably fast as it can be called to process a query request. (Aside from being called for the $metadata processing).
public GetDerivedTypes ( System.Data.Services.Providers.ResourceType resourceType ) : System.Collections.Generic.IEnumerable
resourceType System.Data.Services.Providers.ResourceType The resource type to determine derived types for.
리턴 System.Collections.Generic.IEnumerable

GetResourceAssociationSet() 공개 메소드

Gets the ResourceAssociationSet instance when given the source association end.
This method returns a ResourceAssociationSet representing a reference which is specified by the resourceProperty on the resourceType for instances in the resourceSet.
public GetResourceAssociationSet ( System.Data.Services.Providers.ResourceSet resourceSet, System.Data.Services.Providers.ResourceType resourceType, System.Data.Services.Providers.ResourceProperty resourceProperty ) : System.Data.Services.Providers.ResourceAssociationSet
resourceSet System.Data.Services.Providers.ResourceSet Resource set of the source association end.
resourceType System.Data.Services.Providers.ResourceType Resource type of the source association end.
resourceProperty System.Data.Services.Providers.ResourceProperty Resource property of the source association end.
리턴 System.Data.Services.Providers.ResourceAssociationSet

HasDerivedTypes() 공개 메소드

Returns true if the specified type has some derived types.
The implementation should be fast as it will get called during normal request processing.
public HasDerivedTypes ( System.Data.Services.Providers.ResourceType resourceType ) : bool
resourceType System.Data.Services.Providers.ResourceType The resource type to inspect.
리턴 bool

TryResolveResourceSet() 공개 메소드

Returnes a resource set specified by its name.
The implementation of this method should be very fast as it will get called for almost every request. It should also be fast for non-existing resource sets to avoid possible DoS attacks on the service.
public TryResolveResourceSet ( string name, System.Data.Services.Providers.ResourceSet &resourceSet ) : bool
name string The name of the resource set find.
resourceSet System.Data.Services.Providers.ResourceSet The resource set instance found.
리턴 bool

TryResolveResourceType() 공개 메소드

Returnes a resource type specified by its name.
The implementation of this method should be very fast as it will get called for many requests. It should also be fast for non-existing resource types to avoid possible DoS attacks on the service.
public TryResolveResourceType ( string name, System.Data.Services.Providers.ResourceType &resourceType ) : bool
name string The full name of the resource type (including its namespace).
resourceType System.Data.Services.Providers.ResourceType The resource type instance found.
리턴 bool

TryResolveServiceOperation() 공개 메소드

Returns a service operation specified by its name.
The implementation of this method should be very fast as it will get called for many requests. It should also be fast for non-existing service operations to avoid possible DoS attacks on the service.
public TryResolveServiceOperation ( string name, System.Data.Services.Providers.ServiceOperation &serviceOperation ) : bool
name string The name of the service operation to find.
serviceOperation System.Data.Services.Providers.ServiceOperation The service operation instance found.
리턴 bool