ModuleProvider.GetSupportedChildDelegationStates(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在派生类中重写时,检索支持的子委派状态的数组。
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
};
}