ModuleProvider.GetSupportedChildDelegationStates(String) 方法

定义

在派生类中重写时,检索支持的子委派状态的数组。

public:
 virtual cli::array <Microsoft::Web::Management::Server::DelegationState ^> ^ GetSupportedChildDelegationStates(System::String ^ path);
public virtual Microsoft.Web.Management.Server.DelegationState[] GetSupportedChildDelegationStates (string path);
abstract member GetSupportedChildDelegationStates : string -> Microsoft.Web.Management.Server.DelegationState[]
override this.GetSupportedChildDelegationStates : string -> Microsoft.Web.Management.Server.DelegationState[]
Public Overridable Function GetSupportedChildDelegationStates (path As String) As DelegationState()

参数

path
String

位置路径。

返回

类型为的 DelegationState 数组,其中包含支持的状态。

注解

以下示例返回给定路径支持的子委派状态的数组。

public override DelegationState[] GetSupportedChildDelegationStates(string path) {
    if (String.IsNullOrEmpty(path)) {
        throw new ArgumentNullException("path");
    }
    if (path.IndexOf('/') != -1) {
        throw new InvalidOperationException("Delegation Only For Immediate Children");
    }
    ManagementAdministrationConfiguration administration =
        ManagementUnit.Administration.GetDelegatedScope(path);

    if (administration.Modules[Name] == null) {
        return new DelegationState[] { MyDelegatedModProviderHlpr.NoneDelegationState    }; 
    }

    return new DelegationState[] { 
      MyDelegatedModProviderHlpr.NoneDelegationState  , 
       MyDelegatedModProviderHlpr.ReadWriteDelegationState 
    };
} 

适用于