Policy Files


Policy files are XML files that enable you to enforce the restrictions or policies of your company or development team and are written in the Enterprise Template Definition Language (TDL). The policy files contain information and restrictions on every project that can be included in a solution.

TIP

Just like any programming language API, TDL has many options with specific parameters. In the old days, this was the reason for carrying a large book that contained the definitions and available parameters for the API. However, with the introduction of Intellisense and code completion, those books have become unnecessary. If you edit a TDL file with Visual Studio .NET, you will immediately see that you made the correct decision as Visual Studio .NET understands the TDL file and you can take advantage of code completion.


TDL Elements

Because it is always a good idea to learn the constructs and definitions of any language before you attempt to use it, each element and a brief description of its function are included in Table 41.2. Each element, known as a node, is written in uppercase and the structure and nesting of each node is enforced by the tdLSchema.xsd file. It is also worth noting that only nodes that are included in the TDLSchema.xsd file are allowed when creating policy files.

Table 41.2. TDL Elements as Indicated by MSDN Documentation

Element

Description

<CATEGORIES>

Defines a container for logically grouping similar elements defined in a different location of the policy file.

<CATEGORY>

Defines a reusable grouping of logically similar elements.

<CATEGORYMEMBER>

Defines a reference to a predefined policy file element.

<CMDID>

Defines the absolute position ID of a menu item in a menu hierarchy.

<CONSTRAINTS>

Defines a container for defining restrictions on IDE properties, menus, and toolbox items.

<CONTEXT>

Defines the content information displayed by the Dynamic Help Window when navigating between IDE elements.

<CTXTATTRIBUTE>

Defines a container for resolving contextual switching and initialization issues related to dynamic help within the Visual Studio .NET IDE.

<DEFAULT>

Defines a default value for automatically initializing a property.

<DEFAULTACTION>

Defines the default inclusion or exclusion setting to apply to a group of policy file elements.

<DEFAULTSETTINGS>

Defines global enterprise template policy file settings for each element.

<DESCRIPTOR>

Defines a unique ID for an IDE toolbox control.

<ELEMENT>

Defines a unique enterprise template building block.

<ELEMENTS>

Defines a collection of all building blocks available to an enterprise template.

<ELEMENTSET>

Defines a container for grouping building blocks.

<ENABLED>

Defines an enabled or disabled state for a menu item or toolbox item.

<EXCLUDE>

Defines which template building blocks are not permitted to be referenced from within the context of another building block.

<FEATURELINKS>

Defines which set of menu or toolbox features may be associated to a specific template building block element.

<FEATURES>

Defines the collection of menu and toolbox items to be restricted via policy.

<GUID>

Defines a globally unique identifier for an IDE menu group.

<ID>

Defines a mechanism for referencing a node from other places in the policy file.

<IDENTIFIER>

Defines locating, identifying and configuration information about a specific policy file element.

<IDENTIFIERDATA>

Defines a name/value pair for processing references to elements.

<IDENTIFIERS>

Defines a collection of identifying nodes containing location, identification, and configuration information for specific elements.

<INCLUDE>

Defines the ID of an element to include in another place in the policy file.

<MAXVALUE>

Defines the maximum allowable value a property or element may contain.

<MEMBERCONSTRAINT>

Defines restrictions on a specific element based upon an ID.

<MEMBERCONSTRAINTS>

Defines a collection of restraints applying to specific menu, toolbox, or properties based upon an ID.

<MENU>

Defines a menu item for later reference in the policy file.

<MENUCONSTRAINT>

Defines the enabled or disabled restraint for a menu item.

<MENUCONSTRAINTS>

Defines a collection of context-based restricted menu items.

<MENULINK>

Defines a relationship where a menu item is disabled if the associated item is defined elsewhere in the policy file with an exclusion setting.

<MENULINKS>

Defines a collection of menu items to be disabled when the associated item has the exclusion property set.

<MENUS>

Defines a collection of menus to be included in the policy file.

<MINVALUE>

Defines a minimum allowable value for an element.

<NAME>

Defines a reference identifier for accessing the node containing the value.

<ORDER>

Defines the order in which include/exclude settings are evaluated within a policy file element.

<POLICYMODE>

Defines the mechanism for handling undefined or unrecognized items.

<PROPERTYCONSTRAINT>

Defines scope-restricted settings for properties displayed within the IDE properties browser window.

<PROPERTYCONSTRAINTS>

Defines a collection of scope-restricted settings for properties displayed within the IDE properties browser window.

<PROTOTYPE>

Defines the location of a project, item, or enterprise template project from which a specific type of project can be created.

<PROTOTYPES>

Defines a collection of location information for finding and creating specific types of enterprise template projects.

<READONLY>

Defines if a property is allowed to be edited.

<TDL>

Defines the root node of a policy file, which contains all other policy file elements.

<TOOLBOXCONSTRAINT>

Defines if a specific toolbox item should be contextually enabled or disabled.

<TOOLBOXCONSTRAINTS>

Defines a collection of toolbox items that should be contextually enabled or disabled.

<TOOLBOXITEM>

Defines an item to display within the toolbox.

<TOOLBOXITEMS>

Defines a collection of items to display within the toolbox.

<TOOLBOXLINK>

Defines a relationship where a toolbox item is disabled if the associated item is defined elsewhere in the policy file with an exclusion setting.

<TOOLBOXLINKS>

Defines a collection of toolbox items to be disabled when the associated item has the exclusion property set.

<TYPE>

Defines a label identifying the type of the logical element.

<VALUE>

Defines the data portion of a name/value pair.




    Visual C#. NET 2003 Unleashed
    Visual C#. NET 2003 Unleashed
    ISBN: 672326760
    EAN: N/A
    Year: 2003
    Pages: 316

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net