Condition 类

The Condition object represents a policy-based management condition.

继承层次结构

System.Object
  Microsoft.SqlServer.Management.Sdk.Sfc.SfcInstance
    Microsoft.SqlServer.Management.Dmf.Condition

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

语法

声明
<StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey := "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")> _
Public NotInheritable Class Condition _
    Inherits SfcInstance _
    Implements ISfcCreatable, ICreatable, ISfcDroppable, IDroppable,  _
    ISfcAlterable, IAlterable, ISfcRenamable, IRenamable, ISfcValidate
用法
Dim instance As Condition
[StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey = "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")]
public sealed class Condition : SfcInstance, 
    ISfcCreatable, ICreatable, ISfcDroppable, IDroppable, ISfcAlterable, 
    IAlterable, ISfcRenamable, IRenamable, ISfcValidate
[StrongNameIdentityPermissionAttribute(SecurityAction::LinkDemand, PublicKey = L"0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")]
public ref class Condition sealed : public SfcInstance, 
    ISfcCreatable, ICreatable, ISfcDroppable, IDroppable, ISfcAlterable, 
    IAlterable, ISfcRenamable, IRenamable, ISfcValidate
[<SealedAttribute>]
[<StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey = "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")>]
type Condition =  
    class 
        inherit SfcInstance 
        interface ISfcCreatable 
        interface ICreatable 
        interface ISfcDroppable 
        interface IDroppable 
        interface ISfcAlterable 
        interface IAlterable 
        interface ISfcRenamable 
        interface IRenamable 
        interface ISfcValidate 
    end
public final class Condition extends SfcInstance implements ISfcCreatable, ICreatable, ISfcDroppable, IDroppable, ISfcAlterable, IAlterable, ISfcRenamable, IRenamable, ISfcValidate

Condition 类型公开以下成员。

构造函数

  名称 说明
公共方法 Condition() Initializes a new instance of the Condition class.
公共方法 Condition(PolicyStore, String) Initializes a new instance of the Policy class.

页首

属性

  名称 说明
受保护属性 AbstractIdentityKey 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共属性 CreateDate Gets the date and time when the condition was created.
公共属性 CreatedBy Gets the authentication credentials of the user who created the condition.
公共属性 DateModified Gets the date and time when the condition was last modified.
公共属性 Description Gets or sets the descriptions of the condition.
公共属性 ExpressionNode Gets or sets the type of expression that the condition uses.
公共属性 Facet Gets or sets the facet that is associated with the condition.
公共属性 HasScript Gets the Boolean value that specifies whether the condition has a script.
公共属性 ID Gets the ID value that uniquely identifies the condition.
公共属性 IdentityKey Gets the Condition.Key of the condition object.
公共属性 IsEnumerable Gets the Boolean value that specifies whether the condition is enumerable.
公共属性 IsSystemObject Determines whether the condition is a Object.
公共属性 Metadata Returns metadata about the instance and its domain. (从 SfcInstance 继承。)
公共属性 ModifiedBy Gets the authentication credentials of the user who last modified the condition.
公共属性 Name Gets the name of the facet.
公共属性 Parent Gets or sets the object that is the parent of the referenced object.
公共属性 Properties Returns a collection instance properties. (从 SfcInstance 继承。)
受保护属性 State Returns the state of the SfcInstance object. (从 SfcInstance 继承。)
公共属性 Urn Returns the uniform resource name of the SfcInstance object. (从 SfcInstance 继承。)

页首

方法

  名称 说明
公共方法 Alter Updates any Condition object property changes on the instance of SQL Server.
公共方法 Create Creates a policy on the instance of SQL Server with the given name, and as defined by the Condition object.
受保护方法 CreateIdentityKey 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 Discover Discovers the dependencies of the condition. (覆盖 SfcInstance.Discover(ISfcDependencyDiscoveryObjectSink)。)
公共方法 Drop Removes the condition from the instance of SQL Server.
公共方法 EnumDependentPolicies Returns a collection of polices that are dependent on the condition.
公共方法 Equals (从 Object 继承。)
受保护方法 GetChildCollection 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 GetDomain 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 GetHashCode (从 Object 继承。)
公共方法静态成员 GetObjectFactory Gets the object factory for the object.
公共方法 GetPropertySet Returns the set of properties for the SfcInstance object. (从 SfcInstance 继承。)
公共方法 GetSupportedEvaluationMode Gets the evaluation mode for the condition.
公共方法 GetType (从 Object 继承。)
受保护方法 GetTypeMetadataImpl Indicates the domains that override by returning the right TypeMetadata class directly. 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 InitializeUIPropertyState 不要在您的代码中直接引用此成员。它支持 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 继承。)
公共方法 Refresh Refreshes the object's properties by reading them from the server. (从 SfcInstance 继承。)
公共方法 Rename Renames the condition to the specified name.
受保护方法 ResetKey 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 ScriptAlter Alters the ISfcScript object.
公共方法 ScriptCreate Creates an ISfcScript object.
公共方法 ScriptDrop Drops the ISfcScript object.
公共方法 Serialize Serializes the instance to XML. (从 SfcInstance 继承。)
公共方法 ToString Returns a string representation of the instance Urn. (从 SfcInstance 继承。)
公共方法 Validate Validates the condition using the given mode.

页首

事件

  名称 说明
公共事件 PropertyChanged CLS-compliant event for property changes. (从 SfcInstance 继承。)
公共事件 PropertyMetadataChanged CLS-compliant event for property metadata changes. (从 SfcInstance 继承。)

页首

显式接口实现

  名称 说明
显式接口实现私有方法 ISfcRenamable.Rename Renames the condition identified by the specified SfcKey.
显式接口实现私有方法 ISfcRenamable.ScriptRename Renames the script identified by the SfcKey.
显式接口实现私有方法 ISfcValidate.Validate Validates a Policy-based Management condition against a specified object using a specified validation method.

页首

注释

A condition is a logical expression that specifies a set of allowed states of a management facet on the target object. The facet is assigned to the condition using the Facet property and the allowed state is applied using a logical expression, specified by the ExpressionNode property. The Transact-SQL expression is assigned to the ExpressionNode object using the Parse(String) method.

Using a Condition object you can:

  • Create, view, modify and delete a condition.

  • Specify facets and expressions.

  • Validate the condition.

  • Discover the dependencies of the condition.

  • Enumerate the policies that use the condition.

示例

创建、查看、修改和删除基于策略的管理条件

线程安全

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

请参阅

参考

Microsoft.SqlServer.Management.Dmf 命名空间