Share via


ModuleDefinition(String, String) Constructor

Definition

Initializes a new instance of the ModuleDefinition class.

public:
 ModuleDefinition(System::String ^ name, System::String ^ clientModuleTypeName);
public ModuleDefinition (string name, string clientModuleTypeName);
new Microsoft.Web.Management.Server.ModuleDefinition : string * string -> Microsoft.Web.Management.Server.ModuleDefinition
Public Sub New (name As String, clientModuleTypeName As String)

Parameters

name
String

The name of the module provider.

clientModuleTypeName
String

The assembly-qualified name of the Module.

Examples

The following example produces the following trace output.

ModuleProviderName : rHeil

AssemblyQualifiedName : rxDemo.DemoModule, rHeil, Version=0.0.1.3, Culture=neutral, PublicKeyToken=16b74a31ba18bbaf

public override ModuleDefinition GetModuleDefinition(IManagementContext context) {


    if (context.User.Identity.IsAuthenticated != true)
        return null;

    string sModuleProviderName = this.Name;
    string sAssemblyQualifiedName = typeof(DemoModule).AssemblyQualifiedName;
    Trace.WriteLine(" ModuleProviderName : " + sModuleProviderName);
    Trace.WriteLine(" AssemblyQualifiedName : " + sAssemblyQualifiedName);

    ModuleDefinition modDefn = new ModuleDefinition(sModuleProviderName, sAssemblyQualifiedName);
    traceModDefn(modDefn);
    return modDefn;

}

Applies to