Compartir a través de


IWMSPublishingPoints Object (C#)

The IWMSPublishingPoints object contains a collection of IWMSPublishingPoint objects.

The IWMSPublishingPoints object exposes the following properties and methods.

Property

Description

Count

Retrieves the number of IWMSPublishingPoint objects in the IWMSPublishingPoints collection.

length

Retrieves the number of IWMSPublishingPoint objects in the IWMSPublishingPoints collection. This method is provided for JScript compatibility.

Method

Description

Add

Creates a new IWMSPublishingPoint object and adds it to the IWMSPublishingPoints collection.

Clone

Creates a duplicate instance of a specific IWMSPublishingPoint object.

ImportXML

Creates a new publishing point using the configuration data specified in an XML file.

Remove

Removes a specific IWMSPublishingPoint object from the IWMSPublishingPoints collection.

In C#, there are two ways to access objects in a collection:

  • Access individual objects directly by using a string (where applicable)

  • Iterate through the objects by using an index

You must use array notation when retrieving objects from a collection, except when using the get_Item method.

Example

The following example illustrates how to retrieve an IWMSPublishingPoints object.

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

// Declare variables.
WMSServer              Server;
IWMSPublishingPoints   PubPoints;

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

    // Retrieve the IWMSPublishingPoints object.
    PubPoints = Server.PublishingPoints;
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}