C# Класс Microsoft.Protocols.TestSuites.MS_OXCMSG.PropertyHelper

A driver for property initialization.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetBinaryFromGeneral ( byte bytes ) : byte[]

Returns a byte array which append the length of the Input as the first two bytes of input Byte array.

GetPropertyByName ( List propertyList, PropertyNames propertyName ) : PropertyObj

The extended method for List of PropertyObj to find the exact one by property name.

GetPropertyNameByID ( uint propertyID, uint propertyType ) : PropertyNames

Find a property name from dictionary by property ID.

GetPropertyObjFromBuffer ( PropertyTag propertyTags, RopGetPropertiesSpecificResponse response ) : List

Override GetPropertyObjFromBuffer with PropertyTag list type.

GetPropertyObjFromBuffer ( RopGetPropertiesAllResponse response ) : List

Override GetPropertyObjFromBuffer without PropertyTag list type. Instead of that the properties will be collected from response.

GetPropertyObjFromBuffer ( PropertyObj property, byte bytes ) : PropertyObj

Get a property's value from bytes.

Initialize ( ITestSite testSite ) : void

Initialize the AdapterHelper class.

InitializePropertyTagDic ( ) : void

Initialize the dictionary for Property name and PropertyTag.

IsErrorCode ( byte responseValue ) : bool

Check whether the return value in response is error.

IsErrorCode ( object responseValue ) : bool

Check whether the return value in response is error.

IsPropertyValid ( PropertyObj property ) : bool

Determine whether the property value is valid.

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

Метод Описание
AddPropertyTagToDic ( PropertyNames propertyName, PropertyTag propertyTag ) : void

Add a PropertyTag object to PropertyTag dictionary.

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

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

Returns a byte array which append the length of the Input as the first two bytes of input Byte array.
public static GetBinaryFromGeneral ( byte bytes ) : byte[]
bytes byte The input Byte array
Результат byte[]

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

The extended method for List of PropertyObj to find the exact one by property name.
public static GetPropertyByName ( List propertyList, PropertyNames propertyName ) : PropertyObj
propertyList List List of PropertyObj
propertyName PropertyNames A property name value
Результат PropertyObj

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

Find a property name from dictionary by property ID.
public static GetPropertyNameByID ( uint propertyID, uint propertyType ) : PropertyNames
propertyID uint A unsigned integer value
propertyType uint Property type code
Результат PropertyNames

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

Override GetPropertyObjFromBuffer with PropertyTag list type.
public static GetPropertyObjFromBuffer ( PropertyTag propertyTags, RopGetPropertiesSpecificResponse response ) : List
propertyTags Microsoft.Protocols.TestSuites.Common.PropertyTag List of PropertyTag
response Microsoft.Protocols.TestSuites.Common.RopGetPropertiesSpecificResponse RopGetPropertiesSpecificResponse packet
Результат List

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

Override GetPropertyObjFromBuffer without PropertyTag list type. Instead of that the properties will be collected from response.
public static GetPropertyObjFromBuffer ( RopGetPropertiesAllResponse response ) : List
response Microsoft.Protocols.TestSuites.Common.RopGetPropertiesAllResponse RopGetPropertiesAllResponse packet
Результат List

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

Get a property's value from bytes.
public static GetPropertyObjFromBuffer ( PropertyObj property, byte bytes ) : PropertyObj
property PropertyObj Send the property
bytes byte The response buffer binary bytes
Результат PropertyObj

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

Initialize the AdapterHelper class.
public static Initialize ( ITestSite testSite ) : void
testSite ITestSite The instance of ITestSite.
Результат void

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

Initialize the dictionary for Property name and PropertyTag.
public static InitializePropertyTagDic ( ) : void
Результат void

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

Check whether the return value in response is error.
public static IsErrorCode ( byte responseValue ) : bool
responseValue byte The response value
Результат bool

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

Check whether the return value in response is error.
public static IsErrorCode ( object responseValue ) : bool
responseValue object The response value
Результат bool

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

Determine whether the property value is valid.
public static IsPropertyValid ( PropertyObj property ) : bool
property PropertyObj The input PropertyObj.
Результат bool