Partager via


IWMSContext Object (C#)

The IWMSContext object provides methods for retrieving, adding, or updating a context. A context is an unordered list of name-value pairs. Each name can only be used once, and each value has exactly one data type. The methods in the following table enable you to specify and retrieve values based on their data type. You retrieve values from a public context by using a predefined member of the WMSDefines class and an associated key. The server resolves the class member to a reference to the name of the property, and it uses the key to speed the search for the property value. Typically, a key is made up of the class member followed by _ID. If you do not use a key, it is recommended that you specify WMS_NO_NAME_HINT defined in the WMS_CONTEXT_HINT_CONSTANTS enumeration type.

Note

   This object is available only on Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; and Windows Server 2008.

The IWMSContext object exposes the following properties and methods.

Method

Description

CopyValues

Copies specified values to another context.

GetAndQueryIUnknownValue

Retrieves a specified object.

GetArrayValue

Retrieves an array of string values.

GetContextType

Retrieves an enumeration value that indicates the context type.

GetDateValue

Retrieves a DateTime value from the context.

GetIndexedValue

Retrieves a specific value from the context by index.

GetIUnknownValue

Retrieves an IUnknown value for the specified context.

GetLongValue

Retrieves an int value for the specified context.

GetQwordValue

Retrieves a 64-bit value for the specified context.

GetStringValue

Retrieves a string value for the specified context.

GetValue

Retrieves an object containing a value.

GetValueCount

Retrieves the number of values in the context.

RemoveAllValues

Clears all values from the context.

RemoveValue

Clears a specific value from the context.

SetArrayValue

Specifies an array of string values.

SetDateValue

Specifies a DateTime value for the context.

SetIUnknownValue

Specifies an IUnknown value for the context.

SetLongValue

Specifies an int value for the context.

SetQwordValue

Specifies a 64-bit value for the context.

SetStringValue

Specifies a string value for the context.

SetValue

Specifies a context value.

See Also

Concepts

Custom Plug-in Objects (C#)