SimpleDelegatedModuleProvider.ReadWriteDelegationState 字段
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定读/写委派状态。
public: static initonly Microsoft::Web::Management::Server::DelegationState ^ ReadWriteDelegationState;
public static readonly Microsoft.Web.Management.Server.DelegationState ReadWriteDelegationState;
staticval mutable ReadWriteDelegationState : Microsoft.Web.Management.Server.DelegationState
Public Shared ReadOnly ReadWriteDelegationState As DelegationState
字段值
示例
以下示例返回支持的子委派状态的数组。
public static new readonly DelegationState ReadWriteDelegationState =
new DelegationState(ReadWriteDelegationMode,
"Read/Write", "Unlock feature configuration");
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);
}
}
}
注解
此字段的值是模式 DelegationState 为“ReadWrite”、本地化文本为“ReadWriteDelegationStateText”和本地化描述为“ReadWriteDelegationStateToolTip”的 。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈