Export (0) Print
Expand All

Categorizations Property

IIS 7.0

Gets the collection of categories that have been registered for the Home page of a connection in IIS Manager.

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

ReadOnlyCollection<ControlPanelCategorization> Categorizations { get; }

Property Value

Type: System.Collections.ObjectModel..::..ReadOnlyCollection<(Of <(<'ControlPanelCategorization>)>)>
A constructed generic System.Collections.ObjectModel..::..ReadOnlyCollection<(Of <(<'T>)>)> of ControlPanelCategorization objects that represents the collection of categories that have been registered for the Home page.

Each category is represented by a ControlPanelCategoryInfo object. The keys in the dictionary are the category names.

The following example displays the following trace listener output:

key : "Function" DisplayName: "Category"

key : "Role" DisplayName: "Area"

internal class DemoModule :
    Microsoft.Web.Management.Client.Module {

    protected override void Initialize(
        IServiceProvider serviceProvider,
        ModuleInfo moduleInfo) {
        base.Initialize(serviceProvider, moduleInfo);
        IControlPanel cp =
            (IControlPanel)GetService(typeof(IControlPanel));
        ModulePageInfo modulePageInfo = new ModulePageInfo(
            this,
            typeof(DemoPage),
            "My Page Title 4",
            "My Page Description 4",
            rLoadImg.loadImgs("rSmall.bmp"),   // small image
            rLoadImg.loadImgs("rLarge.bmp"),  // large image
            "My Page long description 4"     // long description
            );

        cp.RegisterPage(modulePageInfo);

        // Register the Category as
        // Application Development
        string s = 
            ControlPanelCategoryInfo.ApplicationDevelopment;
        cp.RegisterPage(s, modulePageInfo);

        // Register the Area as IIS
        s = ControlPanelCategoryInfo.Iis;
        cp.RegisterPage(s, modulePageInfo);
      //  cp.RegisterHomepage(modulePageInfo);

    }
}


...


IControlPanel controlPanel =
     (IControlPanel)GetService(typeof(IControlPanel));
foreach (ControlPanelCategorization cpc in
    controlPanel.Categorizations)
    Trace.WriteLine("key : \"" + cpc.Key +
        "\"\t DisplayName: \"" + cpc.DisplayName
        + "\"");


Community Additions

ADD
Show:
© 2014 Microsoft