C# Class Microsoft.Dynamics.Integration.Adapters.DynamicCrm.DynamicObjectProvider

Provides interaction with the Dynamics CRM DynamicEntity object.
Inheritance: CrmObjectProvider, IObjectReader, IObjectWriter
显示文件 Open project: Microsoft/Instance-Adapter-for-Microsoft-Dynamics-CRM Class Usage Examples

Public Methods

Method Description
DeleteObject ( object key ) : void

Deletes an object

DynamicObjectProvider ( ) : System

Initializes a new instance of the DynamicObjectProvider class.

ReadDeletedObjectKeys ( DateTime modifiedDate ) : ICollection

Gets an ICollection containing Key objects that match the supplied modifiedDate.

ReadObject ( object key ) : object

Read an object from the stream

ReadObjectKeys ( DateTime modifiedDate ) : ICollection

Gets an ICollection containing Key objects that match the supplied modifiedDate

WriteObject ( object value ) : void

Writes an object to the stream

Protected Methods

Method Description
GetSetStateRequest ( int stateToSet, int statusToSet, Guid entityId ) : OrganizationRequest

Override that handles the setting of entity state codes on entities that have complex state transitions.

Private Methods

Method Description
AssociatedRetrival ( string entityRelationshipName, string entity1Name, string entity1IntersectAtt ) : RetrieveMultipleResponse

Retrieves entity relationships

CreateAssociatedRequest ( string relationshipName, string entity1Name, string entity1Guid, string entity2Name, string entity2Guid ) : void

Create a CRM AssociationRequest and executes it.

CreateDisassociateRequest ( string relationshipName, string entity1Name, string entity1Guid, string entity2Name, string entity2Guid ) : void

Creates a CRM DisassociateRequest

GetDissassociateRelationship ( DateTime modifiedDate ) : ICollection

Retrieves the associations that have been deleted using the audit functionality in CRM.

GetDissassociateRelationshipKeys ( RetrieveMultipleRequest request ) : List

Gets a list of entity keys for entities that have been disassociated.

Initialize ( ) : void

Initializes the DynamicObjectProvider

This method will read the object definition configuration file for a given entity and initialize the dynamic object provider based on that file's contents if it is present on the system.

Method Details

DeleteObject() public method

Deletes an object
public DeleteObject ( object key ) : void
key object The object to be deleted
return void

DynamicObjectProvider() public method

Initializes a new instance of the DynamicObjectProvider class.
public DynamicObjectProvider ( ) : System
return System

GetSetStateRequest() protected method

Override that handles the setting of entity state codes on entities that have complex state transitions.
protected GetSetStateRequest ( int stateToSet, int statusToSet, Guid entityId ) : OrganizationRequest
stateToSet int The state code to be set.
statusToSet int The status code to be set.
entityId Guid The unique identifier of the entity to set the state and status on.
return OrganizationRequest

ReadDeletedObjectKeys() public method

Gets an ICollection containing Key objects that match the supplied modifiedDate.
public ReadDeletedObjectKeys ( DateTime modifiedDate ) : ICollection
modifiedDate DateTime A DateTime containing the last modified date for the object keys to be returned.
return ICollection

ReadObject() public method

Read an object from the stream
public ReadObject ( object key ) : object
key object The key for the object to be read
return object

ReadObjectKeys() public method

Gets an ICollection containing Key objects that match the supplied modifiedDate
public ReadObjectKeys ( DateTime modifiedDate ) : ICollection
modifiedDate DateTime A DateTime containing the last modified date for the object keys to be returned
return ICollection

WriteObject() public method

Writes an object to the stream
public WriteObject ( object value ) : void
value object The object to be written
return void