Click or drag to resize

Getting Started

How to get started using the Nova CodeDOM library.

Using the CodeDOM

To use the Nova CodeDOM library, simply add a reference to the Nova.CodeDOM.dll to your project, add a using Nova.CodeDOM; directive to the top of a file, and start using the classes in the library. Intellisense should work as long as the Nova.CodeDOM.xml file is present in the same directory as the DLL.

Namespaces and Types

The namespaces of the Nova CodeDOM library are described below, along with some of the most important types:

  • Nova - the root namespace, containing logging and configuration classes. You might find the Log class handy for your own code.

  • Nova.CodeDOM - the primary namespace, containing all of the classes that model the C# language and also solution and project files.

    • Solution - represents a solution (*.sln) file. Most commonly, use of the CodeDOM starts with this class, using it to load an entire solution file into memory before performing other operations on the resulting code objects.

    • Project - represents a C# project (*.csproj) file. It's possible to load a C# project directly instead of a solution.

    • CodeUnit - represents a C# source file or code fragment. It's possible to load a C# source file or code fragment directly, without any solution or project files.

    • CodeObject - the common base class for most CodeDOM objects. Examine the members of this class, as they are available on most objects. Follow the inheritance hierarchy up to get familiar with how classes relate to one another. The majority of derived objects are either Statements or Expressions.

    • Statement - the common base class for all C# statements.

    • Expression - the common base class for all C# expression objects.

  • Nova.Analysis - contains classes used for code metrics and analysis.

  • Nova.Parsing - contains classes used for parsing C# sources into code objects. You should generally not need to use these types directly.

  • Nova.Rendering - contains classes used for rendering code objects as C# text. You should generally not need to use these types directly.

  • Nova.Utilities - contains utility classes that hold handy extension and helper methods for various types. These methods can come in handy when using the Nova CodeDOM library, and also for your own code.

Tip Tip

Get more familiar with this library before you start coding by spending some time inspecting the namespaces, classes they contain, the inheritance hierarchy of the classes, and the class members.

Tip Tip

For a better understanding of how to get started coding, see the Examples.

Support

If you have questions, problems, or wish to report a bug or make a feature request, send an email to: support@inevitablesoftware.com