C# 클래스 Microsoft.Protocols.TestSuites.Common.Common

A class that contains the common methods used by test suites.
파일 보기 프로젝트 열기: OfficeDev/Interop-TestSuites

공개 메소드들

메소드 설명
AddInt16LengthBeforeBinaryArray ( byte bytes ) : byte[]

Add bytes length to the first two bytes of the new array, and append bytes to the new array

CompareByteArray ( byte bytes1, byte bytes2 ) : bool

Compare two byte arrays

CompressAndObfuscateRequest ( byte inputStream, ITestSite site ) : byte[]

Compresses stream using LZ77 algorithm if CompressRpcRequest is set to true in configuration, and obfuscates stream if XorRpcRequest is set to true in configuration. If none of the properties is true, the original stream is returned.

CompressStream ( byte inputStream ) : byte[]

Compresses payload in the stream with LZ77 algorithm and updates the header.

ConvertActiveSyncProtocolVersion ( string originalVersion, ITestSite site ) : string

Convert the ActiveSyncProtocolVersion gotten from ptfconfig file to the string could be used in ActiveSyncClient.

ConvertByteArrayToUint ( byte bytes ) : uint

Convert a byte array to an unsigned integer. If the length of byte array is greater than 4, just convert the first 4 bytes.

CreateAutodiscoverRequest ( string emailAddress, string acceptableResponseSchema ) : AutodiscoverRequest

Creates an Autodiscover request

CreateFolderCreateRequest ( ) : FolderCreateRequest

Creates an empty FolderCreateRequest instance

CreateFolderCreateRequest ( string syncKey, byte type, string displayName, string parentId ) : FolderCreateRequest

Creates a FolderCreateRequest instance using the specified information

CreateFolderDeleteRequest ( ) : FolderDeleteRequest

Creates an empty FolderDeleteRequest instance

CreateFolderDeleteRequest ( string syncKey, string serverId ) : FolderDeleteRequest

Creates a FolderDeleteRequest instance using the specified information

CreateFolderSyncRequest ( string syncKey ) : FolderSyncRequest

Creates a folder Sync request using specified syncKey

CreateFolderUpdateRequest ( ) : FolderUpdateRequest

Creates an empty FolderUpdateRequest instance

CreateFolderUpdateRequest ( string syncKey, string serverId, string displayName, string parentId ) : FolderUpdateRequest

Creates an empty FolderUpdateRequest instance

CreateGetAttachmentRequest ( ) : GetAttachmentRequest

Create GetAttachmentRequest instance, because there is XML body for the GetAttachment command, then the RequestData always will be null

CreateGetItemEstimateRequest ( ) : GetItemEstimateRequest

Creates an empty GetItemEstimateRequest instance

CreateGetItemEstimateRequest ( Request collections ) : GetItemEstimateRequest

Creates a GetItemEstimateRequest using the specified GetItemEstimateCollection array

CreateInitialSyncRequest ( string collectionId ) : SyncRequest

Create an initial Sync request.

CreateItemOperationsRequest ( ) : ItemOperationsRequest

Creates an empty ItemOperationsRequest instance

CreateItemOperationsRequest ( object items ) : ItemOperationsRequest

Creates an ItemOperationsRequest instance using specified items

CreateMeetingRequestMime ( string from, string to, string subject, string body, string icalendarContent ) : string

Create a meeting request mime

CreateMeetingResponseRequest ( ) : MeetingResponseRequest

Create an empty MeetingResponseRequest instance

CreateMeetingResponseRequest ( Request requests ) : MeetingResponseRequest

Create a MeetingResponseRequest instance using specified MeetingResponseRequest array

CreateMoveItemsRequest ( ) : MoveItemsRequest

Create an empty MoveItemsRequest instance

CreateMoveItemsRequest ( Request items ) : MoveItemsRequest

Create a MoveItemsRequest instance using specified MoveItemsMove array

CreatePingRequest ( ) : PingRequest

Create an empty PingRequest instance

CreatePingRequest ( Request folders, string heartbeatInterval ) : PingRequest

Create a PingRequest instance using specified PingFolder array and heartbeatInterval

CreatePlainTextMime ( string from, string to, string cc, string bcc, string subject, string body, string sender = null, string replyTo = null ) : string

Create a sample plain text mime

CreateProvisionRequest ( ) : ProvisionRequest

Create an empty ProvisionRequest instance

CreateProvisionRequest ( Request deviceInformation, Request policies, Request remoteWipe ) : ProvisionRequest

Create a ProvisionRequest instance using specified information

CreateResolveRecipientsRequest ( ) : ResolveRecipientsRequest

Create an empty ResolveRecipientsRequest instance

CreateResolveRecipientsRequest ( object items ) : ResolveRecipientsRequest

Create a ResolveRecipientsRequest instance using specified information

CreateSearchRequest ( ) : SearchRequest

Create an empty SearchRequest instance

CreateSearchRequest ( Request searchStores ) : SearchRequest

Create a SearchRequest using specified information

CreateSearchRequest ( string keyword, string folderCollectionId ) : SearchRequest

Create a Search request using the specified keyword and folder collection ID

CreateSendMailRequest ( ) : SendMailRequest

Create an empty SendMailRequest instance

CreateSendMailRequest ( string clientId, bool copyToSentItems, string mime ) : SendMailRequest

Builds a SendMail request by using the specified client Id, copyToSentItems option and mail mime content.

CreateSendMailRequest ( string accountId, string clientId, string mime ) : SendMailRequest

Create a SendMailRequest instance using specified information

CreateSettingsRequest ( ) : SettingsRequest

Create an empty SettingsRequest instance

CreateSmartForwardRequest ( ) : SmartForwardRequest

Create an empty SmartForwardRequest instance

CreateSmartForwardRequest ( string accountId, string clientId, string mime, Request source ) : SmartForwardRequest

Create a SmartForwardRequest instance using specified information

CreateSmartReplyRequest ( ) : SmartReplyRequest

Create an empty SmartReplyRequest instance

CreateSmartReplyRequest ( string accountId, string clientId, string mime, Request source ) : SmartReplyRequest

Create a SmartReplyRequest instance using specified information

CreateSyncRequest ( ) : SyncRequest

Creates an empty Sync request

CreateSyncRequest ( Request syncCollections ) : SyncRequest

Creates a Sync request using the specified SyncCollection array

CreateValidateCertRequest ( ) : ValidateCertRequest

Create an empty ValidateCertRequest instance

CreateValidateCertRequest ( byte certificates ) : ValidateCertRequest

Create a ValidateCertRequest by specified the certificates in the byte[][] format

DecompressStream ( byte inputStream ) : byte[]

Decompresses payload in the stream with LZ77 algorithm and updates the header.

FormatBinaryDate ( byte content, int line = 16, int column = 16 ) : string

Format the raw data of Rop request and response.

FormatString ( string format ) : string

Extension of string.Format to use the string as the object to be formatted. When the string argument is null, this extension will treat it as string.Empty

GeneratePrefixOfResourceName ( ITestSite site ) : string

A method used to generate the prefix of a resource name based on the current test case name. For example, if the current test case name is "MSOXCRPC_S01_TC01_TestEcDoConnectEx", the prefix will be "MSOXCRPC_S01_TC01".

GenerateResourceName ( ITestSite site, string resourceName ) : string

A method used to generate a unique name with protocol short name (without dash "-"), resource name and time stamp.

GenerateResourceName ( ITestSite site, string resourceName, uint index ) : string

A method used to generate a unique name with protocol short name (without dash "-"), resource name, index and time stamp when creating multiple resources of the same type.

GetBytesFromBinaryHexString ( string str ) : byte[]

Convert a hex16 string to byte array

GetBytesFromMutiUnicodeString ( string strs ) : byte[]

Convert a string array to byte array

GetBytesFromUnicodeString ( string str ) : byte[]

Convert a string to byte array.

GetCodePageName ( string combinedString ) : string

Get the CodePageName from the CombinedString

GetConfigurationPropertyValue ( string propertyName, ITestSite site ) : string

Get a specified property value from ptfconfig file.

GetContentTypeHeader ( string headerValue ) : string

Get the Content-Type header.

GetDefaultFolderServerId ( FolderSyncResponse folderSyncResponse, FolderType folderType, ITestSite site ) : string

Get the server ID for the given default folder type in the actual FolderSyncResponse.

GetErrorCodeFromException ( WebException webException ) : string

Get status code from web exception which will be returned by IIS.

GetMailAddress ( string userName, string domain ) : string

Get mailbox by user name and domain.

GetNoSeparatorDateTime ( string time ) : System.DateTime

Try to parse the no separator time string to DateTime

GetSearchStatusCode ( SendStringResponse response ) : string

Get search response status which returned by the SendStringRequest operation.

GetStringFromBinary ( byte bytes, bool isFirstTwoByteStoreLength ) : string

Get string from the byte array. If the byte array contains length, remove the first four byte

GetSutVersion ( ITestSite site ) : SutVersion

Get SUT version.

GetTagName ( string combinedTagAndToken, byte &matchedToken ) : string

Get tag name and token.

GetTimeZone ( string name, int bias ) : string

Get the TimeZone string which is base64 encoded according the specified name and bias. For detailed algorithm refer to [MS-ASDTYPE] 2.6.4 TimeZone

IsDNMatchABNF ( string dn, DNFormat format ) : bool

To determine whether the DN matches regular expression or not. The regular expression is generated according to the ABNF in [MS-OXOABK] section 2.2.1.1.

IsGUID ( byte bytes ) : bool

Check whether the byte array is GUID or not

IsNullTerminatedASCIIStr ( byte bytes ) : bool

Check whether the byte array is null terminated ASCII string.

IsOutputHandleInRopRequest ( ISerializable ropRequest ) : bool

Identify whether the Rop request contains more than one server object handle. Refers to [MS-OXCROPS] for more details.

IsRequirementEnabled ( int requirementId, ITestSite site ) : bool

Check whether the specified requirement is enabled to run or not.

IsStringBase64Encoded ( string stringData ) : bool

This method is used to verify whether the data element is Base64Encoding

IsUtf16LEString ( byte bytes ) : bool

Check whether a byte array is a valid utf16 encoding or not

LoadAddElements ( Response collectionCommands, Collection addElements ) : void

Load sync collection Add elements which are not sync until this sync

LoadChangeElements ( Response collectionCommands, Collection changeElements ) : void

Load Change elements in Sync response

LoadDeleteElements ( Response collectionCommands, Collection deleteElements ) : void

Load Delete elements in Sync response

LoadItemOperationsResponse ( ItemOperationsResponse itemOperations ) : ItemOperationsStore

Convert the ItemOperationsResponse to ItemOperationsStore

LoadSearchResponse ( SearchResponse search ) : SearchStore

Load the SearchStore from the SearchResponse

LoadSyncResponse ( SyncResponse response ) : SyncStore

Load SyncResponse to SyncStore.

MergeConfiguration ( ITestSite site ) : void

Merge common configuration and SHOULD/MAY configuration files.

MergeConfigurationFile ( string configFilename, ITestSite site ) : void

Merge the properties from the specified ptfconfig file.

MergeGlobalConfig ( string globalConfigFilename, ITestSite site ) : void

Merge the properties from the global ptfconfig file.

MergeSHOULDMAYConfig ( ITestSite site ) : void

Merge the properties from the SHOULD/MAY ptfconfig file.

RecordCreatedItem ( string collectionId, string itemSubject ) : CreatedItems

Record items impacted by current test case.

SetSpecifiedPropertyValueByName ( object targetObject, string propertyName, object value ) : void

Set a value in the target object using the specified property name

ToArray ( this nodes ) : XmlNode[]

Extend XmlNodeList can convert to an XmlNode array

ValidateServerCertificate ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool

Verify the remote Secure Sockets Layer (SSL) certificate used for authentication.

VerifyActualValues ( string elementName, string expectedValues, string actualValue, ITestSite site ) : void

Get all the valid values of one element

XOR ( byte inputStream ) : byte[]

Obfuscates or reverts payload in the stream by applying XOR to each byte of the data with the value 0xA5 and updates the header.

비공개 메소드들

메소드 설명
FormatCurrentDateTime ( ) : string

Format the current timestamp to this format "HHmmss_fff".

LZ77Compress ( byte inputStream ) : byte[]

Compresses stream using LZ77 algorithm and encodes using Direct2 algorithm.

LZ77Decompress ( byte inputStream, int actualSize ) : byte[]

Decodes stream using Direct2 algorithm and decompresses using LZ77 algorithm.

메소드 상세

AddInt16LengthBeforeBinaryArray() 공개 정적인 메소드

Add bytes length to the first two bytes of the new array, and append bytes to the new array
public static AddInt16LengthBeforeBinaryArray ( byte bytes ) : byte[]
bytes byte Original byte array
리턴 byte[]

CompareByteArray() 공개 정적인 메소드

Compare two byte arrays
public static CompareByteArray ( byte bytes1, byte bytes2 ) : bool
bytes1 byte The first byte array
bytes2 byte The second byte array
리턴 bool

CompressAndObfuscateRequest() 공개 정적인 메소드

Compresses stream using LZ77 algorithm if CompressRpcRequest is set to true in configuration, and obfuscates stream if XorRpcRequest is set to true in configuration. If none of the properties is true, the original stream is returned.
public static CompressAndObfuscateRequest ( byte inputStream, ITestSite site ) : byte[]
inputStream byte The stream to be compressed and obfuscated. The stream should contain header and payload.
site ITestSite An instance of interface ITestSite which provides logging, assertions, and adapters for test code onto its execution context.
리턴 byte[]

CompressStream() 공개 정적인 메소드

Compresses payload in the stream with LZ77 algorithm and updates the header.
public static CompressStream ( byte inputStream ) : byte[]
inputStream byte The stream to be compressed. The stream should contain header and payload.
리턴 byte[]

ConvertActiveSyncProtocolVersion() 공개 정적인 메소드

Convert the ActiveSyncProtocolVersion gotten from ptfconfig file to the string could be used in ActiveSyncClient.
public static ConvertActiveSyncProtocolVersion ( string originalVersion, ITestSite site ) : string
originalVersion string The original ActiveSyncProtocolVersion gotten from ptfconfig file.
site ITestSite An instance of interface ITestSite which provides logging, assertions, and adapters for test code onto its execution context.
리턴 string

ConvertByteArrayToUint() 공개 정적인 메소드

Convert a byte array to an unsigned integer. If the length of byte array is greater than 4, just convert the first 4 bytes.
public static ConvertByteArrayToUint ( byte bytes ) : uint
bytes byte The byte array to be converted
리턴 uint

CreateAutodiscoverRequest() 공개 정적인 메소드

Creates an Autodiscover request
public static CreateAutodiscoverRequest ( string emailAddress, string acceptableResponseSchema ) : AutodiscoverRequest
emailAddress string An email address
acceptableResponseSchema string Acceptable response schema
리턴 AutodiscoverRequest

CreateFolderCreateRequest() 공개 정적인 메소드

Creates an empty FolderCreateRequest instance
public static CreateFolderCreateRequest ( ) : FolderCreateRequest
리턴 FolderCreateRequest

CreateFolderCreateRequest() 공개 정적인 메소드

Creates a FolderCreateRequest instance using the specified information
public static CreateFolderCreateRequest ( string syncKey, byte type, string displayName, string parentId ) : FolderCreateRequest
syncKey string The syncKey of this request
type byte The type of created folder
displayName string The display name of the folder
parentId string The parentId of the created folder
리턴 FolderCreateRequest

CreateFolderDeleteRequest() 공개 정적인 메소드

Creates an empty FolderDeleteRequest instance
public static CreateFolderDeleteRequest ( ) : FolderDeleteRequest
리턴 FolderDeleteRequest

CreateFolderDeleteRequest() 공개 정적인 메소드

Creates a FolderDeleteRequest instance using the specified information
public static CreateFolderDeleteRequest ( string syncKey, string serverId ) : FolderDeleteRequest
syncKey string The syncKey of this request
serverId string Specified the deleted folder's server id
리턴 FolderDeleteRequest

CreateFolderSyncRequest() 공개 정적인 메소드

Creates a folder Sync request using specified syncKey
public static CreateFolderSyncRequest ( string syncKey ) : FolderSyncRequest
syncKey string Specified sync key
리턴 FolderSyncRequest

CreateFolderUpdateRequest() 공개 정적인 메소드

Creates an empty FolderUpdateRequest instance
public static CreateFolderUpdateRequest ( ) : FolderUpdateRequest
리턴 FolderUpdateRequest

CreateFolderUpdateRequest() 공개 정적인 메소드

Creates an empty FolderUpdateRequest instance
public static CreateFolderUpdateRequest ( string syncKey, string serverId, string displayName, string parentId ) : FolderUpdateRequest
syncKey string The syncKey of this request
serverId string Specified the updated folder's server id
displayName string Specified new display name of the folder
parentId string Specified new parentId of the created folder
리턴 FolderUpdateRequest

CreateGetAttachmentRequest() 공개 정적인 메소드

Create GetAttachmentRequest instance, because there is XML body for the GetAttachment command, then the RequestData always will be null
public static CreateGetAttachmentRequest ( ) : GetAttachmentRequest
리턴 GetAttachmentRequest

CreateGetItemEstimateRequest() 공개 정적인 메소드

Creates an empty GetItemEstimateRequest instance
public static CreateGetItemEstimateRequest ( ) : GetItemEstimateRequest
리턴 GetItemEstimateRequest

CreateGetItemEstimateRequest() 공개 정적인 메소드

Creates a GetItemEstimateRequest using the specified GetItemEstimateCollection array
public static CreateGetItemEstimateRequest ( Request collections ) : GetItemEstimateRequest
collections Request Specified GetItemEstimateCollection array
리턴 GetItemEstimateRequest

CreateInitialSyncRequest() 공개 정적인 메소드

Create an initial Sync request.
public static CreateInitialSyncRequest ( string collectionId ) : SyncRequest
collectionId string The server id of the folder to be synchronized.
리턴 SyncRequest

CreateItemOperationsRequest() 공개 정적인 메소드

Creates an empty ItemOperationsRequest instance
public static CreateItemOperationsRequest ( ) : ItemOperationsRequest
리턴 ItemOperationsRequest

CreateItemOperationsRequest() 공개 정적인 메소드

Creates an ItemOperationsRequest instance using specified items
public static CreateItemOperationsRequest ( object items ) : ItemOperationsRequest
items object Specified object items array
리턴 ItemOperationsRequest

CreateMeetingRequestMime() 공개 정적인 메소드

Create a meeting request mime
public static CreateMeetingRequestMime ( string from, string to, string subject, string body, string icalendarContent ) : string
from string The from address of mail
to string The to address of the mail
subject string The subject of the mail
body string The body content of the mail
icalendarContent string The content of iCalendar required by this meeting
리턴 string

CreateMeetingResponseRequest() 공개 정적인 메소드

Create an empty MeetingResponseRequest instance
public static CreateMeetingResponseRequest ( ) : MeetingResponseRequest
리턴 MeetingResponseRequest

CreateMeetingResponseRequest() 공개 정적인 메소드

Create a MeetingResponseRequest instance using specified MeetingResponseRequest array
public static CreateMeetingResponseRequest ( Request requests ) : MeetingResponseRequest
requests Request Specified the MeetingResponseRequest array
리턴 MeetingResponseRequest

CreateMoveItemsRequest() 공개 정적인 메소드

Create an empty MoveItemsRequest instance
public static CreateMoveItemsRequest ( ) : MoveItemsRequest
리턴 MoveItemsRequest

CreateMoveItemsRequest() 공개 정적인 메소드

Create a MoveItemsRequest instance using specified MoveItemsMove array
public static CreateMoveItemsRequest ( Request items ) : MoveItemsRequest
items Request Specified the MoveItemsMove array
리턴 MoveItemsRequest

CreatePingRequest() 공개 정적인 메소드

Create an empty PingRequest instance
public static CreatePingRequest ( ) : PingRequest
리턴 PingRequest

CreatePingRequest() 공개 정적인 메소드

Create a PingRequest instance using specified PingFolder array and heartbeatInterval
public static CreatePingRequest ( Request folders, string heartbeatInterval ) : PingRequest
folders Request Specified PingFolder array
heartbeatInterval string Specified heartbeatInterval
리턴 PingRequest

CreatePlainTextMime() 공개 정적인 메소드

Create a sample plain text mime
public static CreatePlainTextMime ( string from, string to, string cc, string bcc, string subject, string body, string sender = null, string replyTo = null ) : string
from string The from address of mail
to string The to address of the mail
cc string The cc address of the mail
bcc string The bcc address of the mail
subject string The subject of the mail
body string The body content of the mail
sender string The sender of the mail
replyTo string The replyTo of the mail
리턴 string

CreateProvisionRequest() 공개 정적인 메소드

Create an empty ProvisionRequest instance
public static CreateProvisionRequest ( ) : ProvisionRequest
리턴 ProvisionRequest

CreateProvisionRequest() 공개 정적인 메소드

Create a ProvisionRequest instance using specified information
public static CreateProvisionRequest ( Request deviceInformation, Request policies, Request remoteWipe ) : ProvisionRequest
deviceInformation Request Specified the device information
policies Request Specified the policies
remoteWipe Request Specified the remoteWipe
리턴 ProvisionRequest

CreateResolveRecipientsRequest() 공개 정적인 메소드

Create an empty ResolveRecipientsRequest instance
public static CreateResolveRecipientsRequest ( ) : ResolveRecipientsRequest
리턴 ResolveRecipientsRequest

CreateResolveRecipientsRequest() 공개 정적인 메소드

Create a ResolveRecipientsRequest instance using specified information
public static CreateResolveRecipientsRequest ( object items ) : ResolveRecipientsRequest
items object Specified the resolve recipients items
리턴 ResolveRecipientsRequest

CreateSearchRequest() 공개 정적인 메소드

Create an empty SearchRequest instance
public static CreateSearchRequest ( ) : SearchRequest
리턴 SearchRequest

CreateSearchRequest() 공개 정적인 메소드

Create a SearchRequest using specified information
public static CreateSearchRequest ( Request searchStores ) : SearchRequest
searchStores Request Specified SearchStore arrays
리턴 SearchRequest

CreateSearchRequest() 공개 정적인 메소드

Create a Search request using the specified keyword and folder collection ID
public static CreateSearchRequest ( string keyword, string folderCollectionId ) : SearchRequest
keyword string Specify a string value for which to search.
folderCollectionId string Specify the folder in which to search.
리턴 SearchRequest

CreateSendMailRequest() 공개 정적인 메소드

Create an empty SendMailRequest instance
public static CreateSendMailRequest ( ) : SendMailRequest
리턴 SendMailRequest

CreateSendMailRequest() 공개 정적인 메소드

Builds a SendMail request by using the specified client Id, copyToSentItems option and mail mime content.
public static CreateSendMailRequest ( string clientId, bool copyToSentItems, string mime ) : SendMailRequest
clientId string Specify the client Id
copyToSentItems bool Specify whether needs to store a mail copy to sent items
mime string Specify the mail mime
리턴 SendMailRequest

CreateSendMailRequest() 공개 정적인 메소드

Create a SendMailRequest instance using specified information
public static CreateSendMailRequest ( string accountId, string clientId, string mime ) : SendMailRequest
accountId string Specified the account Id
clientId string Specified the client Id
mime string Specified the mime
리턴 SendMailRequest

CreateSettingsRequest() 공개 정적인 메소드

Create an empty SettingsRequest instance
public static CreateSettingsRequest ( ) : SettingsRequest
리턴 SettingsRequest

CreateSmartForwardRequest() 공개 정적인 메소드

Create an empty SmartForwardRequest instance
public static CreateSmartForwardRequest ( ) : SmartForwardRequest
리턴 SmartForwardRequest

CreateSmartForwardRequest() 공개 정적인 메소드

Create a SmartForwardRequest instance using specified information
public static CreateSmartForwardRequest ( string accountId, string clientId, string mime, Request source ) : SmartForwardRequest
accountId string Specified the account Id
clientId string Specified the client Id
mime string Specified the mime
source Request Specified the SmartForwardSource
리턴 SmartForwardRequest

CreateSmartReplyRequest() 공개 정적인 메소드

Create an empty SmartReplyRequest instance
public static CreateSmartReplyRequest ( ) : SmartReplyRequest
리턴 SmartReplyRequest

CreateSmartReplyRequest() 공개 정적인 메소드

Create a SmartReplyRequest instance using specified information
public static CreateSmartReplyRequest ( string accountId, string clientId, string mime, Request source ) : SmartReplyRequest
accountId string Specified the account Id
clientId string Specified the client Id
mime string Specified the mime
source Request Specified the SmartReplySource
리턴 SmartReplyRequest

CreateSyncRequest() 공개 정적인 메소드

Creates an empty Sync request
public static CreateSyncRequest ( ) : SyncRequest
리턴 SyncRequest

CreateSyncRequest() 공개 정적인 메소드

Creates a Sync request using the specified SyncCollection array
public static CreateSyncRequest ( Request syncCollections ) : SyncRequest
syncCollections Request Specified SyncCollection array
리턴 SyncRequest

CreateValidateCertRequest() 공개 정적인 메소드

Create an empty ValidateCertRequest instance
public static CreateValidateCertRequest ( ) : ValidateCertRequest
리턴 ValidateCertRequest

CreateValidateCertRequest() 공개 정적인 메소드

Create a ValidateCertRequest by specified the certificates in the byte[][] format
public static CreateValidateCertRequest ( byte certificates ) : ValidateCertRequest
certificates byte Specified the certificates
리턴 ValidateCertRequest

DecompressStream() 공개 정적인 메소드

Decompresses payload in the stream with LZ77 algorithm and updates the header.
public static DecompressStream ( byte inputStream ) : byte[]
inputStream byte The stream to be decompressed. The stream should contain header and payload.
리턴 byte[]

FormatBinaryDate() 공개 정적인 메소드

Format the raw data of Rop request and response.
public static FormatBinaryDate ( byte content, int line = 16, int column = 16 ) : string
content byte Raw data of Rops
line int The line of the data to be displayed.
column int The column of the data to be displayed.
리턴 string

FormatString() 공개 정적인 메소드

Extension of string.Format to use the string as the object to be formatted. When the string argument is null, this extension will treat it as string.Empty
public static FormatString ( string format ) : string
format string A composite format string
리턴 string

GeneratePrefixOfResourceName() 공개 정적인 메소드

A method used to generate the prefix of a resource name based on the current test case name. For example, if the current test case name is "MSOXCRPC_S01_TC01_TestEcDoConnectEx", the prefix will be "MSOXCRPC_S01_TC01".
public static GeneratePrefixOfResourceName ( ITestSite site ) : string
site ITestSite An instance of interface ITestSite which provides logging, assertions, /// and adapters for test code onto its execution context.
리턴 string

GenerateResourceName() 공개 정적인 메소드

A method used to generate a unique name with protocol short name (without dash "-"), resource name and time stamp.
public static GenerateResourceName ( ITestSite site, string resourceName ) : string
site ITestSite An instance of interface ITestSite which provides logging, assertions, /// and adapters for test code onto its execution context.
resourceName string A parameter that represents the resource name which is used to combine the unique name
리턴 string

GenerateResourceName() 공개 정적인 메소드

A method used to generate a unique name with protocol short name (without dash "-"), resource name, index and time stamp when creating multiple resources of the same type.
public static GenerateResourceName ( ITestSite site, string resourceName, uint index ) : string
site ITestSite An instance of interface ITestSite which provides logging, assertions, /// and adapters for test code onto its execution context.
resourceName string A parameter that represents the resource name which is used to combine the unique name
index uint A parameter that represents the index of the resources of the same type, which is used to combine the unique name
리턴 string

GetBytesFromBinaryHexString() 공개 정적인 메소드

Convert a hex16 string to byte array
public static GetBytesFromBinaryHexString ( string str ) : byte[]
str string The original hex16 string
리턴 byte[]

GetBytesFromMutiUnicodeString() 공개 정적인 메소드

Convert a string array to byte array
public static GetBytesFromMutiUnicodeString ( string strs ) : byte[]
strs string The string array to be converted
리턴 byte[]

GetBytesFromUnicodeString() 공개 정적인 메소드

Convert a string to byte array.
public static GetBytesFromUnicodeString ( string str ) : byte[]
str string The string to be converted
리턴 byte[]

GetCodePageName() 공개 정적인 메소드

Get the CodePageName from the CombinedString
public static GetCodePageName ( string combinedString ) : string
combinedString string a string contain tag name and matched token following the format"identifier|CodePageName|TagName|Token"
리턴 string

GetConfigurationPropertyValue() 공개 정적인 메소드

Get a specified property value from ptfconfig file.
public static GetConfigurationPropertyValue ( string propertyName, ITestSite site ) : string
propertyName string The name of property.
site ITestSite An instance of interface ITestSite which provides logging, assertions, /// and adapters for test code onto its execution context.
리턴 string

GetContentTypeHeader() 공개 정적인 메소드

Get the Content-Type header.
public static GetContentTypeHeader ( string headerValue ) : string
headerValue string The string included charset and type in the Content-Type header.
리턴 string

GetDefaultFolderServerId() 공개 정적인 메소드

Get the server ID for the given default folder type in the actual FolderSyncResponse.
public static GetDefaultFolderServerId ( FolderSyncResponse folderSyncResponse, FolderType folderType, ITestSite site ) : string
folderSyncResponse FolderSyncResponse A FolderSyncResponse returned by previous ActiveSync FolderSync operation.
folderType FolderType Specify the default folder type.
site ITestSite An instance of interface ITestSite which provides logging, assertions, and adapters for test code onto its execution context.
리턴 string

GetErrorCodeFromException() 공개 정적인 메소드

Get status code from web exception which will be returned by IIS.
public static GetErrorCodeFromException ( WebException webException ) : string
webException System.Net.WebException Web exception
리턴 string

GetMailAddress() 공개 정적인 메소드

Get mailbox by user name and domain.
public static GetMailAddress ( string userName, string domain ) : string
userName string The user name.
domain string The domain in which the user is.
리턴 string

GetNoSeparatorDateTime() 공개 정적인 메소드

Try to parse the no separator time string to DateTime
public static GetNoSeparatorDateTime ( string time ) : System.DateTime
time string The specified DateTime string
리턴 System.DateTime

GetSearchStatusCode() 공개 정적인 메소드

Get search response status which returned by the SendStringRequest operation.
public static GetSearchStatusCode ( SendStringResponse response ) : string
response SendStringResponse The SendStringResponse instance
리턴 string

GetStringFromBinary() 공개 정적인 메소드

Get string from the byte array. If the byte array contains length, remove the first four byte
public static GetStringFromBinary ( byte bytes, bool isFirstTwoByteStoreLength ) : string
bytes byte The byte array contains string
isFirstTwoByteStoreLength bool Determine if the byte array contains length
리턴 string

GetSutVersion() 공개 정적인 메소드

Get SUT version.
public static GetSutVersion ( ITestSite site ) : SutVersion
site ITestSite An instance of interface ITestSite which provides logging, assertions, and adapters for test code onto its execution context.
리턴 SutVersion

GetTagName() 공개 정적인 메소드

Get tag name and token.
public static GetTagName ( string combinedTagAndToken, byte &matchedToken ) : string
combinedTagAndToken string A string contain tag name and matched token following the format"identifier|CodePageName|TagName|Token"
matchedToken byte Output the matched Token
리턴 string

GetTimeZone() 공개 정적인 메소드

Get the TimeZone string which is base64 encoded according the specified name and bias. For detailed algorithm refer to [MS-ASDTYPE] 2.6.4 TimeZone
public static GetTimeZone ( string name, int bias ) : string
name string The StandardName or DaylightName for TimeZone
bias int The offset from UTC
리턴 string

IsDNMatchABNF() 공개 정적인 메소드

To determine whether the DN matches regular expression or not. The regular expression is generated according to the ABNF in [MS-OXOABK] section 2.2.1.1.
public static IsDNMatchABNF ( string dn, DNFormat format ) : bool
dn string The distinguished name value to be matched.
format DNFormat The DN format needs to be matched.
리턴 bool

IsGUID() 공개 정적인 메소드

Check whether the byte array is GUID or not
public static IsGUID ( byte bytes ) : bool
bytes byte The byte array to be checked
리턴 bool

IsNullTerminatedASCIIStr() 공개 정적인 메소드

Check whether the byte array is null terminated ASCII string.
public static IsNullTerminatedASCIIStr ( byte bytes ) : bool
bytes byte The byte array to be checked
리턴 bool

IsOutputHandleInRopRequest() 공개 정적인 메소드

Identify whether the Rop request contains more than one server object handle. Refers to [MS-OXCROPS] for more details.
public static IsOutputHandleInRopRequest ( ISerializable ropRequest ) : bool
ropRequest ISerializable ROP request objects.
리턴 bool

IsRequirementEnabled() 공개 정적인 메소드

Check whether the specified requirement is enabled to run or not.
public static IsRequirementEnabled ( int requirementId, ITestSite site ) : bool
requirementId int The unique requirement number.
site ITestSite An instance of interface ITestSite which provides logging, assertions, /// and adapters for test code onto its execution context.
리턴 bool

IsStringBase64Encoded() 공개 정적인 메소드

This method is used to verify whether the data element is Base64Encoding
public static IsStringBase64Encoded ( string stringData ) : bool
stringData string The data value
리턴 bool

IsUtf16LEString() 공개 정적인 메소드

Check whether a byte array is a valid utf16 encoding or not
public static IsUtf16LEString ( byte bytes ) : bool
bytes byte The byte array to be checked
리턴 bool

LoadAddElements() 공개 정적인 메소드

Load sync collection Add elements which are not sync until this sync
public static LoadAddElements ( Response collectionCommands, Collection addElements ) : void
collectionCommands Response The add operation response
addElements Collection The collection to be loaded in
리턴 void

LoadChangeElements() 공개 정적인 메소드

Load Change elements in Sync response
public static LoadChangeElements ( Response collectionCommands, Collection changeElements ) : void
collectionCommands Response The change operation response
changeElements Collection The collection to be loaded in
리턴 void

LoadDeleteElements() 공개 정적인 메소드

Load Delete elements in Sync response
public static LoadDeleteElements ( Response collectionCommands, Collection deleteElements ) : void
collectionCommands Response The delete operation response
deleteElements Collection The collection to be loaded in
리턴 void

LoadItemOperationsResponse() 공개 정적인 메소드

Convert the ItemOperationsResponse to ItemOperationsStore
public static LoadItemOperationsResponse ( ItemOperationsResponse itemOperations ) : ItemOperationsStore
itemOperations Microsoft.Protocols.TestSuites.Common.Response.ItemOperationsResponse The returned ItemOperations response.
리턴 Microsoft.Protocols.TestSuites.Common.DataStructures.ItemOperationsStore

LoadSearchResponse() 공개 정적인 메소드

Load the SearchStore from the SearchResponse
public static LoadSearchResponse ( SearchResponse search ) : SearchStore
search Microsoft.Protocols.TestSuites.Common.Response.SearchResponse The returned Search response.
리턴 Microsoft.Protocols.TestSuites.Common.DataStructures.SearchStore

LoadSyncResponse() 공개 정적인 메소드

Load SyncResponse to SyncStore.
public static LoadSyncResponse ( SyncResponse response ) : SyncStore
response SyncResponse A SyncResponse instance.
리턴 Microsoft.Protocols.TestSuites.Common.DataStructures.SyncStore

MergeConfiguration() 공개 정적인 메소드

Merge common configuration and SHOULD/MAY configuration files.
public static MergeConfiguration ( ITestSite site ) : void
site ITestSite An instance of interface ITestSite which provides logging, assertions, and adapters for test code onto its execution context.
리턴 void

MergeConfigurationFile() 공개 정적인 메소드

Merge the properties from the specified ptfconfig file.
public static MergeConfigurationFile ( string configFilename, ITestSite site ) : void
configFilename string ptfconfig filename.
site ITestSite An instance of interface ITestSite which provides logging, assertions, /// and adapters for test code onto its execution context.
리턴 void

MergeGlobalConfig() 공개 정적인 메소드

Merge the properties from the global ptfconfig file.
public static MergeGlobalConfig ( string globalConfigFilename, ITestSite site ) : void
globalConfigFilename string Global ptfconfig filename.
site ITestSite An instance of interface ITestSite which provides logging, assertions, /// and adapters for test code onto its execution context.
리턴 void

MergeSHOULDMAYConfig() 공개 정적인 메소드

Merge the properties from the SHOULD/MAY ptfconfig file.
public static MergeSHOULDMAYConfig ( ITestSite site ) : void
site ITestSite An instance of interface ITestSite which provides logging, assertions, /// and adapters for test code onto its execution context.
리턴 void

RecordCreatedItem() 공개 정적인 메소드

Record items impacted by current test case.
public static RecordCreatedItem ( string collectionId, string itemSubject ) : CreatedItems
collectionId string The CollectionId of the folder which the item is placed.
itemSubject string The subject of the item to delete.
리턴 CreatedItems

SetSpecifiedPropertyValueByName() 공개 정적인 메소드

Set a value in the target object using the specified property name
public static SetSpecifiedPropertyValueByName ( object targetObject, string propertyName, object value ) : void
targetObject object The target object
propertyName string The property name
value object The property value
리턴 void

ToArray() 공개 정적인 메소드

Extend XmlNodeList can convert to an XmlNode array
public static ToArray ( this nodes ) : XmlNode[]
nodes this The XmlNodeList array
리턴 XmlNode[]

ValidateServerCertificate() 공개 정적인 메소드

Verify the remote Secure Sockets Layer (SSL) certificate used for authentication.
public static ValidateServerCertificate ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool
sender object An object that contains state information for this validation.
certificate X509Certificate The certificate used to authenticate the remote party.
chain X509Chain The chain of certificate authorities associated with the remote certificate.
sslPolicyErrors SslPolicyErrors One or more errors associated with the remote certificate.
리턴 bool

VerifyActualValues() 공개 정적인 메소드

Get all the valid values of one element
public static VerifyActualValues ( string elementName, string expectedValues, string actualValue, ITestSite site ) : void
elementName string The name of the element.
expectedValues string The array of all expected values.
actualValue string The actual value of one element.
site ITestSite An instance of interface ITestSite which provides logging, assertions, and adapters for test code onto its execution context.
리턴 void

XOR() 공개 정적인 메소드

Obfuscates or reverts payload in the stream by applying XOR to each byte of the data with the value 0xA5 and updates the header.
public static XOR ( byte inputStream ) : byte[]
inputStream byte The stream to be obfuscated or reverted. The stream should contain header and payload.
리턴 byte[]