Rule Class

Used to represent the schema information for a Tool, a Custom Build Rule, a PropertyPage, and so on.

Namespace:  Microsoft.Build.Framework.XamlTypes
Assembly:  Microsoft.Build.Framework (in Microsoft.Build.Framework.dll)

[ContentPropertyAttribute("Properties")]
public sealed class Rule : RuleSchema, ISupportInitialize, 
	IProjectSchemaNode

The Rule type exposes the following members.

  NameDescription
Public methodRuleDefault constructor. Required for deserialization from a persisted format.
Top

  NameDescription
Public propertyAdditionalInputsWhen this Rule represents a Build Customization, this field defines the semicolon-separated list of additional inputs to be evaluated for the Build Customization target.
Public propertyCategoriesGets or sets the list of Category categories that the properties in this Rule belong to.
Public propertyCommandLineWhen this Rule represents a Build Customization, this field represents the command-line template to be used by a Build Customization task to invoke the tool.
Public propertyDataSourceThe DataSource for the properties in this Rule. This is overridden by any data source that is defined locally for a property.
Public propertyDescriptionGets or sets a description of this Rule for use by a prospective UI client.
Public propertyDisplayNameGets or sets a name that can be used by a prospective UI client to display this BaseProperty.
Public propertyEvaluatedCategoriesReturns the union of XAML specified Category categories and auto-generated Category categories. The latter are created from any missing categories that are referred to by the properties in this Rule. The auto-generated Category categories only have their names set.
Public propertyExecutionDescriptionWhen this Rule represents a Build Customization, this field represents the message to be displayed before a Build Customization is executed during the build.
Public propertyFileExtensionWhen this Rule represents a Build Customization, this field represents the file name extension to associate.
Public propertyHelpStringGets or sets Help information for this Rule.
Public propertyMetadataGets or sets arbitrary metadata that may be set on a rule.
Public propertyNameThe name of this Rule.
Public propertyOrderGets or sets a suggestion to a prospective UI client for the relative location of this Rule compared to all other Rules in the system.
Public propertyOutputsWhen this Rule represents a Build Customization, this field defines the semicolon-separated list of outputs that are to be evaluated for the Build Customization target.
Public propertyOverrideModeGets or sets the method to use when multiple rules with the same name appear in the project to reconcile the rules into one instance.
Public propertyPageTemplateGets or sets the UI rendering template that is used to display this Rule.
Public propertyPropertiesGets or sets the list of properties in this Rule.
Public propertyPropertyPagesHiddenGets or sets a flag indicating whether property pages for this rule are hidden.
Public propertySeparatorGets or sets a token that is used to separate a property switch from its value.
Public propertyShowOnlyRulePropertiesGets or sets a flag that determines whether to hide the command-line category.
Public propertySupportsFileBatchingGets or sets a flag that determines whether multiple files can be batched on one command-line invocation.
Public propertySwitchPrefixGets or sets the prefix to use for all property switches in this Rule for the case when this property Rule represents a tool.
Public propertyToolNameGets or sets the name of the tool when this rule represents a tool.
Top

  NameDescription
Public methodBeginInitSee BeginInit.
Public methodEndInitSee EndInit.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetPropertiesByCategoryReturns a dictionary of all properties partitioned into categories.
Public methodGetPropertiesInCategoryReturns the list of properties in a Category.
Public methodGetPropertyGets the property with the specified name.
Public methodGetSchemaObjectsReturns an enumerator over all instances of static data that have the given type.
Public methodGetSchemaObjectTypesReturns an enumerator over all types of static data for the data-driven features that this node contains.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

Typically represented on disk as XAML, only one instance of this class is maintained per XAML file per project engine (solution).

If you manually instantiate this class, call BeginInit before you set the first property of the object and EndInit after you set the last property.

.NET Framework

Supported in: 4.5, 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft