Scripting Object Markup
Scripting Object MarkupThis article is intended to introduce some of the functionality that can be enhanced and modified by marking up scripting objects with attributes and comments.
ObjectsFor the purpose of this article, "objects" will be defined as classes and procedures:
- Class - The formal definition of an object. The class acts as the template from which an instance of an object is created at run time. The class defines the properties of the object and the methods used to control the object's behavior.
- Procedure - A named sequence of statements executed as a unit. For example, Function, Property, and Sub are types of procedures.
MarkupMarkup refers to the use of comments and attributes to affect the display and/or behavior of scripting objects.
AttributesAttributes provide a powerful method of associating metadata with code. Grooper recognizes many attributes that can enhance or change default behavior. The Attributes article has more information on specific attributes. Some of the most important functionality enabled through attribute markup are Serialization, Type Converters and Property Grid Editors.
XML Documentation CommentsYou can create documentation for your code by including XML elements in special comment fields (indicated by triple tick marks in VB or triple slashes in C#) in the source code directly before the code block to which the comments refer. The <summary> tag should be used to describe a type or a type member. Use <remarks> to add supplemental information to a type description. Grooper further utilizes these comments by using them to populate the help section of property grids and displaying tool tips, as applicable, for the objects at run-time.
Property Grid Editors and Type Converters