Compartilhar via


ModuleProvider.GetSupportedChildDelegationStates(String) Método

Definição

Quando substituído em uma classe derivada, recupera uma matriz de estados de delegação filho com suporte.

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

Parâmetros

path
String

O caminho de localização.

Retornos

Uma matriz do tipo DelegationState que contém os estados com suporte.

Comentários

O exemplo a seguir retorna uma matriz de estados de delegação filho com suporte para o caminho fornecido.

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

Aplica-se a