C# Class Microsoft.Protocols.TestSuites.MS_OXORULE.MS_OXORULEAdapter

Adapter capture code for MS_OXORULEAdapter.
Inheritance: Microsoft.Protocols.TestTools.ManagedAdapterBase, IMS_OXORULEAdapter
Mostra file Open project: OfficeDev/Interop-TestSuites

Public Methods

Method Description
CleanUp ( ) : void

Release RPC binding and destroy RPC context handle.

Connect ( ConnectionType connectionType, string userName, string userESSDN, string userPassword ) : bool

Create RPC connection.

CreateReplyTemplate ( uint inboxFolderHandle, ulong inboxFolderID, bool isOOFReplyTemplate, string templateSubject, TaggedPropertyValue addedProperties, ulong &messageId, uint &messageHandler ) : byte[]

Create Reply Template use settings in Util.cs file. It will be used by create Rule of ActioType: OP_REPLY

GetFolderEntryId ( StoreObjectType storeObjectType, uint objHandle, ulong folderid ) : byte[]

Get folder EntryID bytes array.

GetLongTermId ( uint objHandle, ulong objId ) : RopLongTermIdFromIdResponse

Get LongTermId from object id.

GetMessageEntryId ( uint folderHandle, ulong folderId, uint messageHandle, ulong messageId ) : byte[]

Get message EntryID bytes array.

GetRecipientInfo ( string server, string userName, string domain, string password, PropertyTagArray_r columns ) : PropertyRowSet_r?

Get properties from NSPI table.

Initialize ( ITestSite testSite ) : void

Initialize test environment

NotificationProcess ( ) : RopNotifyResponse

Get notification detail from server.

QueryPropertiesInTable ( uint tableHandle, PropertyTag propertyTags ) : RopQueryRowsResponse

Query properties in contents table.

ReleaseRop ( uint handle ) : void

Release resources.

RopCreateFolder ( uint handle, string displayName, string comment, RopCreateFolderResponse &createFolderResponse ) : uint

This ROP creates a new subfolder.

RopCreateMessage ( uint handle, ulong folderId, byte isFAIMessage, RopCreateMessageResponse &createMessageResponse ) : uint

This ROP creates a Message object in a mailbox.

RopDeleteFolder ( uint objHandle, ulong folderId ) : RopDeleteFolderResponse

Delete specific folder.

RopDeleteProperties ( uint objHandle, PropertyTag propertyTags ) : RopDeletePropertiesResponse

This ROP deletes specific properties on a message.

RopEmptyFolder ( uint handle, byte wantAsynchronous ) : RopEmptyFolderResponse

This ROP deletes all messages and subfolders from a folder.

RopGetContentsTable ( uint handle, ContentTableFlag tableFlags, uint &tableHandle ) : RopGetContentsTableResponse

This ROP gets the contents table of a container.

RopGetPropertiesAll ( uint objHandle, ushort propertySizeLimit, ushort wantUnicode ) : RopGetPropertiesAllResponse

This ROP gets all properties on a message.

RopGetPropertiesSpecific ( uint objHandle, PropertyTag propertyTags ) : RopGetPropertiesSpecificResponse

This ROP gets specific properties of a message.

RopGetRulesTable ( uint objHandle, TableFlags tableFlags, RopGetRulesTableResponse &getRulesTableResponse ) : uint

This ROP gets the rules table of a folder.

RopLogon ( LogonType logonType, string userESSDN, RopLogonResponse &logonResponse ) : uint

This ROP logs on to a mailbox or public folder.

RopModifyRecipients ( uint objHandle, PropertyTag recipientColumns, ModifyRecipientRow recipientRows ) : RopModifyRecipientsResponse

This ROP adds or modifies recipients on a message.

RopModifyRules ( uint objHandle, ModifyRuleFlag modifyRulesFlags, RuleData ruleData ) : RopModifyRulesResponse

This ROP modifies the rules associated with a folder.

RopOpenFolder ( uint handle, ulong folderId, RopOpenFolderResponse &openFolderResponse ) : uint

This ROP opens an existing folder in a mailbox.

RopOpenMessage ( uint handle, ulong folderId, ulong messageId, RopOpenMessageResponse &openMessageResponse ) : uint

This ROP opens an existing message in a mailbox.

RopQueryRows ( uint objHandle, byte queryRowsFlags, byte forwardRead, ushort rowCount ) : RopQueryRowsResponse

This ROP retrieves rows from a table.

RopSaveChangesMessage ( uint handle ) : RopSaveChangesMessageResponse

This ROP commits the changes made to a message.

RopSetColumns ( uint objHandle, byte setColumnsFlags, PropertyTag propertyTags ) : RopSetColumnsResponse

This ROP sets the properties visible on a table.

RopSetProperties ( uint objHandle, TaggedPropertyValue taggedPropertyValueArray ) : RopSetPropertiesResponse

This ROP sets specific properties on a message.

RopSubmitMessage ( uint objHandle, SubmitFlag submitFlags ) : RopSubmitMessageResponse

This ROP submits a message for sending.

RopUpdateDeferredActionMessages ( uint objHandle, byte serverEntryId, byte clientEntryId ) : RopUpdateDeferredActionMessagesResponse

This ROP updates the entry IDs in the deferred action messages.

Private Methods

Method Description
DoRPCCall ( ISerializable ropRequest, uint objHandle, object &response, byte &rawData ) : List>

Process and send ROP request.

VerifyExtendRuleAction ( RuleAction ruleAction ) : void

Verify RuleAction buffer for extend rule.

VerifyExtendedRuleMessageActions ( ExtendedRuleActions extendeRuleActions ) : void

Verify ExtendedRuleActions buffer.

VerifyExtendedRuleMessageCondition ( ExtendedRuleCondition extendedRuleCondition ) : void

Verify ExtendedRuleCondition buffer.

VerifyFolderEntryID ( FolderEntryID folderEntryID, StoreObjectType storeObjectType ) : void

Verify the FolderEntryID structure.

VerifyMAPITransport ( ) : void

Verify MAPIHTTP transport.

VerifyMessageEntryID ( MessageEntryID messageEntryID ) : void

Verify the MessageEntryID structure.

VerifyNamedPropertyInformation ( NamedPropertyInfo namedPropertyInformation ) : void

Verify NamedPropertyInformation buffer.

VerifyPropertiesInRuleData ( RuleData ruleData ) : void

Verify the RopGetProperties in RuleData Structure.

VerifyPropertiesInTable ( PropertyTag propertyTags, RopQueryRowsResponse quertyRowsResponse ) : void

Verify the RopGetProperties in Rules Table.

VerifyPropertiesSpecific ( PropertyTag propertyTags ) : void

Verify the specific property.

VerifyPropertyName ( PropertyName propertyName ) : void

Verify PropertyName structure.

VerifyRopGetPropertiesAllForDEM ( RopGetPropertiesAllResponse ropGetPropertiesAllResponse ) : void

Verify the Properties in the DEM.

VerifyRopGetPropertiesAllForExtendedRules ( RopGetPropertiesAllResponse ropGetPropertiesAllResponse ) : void

Verify the RopGetPropertiesAll operation performed on extended rules.

VerifyRopGetRulesTable ( RopGetRulesTableResponse ropGetRulesTableResponse, RopGetRulesTableRequest ropGetRulesTableRequest ) : void

Verify the RopGetRulesTable operation.

VerifyRopModifyRules ( RopModifyRulesResponse ropModifyRulesResponse, RopModifyRulesRequest ropModifyRulesRequest ) : void

Verify the RopModifyRules operation.

VerifyRuleAction ( RuleAction ruleAction ) : void

Verify RuleAction buffer for stand rule.

VerifyStoreObjectEntryID ( StoreObjectEntryID storeEntryId ) : void

Verify the StoreObjectEntryID structure.

Method Details

CleanUp() public method

Release RPC binding and destroy RPC context handle.
public CleanUp ( ) : void
return void

Connect() public method

Create RPC connection.
public Connect ( ConnectionType connectionType, string userName, string userESSDN, string userPassword ) : bool
connectionType ConnectionType The type of connection.
userName string A string value indicates the domain account name that connects to server.
userESSDN string A string that identifies user who is making the EcDoConnectEx call
userPassword string A string value indicates the password of the user which is used.
return bool

CreateReplyTemplate() public method

Create Reply Template use settings in Util.cs file. It will be used by create Rule of ActioType: OP_REPLY
public CreateReplyTemplate ( uint inboxFolderHandle, ulong inboxFolderID, bool isOOFReplyTemplate, string templateSubject, TaggedPropertyValue addedProperties, ulong &messageId, uint &messageHandler ) : byte[]
inboxFolderHandle uint The inbox folder's handle.
inboxFolderID ulong The inbox folder's ID.
isOOFReplyTemplate bool Indicate whether the template to be created is a template for OP_REPLY or OP_OOF_REPLY .
templateSubject string The name of the template.
addedProperties Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue The properties that need to add to the reply template.
messageId ulong Message id of reply template message.
messageHandler uint The reply message Handler.
return byte[]

GetFolderEntryId() public method

Get folder EntryID bytes array.
public GetFolderEntryId ( StoreObjectType storeObjectType, uint objHandle, ulong folderid ) : byte[]
storeObjectType StoreObjectType Identify the store object is a mailbox or a public folder.
objHandle uint Logon handle.
folderid ulong Folder id value.
return byte[]

GetLongTermId() public method

Get LongTermId from object id.
public GetLongTermId ( uint objHandle, ulong objId ) : RopLongTermIdFromIdResponse
objHandle uint object handle.
objId ulong Object id value.
return Microsoft.Protocols.TestSuites.Common.RopLongTermIdFromIdResponse

GetMessageEntryId() public method

Get message EntryID bytes array.
public GetMessageEntryId ( uint folderHandle, ulong folderId, uint messageHandle, ulong messageId ) : byte[]
folderHandle uint Folder handle which the message exist.
folderId ulong Folder id value.
messageHandle uint message handle.
messageId ulong Message id value.
return byte[]

GetRecipientInfo() public method

Get properties from NSPI table.
public GetRecipientInfo ( string server, string userName, string domain, string password, PropertyTagArray_r columns ) : PropertyRowSet_r?
server string Server address.
userName string The value of user name.
domain string The value of Domain.
password string Password of the user.
columns PropertyTagArray_r PropertyTags to be query.
return PropertyRowSet_r?

Initialize() public method

Initialize test environment
public Initialize ( ITestSite testSite ) : void
testSite ITestSite Test Site.
return void

NotificationProcess() public method

Get notification detail from server.
public NotificationProcess ( ) : RopNotifyResponse
return RopNotifyResponse

QueryPropertiesInTable() public method

Query properties in contents table.
public QueryPropertiesInTable ( uint tableHandle, PropertyTag propertyTags ) : RopQueryRowsResponse
tableHandle uint Handle of a specific contents table.
propertyTags Microsoft.Protocols.TestSuites.Common.PropertyTag Array of PropertyTag structures. This field specifies the property values that are visible in table rows.
return Microsoft.Protocols.TestSuites.Common.RopQueryRowsResponse

ReleaseRop() public method

Release resources.
public ReleaseRop ( uint handle ) : void
handle uint Unsigned integer value indicates the Server object Handle
return void

RopCreateFolder() public method

This ROP creates a new subfolder.
public RopCreateFolder ( uint handle, string displayName, string comment, RopCreateFolderResponse &createFolderResponse ) : uint
handle uint Handle to operate.
displayName string This value specifies the name of the created folder. .
comment string This value specifies the folder comment that is associated with the created folder.
createFolderResponse Microsoft.Protocols.TestSuites.Common.RopCreateFolderResponse Response of this ROP.
return uint

RopCreateMessage() public method

This ROP creates a Message object in a mailbox.
public RopCreateMessage ( uint handle, ulong folderId, byte isFAIMessage, RopCreateMessageResponse &createMessageResponse ) : uint
handle uint Handle to operate.
folderId ulong This value identifies the parent folder.
isFAIMessage byte 8-bit Boolean. This value specifies whether the message is a folder associated information (FAI) message.
createMessageResponse Microsoft.Protocols.TestSuites.Common.RopCreateMessageResponse Response of this ROP.
return uint

RopDeleteFolder() public method

Delete specific folder.
public RopDeleteFolder ( uint objHandle, ulong folderId ) : RopDeleteFolderResponse
objHandle uint object handle .
folderId ulong ID of the folder will be deleted.
return Microsoft.Protocols.TestSuites.Common.RopDeleteFolderResponse

RopDeleteProperties() public method

This ROP deletes specific properties on a message.
public RopDeleteProperties ( uint objHandle, PropertyTag propertyTags ) : RopDeletePropertiesResponse
objHandle uint This index specifies the location in the Server object handle table where the handle for the input Server object is stored.
propertyTags Microsoft.Protocols.TestSuites.Common.PropertyTag Array of PropertyTag structures, this field specifies the property values to be deleted from the object.
return Microsoft.Protocols.TestSuites.Common.RopDeletePropertiesResponse

RopEmptyFolder() public method

This ROP deletes all messages and subfolders from a folder.
public RopEmptyFolder ( uint handle, byte wantAsynchronous ) : RopEmptyFolderResponse
handle uint Handle to operate.
wantAsynchronous byte 8-bit Boolean. This value specifies whether the operation is to be executed asynchronously with status reported via RopProgress.
return Microsoft.Protocols.TestSuites.Common.RopEmptyFolderResponse

RopGetContentsTable() public method

This ROP gets the contents table of a container.
public RopGetContentsTable ( uint handle, ContentTableFlag tableFlags, uint &tableHandle ) : RopGetContentsTableResponse
handle uint Handle to operate.
tableFlags ContentTableFlag 8-bit Flags structure. These Flags control the Type of table.
tableHandle uint Handle of contents table.
return Microsoft.Protocols.TestSuites.Common.RopGetContentsTableResponse

RopGetPropertiesAll() public method

This ROP gets all properties on a message.
public RopGetPropertiesAll ( uint objHandle, ushort propertySizeLimit, ushort wantUnicode ) : RopGetPropertiesAllResponse
objHandle uint This index specifies the location in the Server object handle table where the handle for the input Server object is stored.
propertySizeLimit ushort This value specifies the maximum Size allowed for a property value returned.
wantUnicode ushort This value specifies whether to return string properties in Unicode.
return Microsoft.Protocols.TestSuites.Common.RopGetPropertiesAllResponse

RopGetPropertiesSpecific() public method

This ROP gets specific properties of a message.
public RopGetPropertiesSpecific ( uint objHandle, PropertyTag propertyTags ) : RopGetPropertiesSpecificResponse
objHandle uint This index specifies the location in the Server object handle table where the handle for the input Server object is stored.
propertyTags Microsoft.Protocols.TestSuites.Common.PropertyTag This field specifies the properties requested.
return Microsoft.Protocols.TestSuites.Common.RopGetPropertiesSpecificResponse

RopGetRulesTable() public method

This ROP gets the rules table of a folder.
public RopGetRulesTable ( uint objHandle, TableFlags tableFlags, RopGetRulesTableResponse &getRulesTableResponse ) : uint
objHandle uint This index refers to the location in the Server object handle table used to find the handle for this operation.
tableFlags TableFlags These Flags control the Type of table. The possible values are specified in [MS-OXORULE].
getRulesTableResponse Microsoft.Protocols.TestSuites.Common.RopGetRulesTableResponse Structure of RopGetRulesTableResponse.
return uint

RopLogon() public method

This ROP logs on to a mailbox or public folder.
public RopLogon ( LogonType logonType, string userESSDN, RopLogonResponse &logonResponse ) : uint
logonType LogonType This Type specifies ongoing action on the mailbox or public folder.
userESSDN string A string that identifies the user to log on to the server.
logonResponse Microsoft.Protocols.TestSuites.Common.RopLogonResponse Response of this ROP.
return uint

RopModifyRecipients() public method

This ROP adds or modifies recipients on a message.
public RopModifyRecipients ( uint objHandle, PropertyTag recipientColumns, ModifyRecipientRow recipientRows ) : RopModifyRecipientsResponse
objHandle uint Handle to operate.
recipientColumns Microsoft.Protocols.TestSuites.Common.PropertyTag Array of PropertyTag structures. The number of structures contained in this field is specified by the ColumnCount field. This field specifies the property values that can be included for each recipient.
recipientRows ModifyRecipientRow List of ModifyRecipientRow structures. The number of structures contained in this field is specified by the RowCount field. .
return RopModifyRecipientsResponse

RopModifyRules() public method

This ROP modifies the rules associated with a folder.
public RopModifyRules ( uint objHandle, ModifyRuleFlag modifyRulesFlags, RuleData ruleData ) : RopModifyRulesResponse
objHandle uint This index refers to the handle in the Server object handle table used as input for this operation.
modifyRulesFlags ModifyRuleFlag The possible values are specified in [MS-OXORULE]. These Flags specify behavior of this operation.
ruleData Microsoft.Protocols.TestSuites.Common.RuleData An array of RuleData structures, each of which specifies details about a standard rule.
return Microsoft.Protocols.TestSuites.Common.RopModifyRulesResponse

RopOpenFolder() public method

This ROP opens an existing folder in a mailbox.
public RopOpenFolder ( uint handle, ulong folderId, RopOpenFolderResponse &openFolderResponse ) : uint
handle uint Handle to operate.
folderId ulong 64-bit identifier. This identifier specifies the folder to be opened.
openFolderResponse Microsoft.Protocols.TestSuites.Common.RopOpenFolderResponse Response of this ROP.
return uint

RopOpenMessage() public method

This ROP opens an existing message in a mailbox.
public RopOpenMessage ( uint handle, ulong folderId, ulong messageId, RopOpenMessageResponse &openMessageResponse ) : uint
handle uint Handle to operate.
folderId ulong 64-bit identifier. This value identifies the parent folder of the message to be opened.
messageId ulong 64-bit identifier. This value identifies the message to be opened.
openMessageResponse Microsoft.Protocols.TestSuites.Common.RopOpenMessageResponse Response of this ROP.
return uint

RopQueryRows() public method

This ROP retrieves rows from a table.
public RopQueryRows ( uint objHandle, byte queryRowsFlags, byte forwardRead, ushort rowCount ) : RopQueryRowsResponse
objHandle uint Handle to operate.
queryRowsFlags byte 8-bit Flags structure. The possible values are specified in [MS-OXCTABL]. These Flags control this operation.
forwardRead byte 8-bit Boolean. This value specifies the direction to read rows.
rowCount ushort Unsigned 16-bit integer. This value specifies the number of requested rows.
return Microsoft.Protocols.TestSuites.Common.RopQueryRowsResponse

RopSaveChangesMessage() public method

This ROP commits the changes made to a message.
public RopSaveChangesMessage ( uint handle ) : RopSaveChangesMessageResponse
handle uint Handle to operate.
return Microsoft.Protocols.TestSuites.Common.RopSaveChangesMessageResponse

RopSetColumns() public method

This ROP sets the properties visible on a table.
public RopSetColumns ( uint objHandle, byte setColumnsFlags, PropertyTag propertyTags ) : RopSetColumnsResponse
objHandle uint Handle to operate.
setColumnsFlags byte 8-bit Flags structure. These Flags control this operation.
propertyTags Microsoft.Protocols.TestSuites.Common.PropertyTag Array of PropertyTag structures. This field specifies the property values that are visible in table rows.
return Microsoft.Protocols.TestSuites.Common.RopSetColumnsResponse

RopSetProperties() public method

This ROP sets specific properties on a message.
public RopSetProperties ( uint objHandle, TaggedPropertyValue taggedPropertyValueArray ) : RopSetPropertiesResponse
objHandle uint This index specifies the location in the Server object handle table where the handle for the input Server object is stored.
taggedPropertyValueArray Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue Array of TaggedPropertyValue structures, this field specifies the property values to be set on the object.
return Microsoft.Protocols.TestSuites.Common.RopSetPropertiesResponse

RopSubmitMessage() public method

This ROP submits a message for sending.
public RopSubmitMessage ( uint objHandle, SubmitFlag submitFlags ) : RopSubmitMessageResponse
objHandle uint Handle to operate.
submitFlags SubmitFlag 8-bit Flags structure. These Flags specify special behavior for submitting the message.
return Microsoft.Protocols.TestSuites.Common.RopSubmitMessageResponse

RopUpdateDeferredActionMessages() public method

This ROP updates the entry IDs in the deferred action messages.
public RopUpdateDeferredActionMessages ( uint objHandle, byte serverEntryId, byte clientEntryId ) : RopUpdateDeferredActionMessagesResponse
objHandle uint This index refers to the location in the Server object handle table used to find the handle for this operation.
serverEntryId byte This value specifies the ID of the message on the server.
clientEntryId byte This value specifies the ID of the downloaded message on the client.
return Microsoft.Protocols.TestSuites.Common.RopUpdateDeferredActionMessagesResponse