AdministrationModuleProvider Class

AdministrationModuleProvider Class

IIS 7.0

Encapsulates information about the administration module provider.


Namespace:  Microsoft.Web.Management.Server
Assembly:  Microsoft.Web.Management (in Microsoft.Web.Management.dll)

public sealed class AdministrationModuleProvider

The AdministrationModuleProvider type exposes the following members.

Public propertyNameGets the name of the administration module provider.
Public propertyTypeGets the type of the administration module provider.

Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)

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

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

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

if (initialActivation)
    _serviceProxy = (DemoModuleServiceProxy)
        Connection.CreateProxy(Module, typeof(DemoModuleServiceProxy));

    AdministrationModuleCollection adminmodules =
    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;

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

© 2015 Microsoft