ManagementUnit.GetModuleService(String) Method

Definition

Retrieves the ModuleService object that corresponds to the specified module name.

public:
 Microsoft::Web::Management::Server::ModuleService ^ GetModuleService(System::String ^ moduleName);
public Microsoft.Web.Management.Server.ModuleService GetModuleService (string moduleName);
member this.GetModuleService : string -> Microsoft.Web.Management.Server.ModuleService
Public Function GetModuleService (moduleName As String) As ModuleService

Parameters

moduleName
String

The name of the module that implements the service.

Returns

The ModuleService object that corresponds to the specified module name.

Examples

The following example uses the GetModuleService method to retrieve module information and write it to the tracing output.

ManagementUnit mu = this.ManagementUnit;
string modName = "rHeil";
ModuleService ms = mu.GetModuleService(modName);
if(ms != null)
Trace.WriteLine("ModuleService for " + modName + " : " +
    ms.ToString()); 

Remarks

If the specified ModuleService object is not available, or is not applicable to this ManagementUnit, the return value is null.

Applies to