Compartir a través de


SimpleDelegatedModuleProvider.ParentDelegationState Campo

Definición

Especifica el estado de delegación principal.

public: static initonly Microsoft::Web::Management::Server::DelegationState ^ ParentDelegationState;
public static readonly Microsoft.Web.Management.Server.DelegationState ParentDelegationState;
 staticval mutable ParentDelegationState : Microsoft.Web.Management.Server.DelegationState
Public Shared ReadOnly ParentDelegationState As DelegationState 

Valor de campo

Ejemplos

En el ejemplo siguiente se devuelve una matriz de estados de delegación secundarios admitidos.

public static readonly DelegationState ParentDelgateState =
new DelegationState(ParentDelegationMode,
"Reset to Inherited",
"Set the configuration lock state for a feature " +
"to the inherited state");
public override void SetChildDelegationState(string path,
    DelegationState state) {

    if (String.IsNullOrEmpty(path)) {
        throw new ArgumentNullException("path");
    }
    if (path.IndexOf('/') != -1) {
        throw new InvalidOperationException(
            "Cannot retrieve the delegation state " +
             "for paths that contain '/'.");
    }

    AdministrationModule currentModule =
        ManagementUnit.Administration.Modules[Name];

    // Get the management administration configuration 
    // for the delegated path.
    ManagementAdministrationConfiguration
        delegatedAdministration =
        ManagementUnit.Administration.GetDelegatedScope(path);
    AdministrationModuleCollection delegatedModules
        = delegatedAdministration.Modules;

    if ((state == ParentDelgateState) ||
        (state == ReadWriteDelegationState) ||
        (state == ReadOnlyDelegationState)) {

        delegatedModules.Add(currentModule.Name);
    } else if (state == NoneDelegationState) {
        if (currentModule != null) {
            delegatedModules.Remove(currentModule.Name);
        }
    }
} 

Comentarios

El valor de este campo es un DelegationState con un modo de "Parent", texto localizado de "ParentDelegationStateText" y una descripción localizada de "ParentDelegationStateToolTip".

Se aplica a