PolicyStore 类

The PolicyStore type is the root of the DMF object model.

继承层次结构

System. . :: . .Object
  Microsoft.SqlServer.Management.Sdk.Sfc. . :: . .SfcInstance
    Microsoft.SqlServer.Management.Dmf..::..PolicyStore

命名空间:  Microsoft.SqlServer.Management.Dmf
程序集:  Microsoft.SqlServer.Dmf(在 Microsoft.SqlServer.Dmf.dll 中)

语法

声明
<TypeConverterAttribute(GetType(LocalizableTypeConverter))> _
<StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey := "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")> _
Public NotInheritable Class PolicyStore _
    Inherits SfcInstance _
    Implements ISfcAlterable, IAlterable, ISfcDomain, ISfcDomainLite,  _
    ISfcHasConnection, ISfcSerializableUpgrade, ISfcValidate
用法
Dim instance As PolicyStore
[TypeConverterAttribute(typeof(LocalizableTypeConverter))]
[StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey = "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")]
public sealed class PolicyStore : SfcInstance, 
    ISfcAlterable, IAlterable, ISfcDomain, ISfcDomainLite, ISfcHasConnection, 
    ISfcSerializableUpgrade, ISfcValidate
[TypeConverterAttribute(typeof(LocalizableTypeConverter))]
[StrongNameIdentityPermissionAttribute(SecurityAction::LinkDemand, PublicKey = L"0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")]
public ref class PolicyStore sealed : public SfcInstance, 
    ISfcAlterable, IAlterable, ISfcDomain, ISfcDomainLite, ISfcHasConnection, 
    ISfcSerializableUpgrade, ISfcValidate
[<SealedAttribute>]
[<TypeConverterAttribute(typeof(LocalizableTypeConverter))>]
[<StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey = "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")>]
type PolicyStore =  
    class
        inherit SfcInstance
        interface ISfcAlterable
        interface IAlterable
        interface ISfcDomain
        interface ISfcDomainLite
        interface ISfcHasConnection
        interface ISfcSerializableUpgrade
        interface ISfcValidate
    end
public final class PolicyStore extends SfcInstance implements ISfcAlterable, IAlterable, ISfcDomain, ISfcDomainLite, ISfcHasConnection, ISfcSerializableUpgrade, ISfcValidate

PolicyStore 类型公开以下成员。

构造函数

  名称 说明
公共方法 PolicyStore() () () () Initializes a new instance of the PolicyStore class.
公共方法 PolicyStore(SfcConnection) Initializes a new instance of the PolicyStore class.

页首

属性

  名称 说明
受保护属性 AbstractIdentityKey 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共属性 Conditions Represents a collection of Condition objects. Each Condition object represents a policy-based Management condition.
公共属性 Enabled Gets or sets whether the policy store is enabled.
公共属性静态成员 Facets Represents a collection of FacetInfo objects. Each FacetInfo object represents a policy-based Management registered facet.
公共属性 HistoryRetentionInDays Gets or sets the number of days the policy store retains history.
公共属性 IdentityKey Gets the identity key.
公共属性 LogOnSuccess Gets or sets whether log-on succeeded.
公共属性 Metadata Returns metadata about the instance and its domain. (从 SfcInstance 继承。)
公共属性 Name Gets the name of the policy store.
公共属性 ObjectSets Represents a collection of ObjectSet objects. Each ObjectSet object represents a policy-based Management object set.
公共属性 Parent Gets or sets the instance parent via the keychain. (从 SfcInstance 继承。)
公共属性 Policies Represents a collection of Policy objects. Each Policy object represents a policy-based Management policy.
公共属性 PolicyCategories Represents a collection of PolicyCategory objects. Each PolicyCategory object represents a policy-based Management policy category.
公共属性 PolicyCategorySubscriptions Represents a collection of PolicyCategorySubscription objects. Each PolicyCategorySubscription object represents a policy-based Management policy category subscription.
公共属性 Properties Returns a collection instance properties. (从 SfcInstance 继承。)
受保护属性 PropertyStorageProvider 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共属性 SqlStoreConnection Gets or sets the SqlStoreConnection object.
受保护属性 State Returns the state of the SfcInstance object. (从 SfcInstance 继承。)
公共属性 Urn Returns the uniform resource name of the SfcInstance object. (从 SfcInstance 继承。)

页首

方法

  名称 说明
公共方法 Alter Alters a previously created PolicyStore object.
受保护方法 AlterImpl 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 CheckObjectCreated 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 CheckObjectState 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 CreateIdentityKey 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 CreateImpl 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 CreatePolicyFromFacet(SfcQueryExpression, String, String, String) Creates new policy from an SfcQueryExpression object and names.
公共方法 CreatePolicyFromFacet(Object, String, String, String, XmlWriter) Creates new policy from an Object and an XmlWriter object.
公共方法 CreatePolicyFromFacet(SfcQueryExpression, String, String, String, XmlWriter) Creates new policy from an SfcQueryExpression object and an XmlWriter object.
公共方法 DeserializePolicy Deserializes a single policy and its associated condition from the specified XML reader into the policy store.
公共方法 Discover Discovers dependency relationships for the specified sink. (覆盖 SfcInstance. . :: . .Discover(ISfcDependencyDiscoveryObjectSink)。)
受保护方法 DropImpl 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 EnumApplicablePolicies Enumerates policy items specified by an SfcQueryExpression object.
公共方法 EnumApplicablePolicyCategories Enumerates conditions specified by an SfcQueryExpression object.
公共方法 EnumConditionsOnFacet(String) Returns a list of conditions that are associated with the specified facet.
公共方法 EnumConditionsOnFacet(String, PolicyStore. . :: . .EnumerationMode) Enumerates a StringCollection of conditions.
公共方法静态成员 EnumDomainFacets Enumerates facets in a domain.
公共方法 EnumPoliciesOnFacet(String) Returns a list of policies associated with the specified facet.
公共方法 EnumPoliciesOnFacet(String, PolicyStore. . :: . .EnumerationMode) Enumerates policy items on a facet.
公共方法 EnumPolicyCategories Returns an enumerated list of policy category information.
公共方法 EnumRootConditions Returns a list of root conditions for the specified type.
公共方法静态成员 EnumRootFacets Returns a list of root facets for the specified type.
公共方法 EnumTargetSetConditions(Type) Returns a list of target set conditions for the specified type.
公共方法 EnumTargetSetConditions(Type, PolicyStore. . :: . .EnumerationMode) Enumerates conditions on the target.
公共方法 Equals (从 Object 继承。)
公共方法 EraseSystemHealthPhantomRecords Deletes system health phantom records specified by a SfcQueryExpression.
受保护方法 Finalize (从 Object 继承。)
公共方法 GetAggregatedHealthState Deletes system health phantom records specified by a SfcQueryExpression.
受保护方法 GetChildCollection 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 GetDomain 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 GetHashCode (从 Object 继承。)
公共方法 GetPropertySet Returns the set of properties for the SfcInstance object. (从 SfcInstance 继承。)
公共方法 GetType (从 Object 继承。)
受保护方法 GetTypeMetadataImpl Indicates the domains that override by returning the right TypeMetadata class directly. 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 ImportPolicy Imports a single policy and its associated condition from the given XML reader into the policy store.
受保护方法 InitializeUIPropertyState 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 MarkForDropImpl Returns a value that indicates the existing objects to be dropped. 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 MarkRootAsConnected 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 MarkSystemObject Sets the name of a Policy, Condition, or ObjectSet.
受保护方法 MemberwiseClone (从 Object 继承。)
受保护方法 MoveImpl Indicates the new parent object to move in an instance. 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 OnPropertyMetadataChanges Invoked whenever the effective value of any SfcInstance metadata is updated. (从 SfcInstance 继承。)
受保护方法 OnPropertyValueChanges Invoked whenever the effective value of any SfcInstance property is updated. (从 SfcInstance 继承。)
受保护方法 PostAlter 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 PostCreate Indicates the default implementor that creates the execution result. 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 PostDrop 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 PostMove 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 PostRename 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 PurgeHealthState() () () () Removes the health data for a specified tree/subtree.
公共方法 PurgeHealthState(SfcQueryExpression) Removes the health data for a specified tree/subtree.
公共方法 Refresh Refreshes the object's properties by reading them from the server. (从 SfcInstance 继承。)
受保护方法 RenameImpl 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 RepairPolicyAutomation The RepairPolicyAutomation method recreates all necessary artifacts for all automated policies.
受保护方法 ResetKey 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 ScriptAlter Alters the script associated with this policy store.
公共方法 Serialize Serializes the instance to XML. (从 SfcInstance 继承。)
公共方法 StartSerializationUpgrade Starts a serialization upgrade.
公共方法 SubscribeToPolicyCategory Subscribes the policy store to the category specified by the policyCategory and target parameters.
公共方法 ToString Returns the PolicyStore object as a string value. (覆盖 SfcInstance. . :: . .ToString() () () ()。)
公共方法 UnsubscribeFromPolicyCategory Unsubscribes the policy store from the category specified by the policyCategory and target parameters.
受保护方法 UpdateUIPropertyState 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 Validate Indicates the basic child object's validation. 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)

页首

事件

  名称 说明
受保护事件 propertyChanged 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共事件 PropertyChanged CLS-compliant event for property changes. (从 SfcInstance 继承。)
受保护事件 propertyMetadataChanged 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共事件 PropertyMetadataChanged CLS-compliant event for property metadata changes. (从 SfcInstance 继承。)

页首

显式接口实现

  名称 说明
显式接口实现私有方法 ISfcDomain. . :: . .GetExecutionEngine Gets a new ISfcExecutionEngine object.
显式接口实现私有方法 ISfcDomain. . :: . .GetKey Gets a new SfcKey of type determined by the name property of urnFragment parameter.
显式接口实现私有方法 ISfcDomain. . :: . .GetType Gets a Type object specified by the typeName parameter.
显式接口实现私有方法 ISfcDomain. . :: . .GetTypeMetadata Gets a T:Microsoft.SqlServer.Management.Sdk.Sfc.SfcTypeMetadata object identified by the typeName parameter.
显式接口实现私有方法 ISfcDomain. . :: . .UseSfcStateManagement Use the SFC state management to return true.
显式接口实现私有属性 ISfcDomainLite. . :: . .DomainInstanceName Gets the name of the domain instance.
显式接口实现私有属性 ISfcDomainLite. . :: . .DomainName Gets the domain name.
显式接口实现私有方法 ISfcDomainLite. . :: . .GetLogicalVersion Indicates the logical version to get in the domain.
显式接口实现私有属性 ISfcHasConnection. . :: . .ConnectionContext Gets the connection context.
显式接口实现私有方法 ISfcHasConnection. . :: . .GetConnection() () () () Indicates the connection to get.
显式接口实现私有方法 ISfcHasConnection. . :: . .GetConnection(SfcObjectQueryMode) Indicates the connection to get using the SfcObjectQuery mode.
显式接口实现私有方法 ISfcHasConnection. . :: . .SetConnection Indicates the connection to set.
显式接口实现私有方法 ISfcValidate. . :: . .Validate Validates the Policy objects in the PolicyStore.

页首

注释

Using the PolicyStore object you can:

  • Hold a connection to the whole object model.

  • Access the collection of policies, conditions, policy groups, subscriptions and facets that are immediate children of the PolicyStore object.

  • Review the policy execution history.

  • Review applicable policies for a given target type.

  • Subscribe to policies.

  • Serialize and deserialize policies.

  • Create a policy from a facet.

注意注意

The PolicyStore class implements ISfcDomain, which specifies the connection point to any object domain defined using the Microsoft SFC.

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。