次の方法で共有


SimpleDelegatedModuleProvider.GetSupportedChildDelegationStates メソッド

定義

サポートされている子委任状態の配列を取得します。

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

パラメーター

path
String

呼び出し元ホストのパス。

戻り値

サポートされている状態を含む 型 DelegationState の配列。

例外

pathnull または空です。

path には"/" 文字が含まれています。

次の例では、このメソッドをオーバーライドし、基底クラスのコードを複製します。

public class MySimpDelegateModPrvdr : SimpleDelegatedModuleProvider {

    private const string ReadOnlyDelegationMode = "ReadOnly";
    private const string ReadWriteDelegationMode = "ReadWrite";
    private const string NoneDelegationMode = "None";
    private const string ParentDelegationMode = "Parent";

    public static new readonly DelegationState ReadOnlyDelegationState =
   new DelegationState(ReadOnlyDelegationMode,
   "Read Only", "Lock feature configuration"); 

    public static new readonly DelegationState ReadWriteDelegationState =
    new DelegationState(ReadWriteDelegationMode,
    "Read/Write", "Unlock feature configuration"); 

    public static new readonly DelegationState NoneDelegationState =
    new DelegationState(NoneDelegationMode,
    "Not Delegated",
    "Lock the feature configuration and hide " +
    "the feature in site and/or application connections"); 

    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 bool SupportsDelegation {
        get {
            return true;
        }
    } 
public override DelegationState[]
    GetSupportedChildDelegationStates(string path) {

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

    return new DelegationState[] { 
        NoneDelegationState, 
        ReadWriteDelegationState, 
        ParentDelgateState};
}

適用対象