Click here to Skip to main content
15,881,856 members
Articles / Programming Languages / C#

Resolving Symbolic References in a CodeDOM (Part 7)

Rate me:
Please Sign up or sign in to vote.
4.75/5 (6 votes)
2 Dec 2012CDDL12 min read 19.4K   509   14  
Resolving symbolic references in a CodeDOM.
<?xml version="1.0"?>
<configuration>

  <configSections>
    <section name="Nova" type="Nova.Configuration, Nova.CodeDOM"/>
  </configSections>

  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>

  <Nova>

    <!-- Determines the logging level: None, Minimal, Normal, Detailed.  DEFAULT: Minimal -->
    <!--<add key="Log.LogLevel" value="Normal"/>-->

    <!-- Determines whether or not exact matching is enforced when only one possible match is found for an unresolved reference.
         By default, an exact match is required, but this can be set to false to allow a match if there is only one possibility.  DEFAULT: true -->
    <!--<add key="Resolving.Resolver.ExactMatching" value="false"/>-->

    <!-- Determines if code changes are saved to a separate ".Nova.cs" file instead of the original.  DEFAULT: false -->
    <!--<add key="CodeDOM.CodeUnit.SaveChangesToSeparateFile" value="true"/>-->

    <!-- Determines if DocCode content is parsed as code or plain text.  DEFAULT: true -->
    <!--<add key="CodeDOM.DocCode.ParseContentAsCode" value="false"/>-->

    <!-- Determines if TODO and HACK comments are listed with other messages.  DEFAULT: true -->
    <!--<add key="CodeDOM.Comment.ListSpecialComments" value="false"/>-->

    <!-- Determines if resolve errors in workflow code-beside files (".xoml.cs") are listed.  DEFAULT: false -->
    <!--<add key="CodeDOM.CodeUnit.ListWorkflowFileErrors" value="true"/>-->

    <!-- The tab size used for indentation of code.  DEFAULT: 4 -->
    <!--<add key="CodeDOM.CodeObject.TabSize" value="4"/>-->

    <!-- Automatically detect and preserve tabs used for code indentation.  DEFAULT: true -->
    <!--<add key="CodeDOM.CodeObject.AutoDetectTabs" value="false"/>-->

    <!-- Use tabs instead of spaces for indentation (ignored if AutoDetectTabs is true).  DEFAULT: false -->
    <!--<add key="CodeDOM.CodeObject.UseTabs" value="true"/>-->

    <!-- The maximum line length used for automatic formatting, such as code alignment and line wrapping.  DEFAULT: 128 -->
    <!--<add key="CodeDOM.CodeObject.MaximumLineLength" value="128"/>-->

    <!-- Determines whether or not formatting cleanup is automatically performed during the parsing process.
         This includes:
             - Remove optional braces from single-line bodies and add them to multi-line bodies.
        		 - Force empty braces onto a single line if that's the default and they start on a new line.
             - Force property accessors (get/set) to a single line if they have a single-line body,
                   and remove any blank lines preceeding them in the property declaration (includes events).
             - Force constructor initializers to start on a new line.
             - Move newlines immediately after an operator to before it.
             - Remove parens from expressions that don't use them by default (in various situations).
        		 - Remove more than 3 consecutive blank lines, and all blank lines at the end of a block or preceeding an else/else if/catch/finally.
         DEFAULT: false -->
    <!--<add key="CodeDOM.CodeObject.AutomaticFormattingCleanup" value="true"/>-->

    <!-- Determines whether or not code cleanup is automatically performed during the parsing and/or resolving process.
         This includes:
             - Convert 'System.Type' to 'Type' for built-in types, which are then displayed using keywords
                   (all built-in types are displayed using keywords if they have no 'System' namespace prefix).
             - Convert 'System.Nullable<Type>' to 'Nullable<Type>' for all types, which are then displayed as 'Type?'.
             - Convert 'for (;;)' or 'do { } while (true)' to 'while (true)', and 'while (true)' to have a null
               condition, representing an infinite loop (still displayed as 'while (true)', or optionally, 'do').
             - Convert '<code>expression</code>' in a doc comment to '<c>expression</c>'.
         DEFAULT: false -->
    <!--<add key="CodeDOM.CodeObject.AutomaticCodeCleanup" value="true"/>-->

    <!-- Use Mono Cecil to load assemblies instead of reflection.  Loaded data will use types in the Mono.Cecil
         namespace such as AssemblyDefinition, TypeDefinition, MethodDefinition, PropertyDefinition, FieldDefinition,
         etc. instead of the reflection types of Assembly, Type, MethodInfo, PropertyInfo, FieldInfo, etc.  Using
         Mono Cecil is faster than reflection, and gets around various possible issues, including the inability to
         unload reflection data from memory.  DEFAULT: true -->
    <!--<add key="CodeDOM.ApplicationContext.UseMonoCecilLoads" value="false"/>-->

    <!-- Use reflection-only loads to load assemblies (ignored if using Mono Cecil loads).
         Reflection-only loads bypass strong name verifications, CAS policy checks, processor architecture
         loading rules, binding policies, don't execute any init code, and prevent automatic probing of dependencies.
         This can help to load assemblies that otherwise wouldn't be loadable, but it can also cause loading problems
         of its own, such as trying to load old framework assemblies (due to bypassing binding policies) that aren't
         compatible with newer and/or 64bit OSes, or illegal cross-references with normally-loaded assemblies.
         However, logic has been added to workaround these issues in most cases, and NOT using reflection-only loads
         prevents loading old versions of framework assemblies, which can cause resolve conflicts (in either case,
         old versions of 'mscorlib' can never be loaded into the default app domain).  DEFAULT: true -->
    <!--<add key="CodeDOM.ApplicationContext.UseReflectionOnlyLoads" value="false"/>-->

    <!-- Set to load internal types in addition to public types when loading types from referenced assemblies and
         projects, even when there isn't any InternalsVisibleTo attribute.  This allows resolving namespaces and types
         that would otherwise not be found, allowing code analysis to then flag such references as illegal (not accessible).
         This option will slow things down a bit and use up more memory.  DEFAULT: false -->
    <!--<add key="CodeDOM.Project.LoadInternalTypes" value="true"/>-->

  </Nova>

</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)


Written By
Software Developer (Senior)
United States United States
I've been writing software since the late 70's, currently focusing mainly on C#.NET. I also like to travel around the world, and I own a Chocolate Factory (sadly, none of my employees are oompa loompas).

Comments and Discussions