IWMSNamedValue Object (C#)

banner art

Previous Next

IWMSNamedValue Object (C#)

You can use the IWMSNamedValue object to specify the name and retrieve or specify the value of a name-value pair associated with the server. You can use the IWMSNamedValues object to manage a collection of name-value pairs.

The IWMSNamedValue object exposes the following properties.

Property Description
Name Retrieves the name portion of the name-value pair.
Value Specifies and retrieves the value portion of the name-value pair.

Example Code

The following example illustrates how to retrieve an IWMSNamedValue object.

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer                   Server;
IWMSNamedValues             NamedValues;
IWMSNamedValue              NamedValue;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the IWMSNamedValues object
    // containing descriptive information about the server.
    NamedValues = Server.Properties;

    // Retrieve information about each name-value pair.
    for (int i = 0; i < NamedValues.Count; i++)
    {
        NamedValue = NamedValues.get_Item(i);
    }

System and custom plug-ins contain default name-value pairs that can be accessed by simply indexing the name of the property you want to retrieve. For a list of the default values that you can access, see Registering Plug-in Properties.

The following example illustrates how to retrieve some default configuration values from the WMS Digest Authentication plug-in.

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

FakePre-ff46b9366168478b9170418d07d5aed8-016ae7635241418baaa006d42cc3d66d

See Also

Previous Next