Share via


IControlPanel.GetPage(Type) Method

Definition

Retrieves the feature that has the specified type.

public:
 Microsoft::Web::Management::Client::ModulePageInfo ^ GetPage(Type ^ pageType);
public Microsoft.Web.Management.Client.ModulePageInfo GetPage (Type pageType);
abstract member GetPage : Type -> Microsoft.Web.Management.Client.ModulePageInfo
Public Function GetPage (pageType As Type) As ModulePageInfo

Parameters

pageType
Type

The Type of the feature to retrieve.

Returns

A ModulePageInfo object that represents the feature that has the specified page type, or null if there is no matching feature.

Examples

The following example sends several feature details to the trace listener.

IControlPanel controlPanel =
    (IControlPanel)GetService(typeof(IControlPanel));
ModulePageInfo pi =
    controlPanel.GetPage(typeof(DemoPage));
if (pi == null)
    return;

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

Applies to