C# Class Microsoft.Protocols.TestSuites.MS_OXCTABL.AdapterHelper

Provide AdapterHelper Methods.
Show file Open project: OfficeDev/Interop-TestSuites

Public Methods

Method Description
GenerateContentRestriction ( TaggedPropertyValue taggedPValue ) : byte[]

Build a RestrictionData as single ContentRestriction

GenerateRuleProperties ( string name ) : RuleProperties

Generate rule properties value.

GenerateValidRestrictData ( ITestSite site, TableType tableType ) : byte[]

Generate a sample valid RestrictData structure.

GenerateValidRuleData ( ActionTypes actionType, TestRuleDataType ruleDataType, int ruleSequence, RuleState ruleState, IActionData actionData, RuleProperties ruleProperties ) : RuleData

Generate a sample valid RuleData structure.

ReadTaggedProperty ( byte buffer ) : TaggedPropertyValue

Read a TaggedPropertyValue structure from buffer.

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

Read a value from buffer for special Type.

Private Methods

Method Description
AddRuleAction ( IList list, ActionTypes actionType, IActionData actionData, uint actionFlavor, uint actionFlag ) : void

Add rule action to the properties list

AddRuleCondition ( IList list, string mailSubjectContent ) : void

Add ruleCondition to the properties list

GenerateRuleAction ( ActionTypes actionType, Count bytesCount, IActionData actionDataBufferValue, uint actionFlavor, uint actionFlag ) : RuleAction

Generate a sample rule action.

Method Details

GenerateContentRestriction() public static method

Build a RestrictionData as single ContentRestriction
public static GenerateContentRestriction ( TaggedPropertyValue taggedPValue ) : byte[]
taggedPValue Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue A TaggedPropertyValue of this restriction
return byte[]

GenerateRuleProperties() public static method

Generate rule properties value.
public static GenerateRuleProperties ( string name ) : RuleProperties
name string Rule name.
return RuleProperties

GenerateValidRestrictData() public static method

Generate a sample valid RestrictData structure.
public static GenerateValidRestrictData ( ITestSite site, TableType tableType ) : byte[]
site ITestSite An instance of interface ITestSite which provides logging, assertions, /// and adapters for test code onto its execution context.
tableType TableType Identify the table type
return byte[]

GenerateValidRuleData() public static method

Generate a sample valid RuleData structure.
public static GenerateValidRuleData ( ActionTypes actionType, TestRuleDataType ruleDataType, int ruleSequence, RuleState ruleState, IActionData actionData, RuleProperties ruleProperties ) : RuleData
actionType ActionTypes ActionType in a rule
ruleDataType TestRuleDataType Rule data value.
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
ruleProperties RuleProperties Rule properties structure.
return Microsoft.Protocols.TestSuites.Common.RuleData

ReadTaggedProperty() public static method

Read a TaggedPropertyValue structure from buffer.
public static ReadTaggedProperty ( byte buffer ) : TaggedPropertyValue
buffer byte Buffer contain TaggedPropertyValue instance
return Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue

ReadValueByType() public static method

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
return byte[]