AdministrationModuleProvider Class

Definition

Encapsulates information about the administration module provider.

public ref class AdministrationModuleProvider sealed
public sealed class AdministrationModuleProvider
type AdministrationModuleProvider = class
Public NotInheritable Class AdministrationModuleProvider
Inheritance
AdministrationModuleProvider

Examples

The following example retrieves an array list with each of the AdministrationModuleProvider objects. The application displays the name and type of each module provider.

base.OnActivated(initialActivation);
if (initialActivation)
{
    InitializeComponent();
    _serviceProxy = (DemoModuleServiceProxy)
        Connection.CreateProxy(Module, typeof(DemoModuleServiceProxy));

    AdministrationModuleCollection adminmodules =
        _serviceProxy.GetAdminModuleCollection();
    ArrayList moduleProviders = _serviceProxy.GetAdminProviderList();

    string collectiondisplay = null;
    collectiondisplay = adminmodules.ToString() + ":\nThere are "
        + adminmodules.Count + " modules in Administration.config\n\n";
    // Use the index to get the second AdministrationModule in the collection.
    collectiondisplay = collectiondisplay + "Second module: "
        + adminmodules[1].Name + "\n\n";
    // Display the name of each AdministrationModule.
    foreach (AdministrationModule adminModule in adminmodules)
    {
        collectiondisplay = collectiondisplay.ToString()
            + adminModule.Name + "\n";
    }

    string providersdisplay = null;
    providersdisplay = "There are " + moduleProviders.Count
        + " modules in Administration.config\n\n";
    // Display the name and type of each AdministrationModuleProvider.
    foreach (AdministrationModuleProvider
        adminProviderModule in moduleProviders)
    {
        providersdisplay = providersdisplay + adminProviderModule.Name +
            " - " + adminProviderModule.Type + "\n";
    }
    // Display either AdministrationModuleCollection or 
    // the AdministrationModuleProvider list.
    testLabel.Text = collectiondisplay;
    //testLabel.Text = providersdisplay;
}

Remarks

The <moduleProviders> section of the Administration.config file contains the collection of AdministrationModuleProvider objects.

Modifying the collection does not modify the Administration.config file.

Properties

Name

Gets the name of the administration module provider.

Type

Gets the type of the administration module provider.

Applies to

See also