Share via


ModuleProvider.GetSupportedChildDelegationStates(String) Method

Definition

When overridden in a derived class, retrieves an array of supported child delegation states.

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()

Parameters

path
String

The location path.

Returns

An array of type DelegationState that contains the supported states.

Remarks

The following example returns an array of supported child delegation states for the given path.

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 
    };
} 

Applies to