ManagementUnit.GetModuleService(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检索与 ModuleService 指定模块名称对应的 对象。
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
参数
- moduleName
- String
实现服务的模块的名称。
返回
与 ModuleService 指定的模块名称对应的 对象。
示例
以下示例使用 GetModuleService 方法检索模块信息并将其写入跟踪输出。
ManagementUnit mu = this.ManagementUnit;
string modName = "rHeil";
ModuleService ms = mu.GetModuleService(modName);
if(ms != null)
Trace.WriteLine("ModuleService for " + modName + " : " +
ms.ToString());
注解
如果指定的 ModuleService 对象不可用或不适用于此 ManagementUnit,则返回值为 null
。