Partager via


Classe DefaultRuleBase

The DefaultRuleBase class is a base class that is inherited by the Rule class and the Default class.

Hiérarchie d'héritage

System.Object
  Microsoft.SqlServer.Management.Smo.SmoObjectBase
    Microsoft.SqlServer.Management.Smo.SqlSmoObject
      Microsoft.SqlServer.Management.Smo.NamedSmoObject
        Microsoft.SqlServer.Management.Smo.ScriptNameObjectBase
          Microsoft.SqlServer.Management.Smo.ScriptSchemaObjectBase
            Microsoft.SqlServer.Management.Smo.DefaultRuleBase
              Microsoft.SqlServer.Management.Smo.Default
              Microsoft.SqlServer.Management.Smo.Rule

Espace de noms :  Microsoft.SqlServer.Management.Smo
Assembly :  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Syntaxe

'Déclaration
Public Class DefaultRuleBase _
    Inherits ScriptSchemaObjectBase _
    Implements ICreatable, IDroppable, IAlterable, IExtendedProperties,  _
    IScriptable, ITextObject
'Utilisation
Dim instance As DefaultRuleBase
public class DefaultRuleBase : ScriptSchemaObjectBase, 
    ICreatable, IDroppable, IAlterable, IExtendedProperties, IScriptable, 
    ITextObject
public ref class DefaultRuleBase : public ScriptSchemaObjectBase, 
    ICreatable, IDroppable, IAlterable, IExtendedProperties, IScriptable, 
    ITextObject
type DefaultRuleBase =  
    class 
        inherit ScriptSchemaObjectBase 
        interface ICreatable 
        interface IDroppable 
        interface IAlterable 
        interface IExtendedProperties 
        interface IScriptable 
        interface ITextObject 
    end
public class DefaultRuleBase extends ScriptSchemaObjectBase implements ICreatable, IDroppable, IAlterable, IExtendedProperties, IScriptable, ITextObject

Le type DefaultRuleBase expose les membres suivants.

Constructeurs

  Nom Description
Méthode protégée DefaultRuleBase Initializes a new instance of the Default or Rule class.

Haut de la page

Propriétés

  Nom Description
Propriété protégée ExecuteForScalar Gets or sets the Boolean property value that specifies whether the object is set to the execute for scalar option. (hérité de SqlSmoObject.)
Propriété publique ExtendedProperties Represents a collection of ExtendedProperty objects. Each ExtendedProperty object represents an extended property on the Default object or the Rule object.
Propriété protégée IsTouched Gets the Boolean property value that specifies whether the object properties have been updated but not yet persisted on the server. (hérité de SqlSmoObject.)
Propriété publique Name Gets or sets the name of the schema. (hérité de ScriptSchemaObjectBase.)
Propriété protégée ObjectInSpace Gets the Boolean property value that specifies whether the object exists in isolation, or whether it is directly or indirectly connected to the instance of SQL Server. (hérité de SqlSmoObject.)
Propriété publique Properties Gets a collection of Property objects that represent the object properties. (hérité de SqlSmoObject.)
Propriété protégée ScalarResult Gets the scalar result for the referenced object. (hérité de SqlSmoObject.)
Propriété publique Schema Gets or sets the schema. (hérité de ScriptSchemaObjectBase.)
Propriété publique State Gets the state of the referenced object. (hérité de SmoObjectBase.)
Propriété publique TextBody Gets or sets the text that defines the default or rule.
Propriété publique TextHeader Gets or sets the header of the text body that defines the default or rule.
Propriété publique TextMode Gets or sets the Boolean property value that specifies whether the Default object or Rule object header is editable as text.
Propriété publique Urn Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (hérité de SqlSmoObject.)
Propriété publique UserData Gets or sets user-defined data associated with the referenced object. (hérité de SmoObjectBase.)

Haut de la page

Méthodes

  Nom Description
Méthode protégée AddDatabaseContext Add the database context to the collection of queries identified by the queries parameter. (hérité de SqlSmoObject.)
Méthode publique Alter Updates any Default object or Rule object property changes on instance of SQL Server.
Méthode protégée AlterImpl Activates the object altered event. (hérité de SqlSmoObject.)
Méthode protégée AlterImplWorker Calls the Alter methods. (hérité de SqlSmoObject.)
Méthode protégée AppendCommaText Appends text, optionally separated by a comma. (hérité de ScriptNameObjectBase.)
Méthode protégée AppendWithCommaText Appends text, optionally separated by a comma. (hérité de ScriptNameObjectBase.)
Méthode protégée AppendWithOption Appends text and option text separated from the main text with a “WITH” string and optionally separated by a comma. (hérité de ScriptNameObjectBase.)
Méthode protégée AutoGenerateName Generates a name based on the object Guid. (hérité de ScriptNameObjectBase.)
Méthode protégée BindDefaultImpl Binds the default items identified by the parameters. (hérité de SqlSmoObject.)
Méthode protégée BindRuleImpl Binds the rule schema to the rule and columns identified by the parameters. (hérité de SqlSmoObject.)
Méthode publique BindToColumn(String, String) Binds the default or rule to the specified column in the specified table.
Méthode publique BindToColumn(String, String, String) Binds the default or rule to the specified column in the specified table with the specified schema.
Méthode publique BindToDataType Binds the default or rule to a data type.
Méthode protégée CheckObjectDirty Checks whether object has been modified and not persisted. (hérité de ScriptNameObjectBase.)
Méthode protégée CheckObjectState() Validates the state of the referenced object. (hérité de SqlSmoObject.)
Méthode protégée CheckObjectState(Boolean) Validates the state of the referenced object with the option to specify that an exception is thrown if the object is not yet created. (hérité de SqlSmoObject.)
Méthode protégée CheckObjectStateImpl Checks the state of a SqlSmoObject. (hérité de SqlSmoObject.)
Méthode protégée CheckTextCorectness Checks text for correctness against the parameters. (hérité de ScriptNameObjectBase.)
Méthode protégée CheckTextModeSupport Checks mode of support. (hérité de ScriptNameObjectBase.)
Méthode protégée CheckVersion100 Checks whether version of SQL Server is SQL Server 2008. (hérité de SqlSmoObject.)
Méthode protégée CheckVersion110() Checks whether version of SQL Server is SQL Server 2012. (hérité de SqlSmoObject.)
Méthode protégée CheckVersion110(String) Checks whether the version of SQL Server is SQL Server 2012 with the specified name. (hérité de SqlSmoObject.)
Méthode protégée CheckVersion80 Checks the validity of the object on SQL Server 2000. (hérité de SqlSmoObject.)
Méthode protégée CheckVersion80SP3 Checks the validity of the object on SQL Server 2000 SP3. (hérité de SqlSmoObject.)
Méthode protégée CheckVersion90 Check the validity of the object on SQL Server 2005. (hérité de SqlSmoObject.)
Méthode protégée CheckVersionBelow110 Checks whether version of SQL Server is before SQL Server 2012. (hérité de SqlSmoObject.)
Méthode protégée CheckVersionBelow90 Checks whether version of SQL Server is before SQL Server 2005. (hérité de SqlSmoObject.)
Méthode protégée CleanObject Cleans the referenced object. (hérité de ScriptNameObjectBase.)
Méthode publique Create Creates a default or rule on the instance of SQL Server as defined by the Default object or Rule object.
Méthode protégée CreateImpl Creates an object with scripting options. (hérité de SqlSmoObject.)
Méthode publique Discover Discovers a list of type Object. (hérité de SqlSmoObject.)
Méthode publique Drop Removes the rule or the default.
Méthode protégée DropImpl Drops a SqlSmoObject. (hérité de SqlSmoObject.)
Méthode protégée DropImplWorker Calls the drop methods. (hérité de SqlSmoObject.)
Méthode publique EnumBoundColumns Enumerates a list of columns to which the default or rule is bound.
Méthode publique EnumBoundDataTypes Enumerates a list of data types to which the default or rule is bound.
Méthode publique Equals (hérité de Object.)
Méthode protégée ExecuteNonQuery Executes a batch of statements that does not return a result set. (hérité de SqlSmoObject.)
Méthode protégée ExecuteRenameQuery Executes the rename query for the object. (hérité de NamedSmoObject.)
Méthode protégée Finalize (hérité de Object.)
Méthode protégée ForceTextModeOnTextBody Enforces text mode on the text body. (hérité de ScriptNameObjectBase.)
Méthode protégée FormatSqlVariant Formats an object as SqlVariant type. (hérité de SqlSmoObject.)
Méthode protégée GenerateAlterEvent() Generates the alter event with the specified value. (hérité de SqlSmoObject.)
Méthode protégée GenerateAlterEvent(Urn, Object) Generates alter event with the specified URN and inner object value. (hérité de SqlSmoObject.)
Méthode protégée GetBraketNameForText Gets the bracket name for the text. (hérité de ScriptNameObjectBase.)
Méthode protégée GetContextDB Gets the context database that is associated with this object. (hérité de SqlSmoObject.)
Méthode protégée GetDBName Gets the database name that is associated with the object. (hérité de SqlSmoObject.)
Méthode protégée GetFragOptionString Gets a FragmentationOption object as a string value. (hérité de SqlSmoObject.)
Méthode publique GetHashCode (hérité de Object.)
Méthode protégée GetIsSystemNamed Gets a Boolean value that specifies whether the system is named. (hérité de ScriptNameObjectBase.)
Méthode protégée GetIsTextDirty Determines whether the text value is consistent with stored value. (hérité de ScriptNameObjectBase.)
Méthode protégée GetPropValue Gets a property value of the SqlSmoObject object. (hérité de SqlSmoObject.)
Méthode protégée GetPropValueOptional Gets a property value of the SqlSmoObject object. (hérité de SqlSmoObject.)
Méthode protégée GetPropValueOptionalAllowNull Gets a property value of the SqlSmoObject object. (hérité de SqlSmoObject.)
Méthode protégée GetRealValue Gets a property value of the SqlSmoObject object. (hérité de SqlSmoObject.)
Méthode protégée GetServerName Gets the name of the instance of SQL Server with which the object is associated. (hérité de SqlSmoObject.)
Méthode protégée GetServerObject Gets the server of the SqlSmoObject object. (hérité de SqlSmoObject.)
Méthode protégée GetSqlServerVersionName Gets the version name of the instance of SQL Server with which the object is associated. (hérité de SqlSmoObject.)
Méthode protégée GetTextBody() Returns the text body. (hérité de ScriptNameObjectBase.)
Méthode protégée GetTextBody(Boolean) Returns the text body. (hérité de ScriptNameObjectBase.)
Méthode protégée GetTextHeader Returns the text header. (hérité de ScriptNameObjectBase.)
Méthode protégée GetTextMode Determines whether the script name is using text mode. (hérité de ScriptNameObjectBase.)
Méthode protégée GetTextProperty Gets the text of the object, if not available, throw appropriate exception based on the state of the object. (hérité de ScriptNameObjectBase.)
Méthode publique GetType (hérité de Object.)
Méthode protégée GetUrnRecursive(StringBuilder) Assigns an Urn object of the SqlSmoObject object. (hérité de SqlSmoObject.)
Méthode protégée GetUrnRecursive(StringBuilder, UrnIdOption) Assigns an Urn object of the SqlSmoObject object. (hérité de SqlSmoObject.)
Méthode protégée ImplInitialize Initializes the fields of the SqlSmoObject object. (hérité de SqlSmoObject.)
Méthode publique Initialize() Initializes the object and forces the properties be loaded. (hérité de SqlSmoObject.)
Méthode publique Initialize(Boolean) Initializes the object and forces the properties be loaded. (hérité de SqlSmoObject.)
Méthode protégée IsObjectDirty Determines whether the referenced object is consistent with the stored object. (hérité de ScriptNameObjectBase.)
Méthode protégée IsObjectInitialized Verifies whether the object has been initialized. (hérité de SqlSmoObject.)
Méthode protégée IsObjectInSpace Verifies whether the object is isolated or connected to the instance of SQL Server. (hérité de SqlSmoObject.)
Méthode protégée IsVersion80SP3 Determines whether the version of SQL Server is SQL Server 2000 with SP3. (hérité de SqlSmoObject.)
Méthode protégée IsVersion90AndAbove Determines whether the version of SQL Server is SQL Server 2005 or later. (hérité de SqlSmoObject.)
Méthode protégée MarkDropped Sets the SqlSmoState to dropped. (hérité de SqlSmoObject.)
Méthode protégée MarkForDropImpl Sets the SqlSmoState for drop operation. (hérité de SqlSmoObject.)
Méthode protégée MemberwiseClone (hérité de Object.)
Méthode protégée PostAlter The method that is activated after the SqlSmoObject is altered. (hérité de SqlSmoObject.)
Méthode protégée PostCreate This method supports the SMO infrastructure and is not intended to be used directly from your code. (remplace SqlSmoObject.PostCreate().)
Méthode protégée PostDrop The method that is activated after the SqlSmoObject is dropped. (hérité de SqlSmoObject.)
Méthode publique Refresh Refreshes the script name. (hérité de ScriptNameObjectBase.)
Méthode protégée RenameImpl This method supports the SMO infrastructure and is not intended to be used directly from your code. (hérité de NamedSmoObject.)
Méthode protégée RenameImplWorker Identifié à titre d'information uniquement. Non pris en charge. La compatibilité future n'est pas garantie. (hérité de NamedSmoObject.)
Méthode publique Script() Generates a Transact-SQL script that can be used to re-create the default or rule.
Méthode publique Script(ScriptingOptions) Generates a Transact-SQL script that can be used to re-create the default or rule as specified by the script options.
Méthode publique ScriptHeader Generates a Transact-SQL script that can be used to re-create the default or rule header as specified by the script options.
Méthode protégée ScriptImpl() Gets a collection of scripts of the SqlSmoObject. (hérité de SqlSmoObject.)
Méthode protégée ScriptImpl(ScriptingOptions) Gets a collection of scripts of the SqlSmoObject. (hérité de SqlSmoObject.)
Méthode protégée SetCollectionTextMode Sets the collection text mode. (hérité de ScriptNameObjectBase.)
Méthode protégée SetIsSystemNamed Sets a Boolean value that specifies whether the system is named. (hérité de ScriptNameObjectBase.)
Méthode protégée SetParentImpl Sets the parent of the SqlSmoObject to the newParent parameter. (hérité de SqlSmoObject.)
Méthode protégée SetSchemaOwned Sets the schema owned value. (hérité de NamedSmoObject.)
Méthode protégée SetTextBody Specifies the text body. (hérité de ScriptNameObjectBase.)
Méthode protégée SetTextHeader Specifies the text header. (hérité de ScriptNameObjectBase.)
Méthode protégée SetTextMode Specifies the text mode. (hérité de ScriptNameObjectBase.)
Méthode protégée SwitchTextMode Switches the text mode. (hérité de ScriptNameObjectBase.)
Méthode protégée ThrowIfTextIsDirtyForAlter Throws an exception of text has been modified and not persisted. (hérité de ScriptNameObjectBase.)
Méthode publique ToString Returns a String that represents the referenced object. (hérité de SqlSmoObject.)
Méthode protégée TouchImpl Not implemented. (hérité de SqlSmoObject.)
Méthode protégée UnbindDefaultImpl Unbinds the default columns of the SqlSmoObject. (hérité de SqlSmoObject.)
Méthode publique UnbindFromColumn(String, String) Unbinds the default or rule from the specified column.
Méthode publique UnbindFromColumn(String, String, String) Unbinds the default or rule from the specified column with the specified table schema.
Méthode publique UnbindFromDataType Unbinds the default or rule from the specified data type
Méthode protégée UnbindRuleImpl Unbinds rules of the SqlSmoObject. (hérité de SqlSmoObject.)
Méthode publique Validate Validates the state of an object. (hérité de SmoObjectBase.)

Haut de la page

Événements

  Nom Description
Événement public PropertyChanged Represents the event that occurs when a property is changed. (hérité de SqlSmoObject.)
Événement public PropertyMetadataChanged Represents the event that occurs when property metadata changes. (hérité de SqlSmoObject.)

Haut de la page

Champs

  Nom Description
Champ protégé m_ExtendedProperties Represents a property that is defined to extend the properties provided by a SqlSmoObject. (hérité de SqlSmoObject.)
Champ protégé singletonParent Represents the singleton parent. (hérité de SqlSmoObject.)

Haut de la page

Implémentations d'interfaces explicites

  Nom Description
Implémentation d'interface expliciteMéthode privée IAlienObject.Discover Discovers any dependencies. Ne faites pas directement référence à ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObject.GetDomainRoot Returns the root of the domain. (hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObject.GetParent Gets the parent of this object. Ne faites pas directement référence à ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObject.GetPropertyType Gets the type of the specified property. (hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObject.GetPropertyValue Gets the value of the specified property. (hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObject.GetUrn Gets the Unified Resource Name (URN) of the object. Ne faites pas directement référence à ce membre dans votre code. Il prend en charge l'infrastructure SQL Server. (hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObject.Resolve Gets the instance that contains the information about the object from the Unified Resource Name (URN) of the object. (hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObject.SetObjectState Sets the object state to the specified SfcObjectState value. (hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObject.SetPropertyValue Sets the property value. (hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée ISfcPropertyProvider.GetPropertySet Gets the interface reference to the set of properties of this object. (hérité de SqlSmoObject.)

Haut de la page

Notes

Thread Safety

Tout membre statique public (Partagé dans Microsoft Visual Basic) de ce type est sûr dans le cadre des opérations à plusieurs threads. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.

Exemples

Création, modification et suppression des valeurs par défaut

Sécurité des threads

Tous les membres publics static (Shared dans Visual Basic) de ce type sont thread-safe. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.

Voir aussi

Référence

Espace de noms Microsoft.SqlServer.Management.Smo

Autres ressources

Utilisation des objets de base de données

Règles

Valeurs par défaut