C# Класс Microsoft.Protocols.TestSuites.MS_OXORULE.AdapterHelper

Help method collection.
Показать файл Открыть проект

Открытые методы

Метод Описание
AllocFlatUID_r ( FlatUID_r fuid_r ) : IntPtr

Allocate memory for GUIDs.

AllocPropertyTagArray_r ( PropertyTagArray_r pta_r ) : IntPtr

Allocate memory for the specific property values.

AllocStat ( STAT stat ) : IntPtr

Allocate memory for stat instance.

ConvertStringToBytes ( string str ) : byte[]

This method converts a string to a byte array, the string is consist of hex16 values which are separated by ",".

GenerateContentRestriction ( TaggedPropertyValue taggedPValue ) : byte[]

Build a RestrictionData as single ContentRestriction.

GenerateExtendedRuleTestData ( string rulename, int ruleSequence, uint ruleState, string provider, ActionType actionType, IActionData actionData, string contentRestrictSubjectName, NamedPropertyInfo namedPropertyInfo ) : Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue[]

Generate test data for creating extended rule.

GenerateRecipientPropertiesBlock ( string userName, string userDN ) : Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue[]

Generate property value on recipient.

GenerateRuleInfoPropertiesOfDAM ( ) : Microsoft.Protocols.TestSuites.Common.PropertyTag[]

Generate PropertyTag arrays for rule properties of DAM.

GenerateRuleProperties ( ITestSite site, string name ) : RuleProperties

Generate rule properties value.

GenerateValidRuleData ( ActionType actionType, TestRuleDataType ruleDataType, int ruleSequence, RuleState ruleState, IActionData actionData, RuleProperties otherInfo, ulong ruleId ) : RuleData

Generate RuleData from ptf config base on different action Type.

GenerateValidRuleDataWithFlavor ( ActionType actionType, int ruleSequence, RuleState ruleState, IActionData actionData, uint actionFlavor, RuleProperties otherInfo ) : RuleData

Generate RuleData from ptf config base on different action Type.

IsContainSameValue ( uint uintArray ) : bool

This method is used to determine whether there are two elements of the same value in a uint array.

ParseBinaryArray_r ( IntPtr ptr ) : BinaryArray_r

Parse BinaryArray_r structure.

ParseBinary_r ( IntPtr ptr ) : Binary_r

Parse Binary_r structure.

ParseEphemeralEntryIDFromBytes ( byte bytes ) : EphemeralEntryID

Parse EphemeralEntryID structure from byte array.

ParseFlatUIDArray_r ( IntPtr ptr ) : FlatUIDArray_r

Parse FlatUIDArray_r structure.

ParseFlatUID_r ( IntPtr ptr ) : FlatUID_r

Parse GUIDs.

ParseLongArray_r ( IntPtr ptr ) : LongArray_r

Parse LongArray_r structure.

ParsePROP_VAL_UNION ( AddressBookPropertyValue propertyValue, PropertyTypeValue proptype ) : PROP_VAL_UNION

Parse PROP_VAL_UNION structure.

ParsePROP_VAL_UNION ( IntPtr ptr, PropertyTypeValue proptype ) : PROP_VAL_UNION

Parse PROP_VAL_UNION structure.

ParsePermanentEntryIDFromBytes ( byte bytes ) : PermanentEntryID

Parse PermanentEntryID structure from byte array.

ParsePropertyRowSet_r ( IntPtr ptr ) : PropertyRowSet_r

Parse PropertyRowSet_r structure.

ParsePropertyRowSet_r ( LargePropTagArray columns, uint rowCount, AddressBookPropertyRow rowData ) : PropertyRowSet_r

Parse PropertyRowSet_r structure.

ParsePropertyRowSet_r ( uint rowsCount, AddressBookPropValueList rows ) : PropertyRowSet_r

Parse PropertyRowSet_r structure.

ParsePropertyRow_r ( AddressBookPropValueList row ) : PropertyRow_r

Parse the PropertyRow_r structure.

ParsePropertyRow_r ( IntPtr ptr ) : PropertyRow_r

Parse PropertyRow_r structure.

ParsePropertyValue_r ( IntPtr ptr ) : PropertyValue_r

Parse PropertyValue_r structure.

ParseShortArray_r ( IntPtr ptr ) : ShortArray_r

Parse ShortArray_r structure.

ParseStat ( IntPtr ptr ) : STAT

Parse a STAT structure instance from pointer.

ParseStringArray_r ( IntPtr ptr ) : StringArray_r

Parse StringArray_r structure.

ParseString_r ( IntPtr ptr ) : byte[]

Parse String_r structure.

ParseWStringArray_r ( IntPtr ptr ) : WStringArray_r

Parse WStringArray_r structure.

ParseWString_r ( IntPtr ptr ) : byte[]

Parse WString_r structure.

PropertyValueConvertToBinary ( byte byteArray ) : byte[]

This method help to convert the property value, which is of variable bytes, to binary value.

PropertyValueConvertToBool ( byte byteArray ) : bool

This method help to convert the property value, which is of 1 byte, to Boolean value.

PropertyValueConvertToExtendedRuleActions ( byte byteArray ) : ExtendedRuleActions

This method help to convert the property value, which is of variable bytes, to ExtendedRuleActions structure.

PropertyValueConvertToExtendedRuleCondition ( byte byteArray ) : ExtendedRuleCondition

This method help to convert the property value, which is of variable bytes, to ExtendedRuleCondition structure.

PropertyValueConvertToInt ( byte byteArray ) : int

This method helps to convert the property value, which is of 4 bytes, to int value.

PropertyValueConvertToRuleAction ( byte byteArray ) : RuleAction

This method help to convert the property value, which is of variable bytes, to RuleAction structure.

PropertyValueConvertToString ( byte byteArray ) : string

This method help to convert the property value, which is of variable bytes, to string value.

PropertyValueConvertToUint ( byte byteArray ) : uint

This method helps to convert the property value, which is of 4 bytes, to unsigned integer value.

PropertyValueConvertToUint64 ( byte byteArray ) : ulong

This method helps to convert the property value, which is of 8 bytes, to unsigned long value.

ReadTaggedProperty ( byte buffer ) : TaggedPropertyValue

Get a TaggedPropertyValue structure from buffer.

ReadValueByType ( ushort type, byte buffer ) : byte[]

Read a value from buffer for special Type.

SerializeRecipientProperties ( ) : uint[]

Serialize recipient properties.

Приватные методы

Метод Описание
AddRuleAction ( IList list, ActionType actionType, IActionData actionData, uint actionFlavor, uint actionFlags ) : void

Add rule action to the properties list.

AddRuleCondition ( IList list, string mailSubjectContent ) : void

Add ruleCondition to the properties list.

GetRuleAction ( ActionType actionType, CountByte countBytes, IActionData actionDataBufferValue, uint actionFlavor, uint actionFlags ) : RuleAction

Generate a rule action.

Описание методов

AllocFlatUID_r() публичный статический Метод

Allocate memory for GUIDs.
public static AllocFlatUID_r ( FlatUID_r fuid_r ) : IntPtr
fuid_r FlatUID_r Instance of GUIDs.
Результат System.IntPtr

AllocPropertyTagArray_r() публичный статический Метод

Allocate memory for the specific property values.
public static AllocPropertyTagArray_r ( PropertyTagArray_r pta_r ) : IntPtr
pta_r PropertyTagArray_r PropertyTagArray_r instance.
Результат System.IntPtr

AllocStat() публичный статический Метод

Allocate memory for stat instance.
public static AllocStat ( STAT stat ) : IntPtr
stat STAT The stat instance.
Результат System.IntPtr

ConvertStringToBytes() публичный статический Метод

This method converts a string to a byte array, the string is consist of hex16 values which are separated by ",".
public static ConvertStringToBytes ( string str ) : byte[]
str string A string to be converted.
Результат byte[]

GenerateContentRestriction() публичный статический Метод

Build a RestrictionData as single ContentRestriction.
public static GenerateContentRestriction ( TaggedPropertyValue taggedPValue ) : byte[]
taggedPValue Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue A TaggedPropertyValue of this restriction.
Результат byte[]

GenerateExtendedRuleTestData() публичный статический Метод

Generate test data for creating extended rule.
public static GenerateExtendedRuleTestData ( string rulename, int ruleSequence, uint ruleState, string provider, ActionType actionType, IActionData actionData, string contentRestrictSubjectName, NamedPropertyInfo namedPropertyInfo ) : Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue[]
rulename string The rule name.
ruleSequence int The rule sequence.
ruleState uint The rule state.
provider string The rule provider.
actionType ActionType The rule action Type.
actionData IActionData The rule action data.
contentRestrictSubjectName string The subject name of the rule content restriction.
namedPropertyInfo NamedPropertyInfo The namedPropertyInfo that needed for construct the rule data.
Результат Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue[]

GenerateRecipientPropertiesBlock() публичный статический Метод

Generate property value on recipient.
public static GenerateRecipientPropertiesBlock ( string userName, string userDN ) : Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue[]
userName string Recipient user name.
userDN string Recipient user dn.
Результат Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue[]

GenerateRuleInfoPropertiesOfDAM() публичный статический Метод

Generate PropertyTag arrays for rule properties of DAM.
public static GenerateRuleInfoPropertiesOfDAM ( ) : Microsoft.Protocols.TestSuites.Common.PropertyTag[]
Результат Microsoft.Protocols.TestSuites.Common.PropertyTag[]

GenerateRuleProperties() публичный статический Метод

Generate rule properties value.
public static GenerateRuleProperties ( ITestSite site, string name ) : RuleProperties
site ITestSite An instance of interface ITestSite which provides logging, assertions, /// and adapters for test code onto its execution context.
name string Rule name.
Результат RuleProperties

GenerateValidRuleData() публичный статический Метод

Generate RuleData from ptf config base on different action Type.
public static GenerateValidRuleData ( ActionType actionType, TestRuleDataType ruleDataType, int ruleSequence, RuleState ruleState, IActionData actionData, RuleProperties otherInfo, ulong ruleId ) : RuleData
actionType ActionType ActionType in a rule.
ruleDataType TestRuleDataType The type of the rule data.
ruleSequence int Rule sequence in PidTagRuleSequence of the RuleData.
ruleState RuleState Specifies value of PidTagRuleState of the RuleData.
actionData IActionData The actionData needed to construct the RuleData.
otherInfo RuleProperties /// An array of Other needed information of Actions. /// Index may be from 0-4 /// 0. Rule name /// 1. Rule provider /// 2. Rule user Flags /// 3. Rule provider data /// 4. Subject name of content restriction ///
ruleId ulong A 64-bit unsigned integer represents the rule.
Результат Microsoft.Protocols.TestSuites.Common.RuleData

GenerateValidRuleDataWithFlavor() публичный статический Метод

Generate RuleData from ptf config base on different action Type.
public static GenerateValidRuleDataWithFlavor ( ActionType actionType, int ruleSequence, RuleState ruleState, IActionData actionData, uint actionFlavor, RuleProperties otherInfo ) : RuleData
actionType ActionType ActionType in a rule.
ruleSequence int Rule sequence in PidTagRuleSequence of the RuleData.
ruleState RuleState Specifies value of PidTagRuleState of the RuleData.
actionData IActionData The actionData needed to construct the RuleData.
actionFlavor uint The actionFlavor of the rule action.
otherInfo RuleProperties /// An array of Other needed information of Actions. /// Index may be from 0-4 /// 0. Rule name /// 1. Rule provider /// 2. Rule user Flags /// 3. Rule provider data /// 4. Subject name of content restriction ///
Результат Microsoft.Protocols.TestSuites.Common.RuleData

IsContainSameValue() публичный статический Метод

This method is used to determine whether there are two elements of the same value in a uint array.
public static IsContainSameValue ( uint uintArray ) : bool
uintArray uint The unsigned integer array to be evaluated.
Результат bool

ParseBinaryArray_r() публичный статический Метод

Parse BinaryArray_r structure.
public static ParseBinaryArray_r ( IntPtr ptr ) : BinaryArray_r
ptr System.IntPtr A pointer points to the allocated memory.
Результат BinaryArray_r

ParseBinary_r() публичный статический Метод

Parse Binary_r structure.
public static ParseBinary_r ( IntPtr ptr ) : Binary_r
ptr System.IntPtr A pointer points to the allocated memory.
Результат Binary_r

ParseEphemeralEntryIDFromBytes() публичный статический Метод

Parse EphemeralEntryID structure from byte array.
public static ParseEphemeralEntryIDFromBytes ( byte bytes ) : EphemeralEntryID
bytes byte The byte array to be parsed.
Результат EphemeralEntryID

ParseFlatUIDArray_r() публичный статический Метод

Parse FlatUIDArray_r structure.
public static ParseFlatUIDArray_r ( IntPtr ptr ) : FlatUIDArray_r
ptr System.IntPtr A pointer points to the allocated memory.
Результат FlatUIDArray_r

ParseFlatUID_r() публичный статический Метод

Parse GUIDs.
public static ParseFlatUID_r ( IntPtr ptr ) : FlatUID_r
ptr System.IntPtr A pointer points to the allocated memory.
Результат FlatUID_r

ParseLongArray_r() публичный статический Метод

Parse LongArray_r structure.
public static ParseLongArray_r ( IntPtr ptr ) : LongArray_r
ptr System.IntPtr A pointer points to the allocated memory.
Результат LongArray_r

ParsePROP_VAL_UNION() публичный статический Метод

Parse PROP_VAL_UNION structure.
public static ParsePROP_VAL_UNION ( AddressBookPropertyValue propertyValue, PropertyTypeValue proptype ) : PROP_VAL_UNION
propertyValue AddressBookPropertyValue The property value used for parsing.
proptype PropertyTypeValue The Property Types used for parsing.
Результат PROP_VAL_UNION

ParsePROP_VAL_UNION() публичный статический Метод

Parse PROP_VAL_UNION structure.
public static ParsePROP_VAL_UNION ( IntPtr ptr, PropertyTypeValue proptype ) : PROP_VAL_UNION
ptr System.IntPtr A pointer points to the allocated memory.
proptype PropertyTypeValue Property Types.
Результат PROP_VAL_UNION

ParsePermanentEntryIDFromBytes() публичный статический Метод

Parse PermanentEntryID structure from byte array.
public static ParsePermanentEntryIDFromBytes ( byte bytes ) : PermanentEntryID
bytes byte The byte array to be parsed.
Результат PermanentEntryID

ParsePropertyRowSet_r() публичный статический Метод

Parse PropertyRowSet_r structure.
public static ParsePropertyRowSet_r ( IntPtr ptr ) : PropertyRowSet_r
ptr System.IntPtr A pointer points to the allocated memory.
Результат PropertyRowSet_r

ParsePropertyRowSet_r() публичный статический Метод

Parse PropertyRowSet_r structure.
public static ParsePropertyRowSet_r ( LargePropTagArray columns, uint rowCount, AddressBookPropertyRow rowData ) : PropertyRowSet_r
columns LargePropTagArray The columns which contain property tags.
rowCount uint The row count of the PropertyRowSet_r.
rowData AddressBookPropertyRow The row data which contain the property values.
Результат PropertyRowSet_r

ParsePropertyRowSet_r() публичный статический Метод

Parse PropertyRowSet_r structure.
public static ParsePropertyRowSet_r ( uint rowsCount, AddressBookPropValueList rows ) : PropertyRowSet_r
rowsCount uint The row count of the PropertyRowSet_r.
rows AddressBookPropValueList The rows which contains property tags and property values.
Результат PropertyRowSet_r

ParsePropertyRow_r() публичный статический Метод

Parse the PropertyRow_r structure.
public static ParsePropertyRow_r ( AddressBookPropValueList row ) : PropertyRow_r
row AddressBookPropValueList The row which contains property tags and property values
Результат PropertyRow_r

ParsePropertyRow_r() публичный статический Метод

Parse PropertyRow_r structure.
public static ParsePropertyRow_r ( IntPtr ptr ) : PropertyRow_r
ptr System.IntPtr A pointer points to the allocated memory.
Результат PropertyRow_r

ParsePropertyValue_r() публичный статический Метод

Parse PropertyValue_r structure.
public static ParsePropertyValue_r ( IntPtr ptr ) : PropertyValue_r
ptr System.IntPtr A pointer points to the allocated memory.
Результат PropertyValue_r

ParseShortArray_r() публичный статический Метод

Parse ShortArray_r structure.
public static ParseShortArray_r ( IntPtr ptr ) : ShortArray_r
ptr System.IntPtr A pointer points to the allocated memory.
Результат ShortArray_r

ParseStat() публичный статический Метод

Parse a STAT structure instance from pointer.
public static ParseStat ( IntPtr ptr ) : STAT
ptr System.IntPtr Pointer points to the memory.
Результат STAT

ParseStringArray_r() публичный статический Метод

Parse StringArray_r structure.
public static ParseStringArray_r ( IntPtr ptr ) : StringArray_r
ptr System.IntPtr A pointer points to the allocated memory.
Результат StringArray_r

ParseString_r() публичный статический Метод

Parse String_r structure.
public static ParseString_r ( IntPtr ptr ) : byte[]
ptr System.IntPtr A pointer points to the allocated memory.
Результат byte[]

ParseWStringArray_r() публичный статический Метод

Parse WStringArray_r structure.
public static ParseWStringArray_r ( IntPtr ptr ) : WStringArray_r
ptr System.IntPtr A pointer points to the allocated memory.
Результат WStringArray_r

ParseWString_r() публичный статический Метод

Parse WString_r structure.
public static ParseWString_r ( IntPtr ptr ) : byte[]
ptr System.IntPtr A pointer points to the allocated memory.
Результат byte[]

PropertyValueConvertToBinary() публичный статический Метод

This method help to convert the property value, which is of variable bytes, to binary value.
public static PropertyValueConvertToBinary ( byte byteArray ) : byte[]
byteArray byte The byte array to be converted.
Результат byte[]

PropertyValueConvertToBool() публичный статический Метод

This method help to convert the property value, which is of 1 byte, to Boolean value.
public static PropertyValueConvertToBool ( byte byteArray ) : bool
byteArray byte The byte array to be converted.
Результат bool

PropertyValueConvertToExtendedRuleActions() публичный статический Метод

This method help to convert the property value, which is of variable bytes, to ExtendedRuleActions structure.
public static PropertyValueConvertToExtendedRuleActions ( byte byteArray ) : ExtendedRuleActions
byteArray byte The byte array to be converted.
Результат ExtendedRuleActions

PropertyValueConvertToExtendedRuleCondition() публичный статический Метод

This method help to convert the property value, which is of variable bytes, to ExtendedRuleCondition structure.
public static PropertyValueConvertToExtendedRuleCondition ( byte byteArray ) : ExtendedRuleCondition
byteArray byte The byte array to be converted.
Результат ExtendedRuleCondition

PropertyValueConvertToInt() публичный статический Метод

This method helps to convert the property value, which is of 4 bytes, to int value.
public static PropertyValueConvertToInt ( byte byteArray ) : int
byteArray byte The byte array to be converted.
Результат int

PropertyValueConvertToRuleAction() публичный статический Метод

This method help to convert the property value, which is of variable bytes, to RuleAction structure.
public static PropertyValueConvertToRuleAction ( byte byteArray ) : RuleAction
byteArray byte The byte array to be converted.
Результат RuleAction

PropertyValueConvertToString() публичный статический Метод

This method help to convert the property value, which is of variable bytes, to string value.
public static PropertyValueConvertToString ( byte byteArray ) : string
byteArray byte The byte array to be converted.
Результат string

PropertyValueConvertToUint() публичный статический Метод

This method helps to convert the property value, which is of 4 bytes, to unsigned integer value.
public static PropertyValueConvertToUint ( byte byteArray ) : uint
byteArray byte The byte array to be converted.
Результат uint

PropertyValueConvertToUint64() публичный статический Метод

This method helps to convert the property value, which is of 8 bytes, to unsigned long value.
public static PropertyValueConvertToUint64 ( byte byteArray ) : ulong
byteArray byte The byte array to be converted.
Результат ulong

ReadTaggedProperty() публичный статический Метод

Get a TaggedPropertyValue structure from buffer.
public static ReadTaggedProperty ( byte buffer ) : TaggedPropertyValue
buffer byte Buffer contain TaggedPropertyValue instance.
Результат Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue

ReadValueByType() публичный статический Метод

Read a value from buffer for special Type.
public static ReadValueByType ( ushort type, byte buffer ) : byte[]
type ushort The Type of value.
buffer byte Buffer contains value.
Результат byte[]

SerializeRecipientProperties() публичный статический Метод

Serialize recipient properties.
public static SerializeRecipientProperties ( ) : uint[]
Результат uint[]