ModuleDefinition(String, String) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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;
}