Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

GetPages Method (Module)

IIS 7.0

Retrieves the collection of features that are registered in the specified module.

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

ReadOnlyCollection<ModulePageInfo> GetPages(
	Module module
)

Parameters

module
Type: Microsoft.Web.Management.Client..::..Module
The target Module object.

Return Value

Type: System.Collections.ObjectModel..::..ReadOnlyCollection<(Of <(<'ModulePageInfo>)>)>
A constructed generic System.Collections.ObjectModel..::..ReadOnlyCollection<(Of <(<'T>)>)> of ModulePageInfo objects that represent the features that are registered by the specified module.

The following example sends feature details from every module to the trace listener.

void TracePageInfo(ModulePageInfo pi) {

    Trace.WriteLine("Description \""
        + pi.Description + "\"");
    Trace.WriteLine("IsEnabled \""
        + pi.IsEnabled.ToString() + "\"");
    Trace.WriteLine("LongDescription \""
        + pi.LongDescription + "\"");
    Trace.WriteLine("PageType.Assembly.FullName \""
        + pi.PageType.Assembly.FullName + "\"");
    Trace.WriteLine("PageType.FullName \""
        + pi.PageType.FullName + "\"");
    Trace.WriteLine("Title \"" + pi.Title + "\"");

}

void TrcPages() {
    IControlPanel controlPanel =
        (IControlPanel)GetService(typeof(IControlPanel));

    DictionaryEntry[] myArr = new
        DictionaryEntry[Connection.Modules.Count];
    Connection.Modules.CopyTo(myArr, 0);

    for (int i = 0; i < myArr.Length; i++) {
        Trace.WriteLine("Key: \"" + myArr[i].Key +
            "\" val: \"" + myArr[i].Value + "\"");
        Trace.Indent();
        Module module = (Module)myArr[i].Value;

        if (module != null) {
            ICollection pageInfos =
                controlPanel.GetPages(module);
            foreach (ModulePageInfo pageInfo in pageInfos) {
                Trace.Indent();
                TracePageInfo(pageInfo);
                Trace.Unindent();
            }
        }
        Trace.Unindent();
    }
}


Community Additions

ADD
Show:
© 2015 Microsoft