VBCodeProviderWithDocs Class

EWSoftware.CodeDom

VBCodeProviderWithDocs Class
This is a custom VB.NET code provider that is able to output an individual XML comments file for each unit that is compiled to a folder of your choice.
Inheritance Hierarchy
SystemObject  SystemMarshalByRefObject
    System.ComponentModelComponent
      System.CodeDom.CompilerCodeDomProvider
        Microsoft.VisualBasicVBCodeProvider
          EWSoftware.CodeDomVBCodeProviderWithDocs

Namespace: EWSoftware.CodeDom
Assembly: EWSoftware.CodeDom (in EWSoftware.CodeDom.dll) Version: 2015.6.7.0
Syntax
public class VBCodeProviderWithDocs : VBCodeProvider
Public Class VBCodeProviderWithDocs
	Inherits VBCodeProvider
public ref class VBCodeProviderWithDocs : public VBCodeProvider
type VBCodeProviderWithDocs =  
    class
        inherit VBCodeProvider
    end

The VBCodeProviderWithDocs type exposes the following members.

Constructors
  NameDescription
Public methodVBCodeProviderWithDocs
Default constructor
Public methodVBCodeProviderWithDocs(IDictionaryString, String)
This constructor is passed a provider options dictionary
Top
Properties
  NameDescription
Protected propertyCanRaiseEvents
Gets a value indicating whether the component can raise an event.
(Inherited from Component.)
Public propertyContainer
Gets the IContainer that contains the Component.
(Inherited from Component.)
Protected propertyDesignMode
Gets a value that indicates whether the Component is currently in design mode.
(Inherited from Component.)
Protected propertyEvents
Gets the list of event handlers that are attached to this Component.
(Inherited from Component.)
Public propertyFileExtension
Gets the file name extension to use when creating source code files.
(Inherited from VBCodeProvider.)
Public propertyLanguageOptions
Gets a language features identifier.
(Inherited from VBCodeProvider.)
Public propertySite
Gets or sets the ISite of the Component.
(Inherited from Component.)
Top
Methods
  NameDescription
Public methodCompileAssemblyFromDom
Compiles an assembly based on the System.CodeDom trees contained in the specified array of CodeCompileUnit objects, using the specified compiler settings.
(Overrides CodeDomProviderCompileAssemblyFromDom(CompilerParameters, CodeCompileUnit).)
Public methodCompileAssemblyFromFile
Compiles an assembly from the source code contained in the specified files, using the specified compiler settings.
(Overrides CodeDomProviderCompileAssemblyFromFile(CompilerParameters, String).)
Public methodCompileAssemblyFromSource
Compiles an assembly from the specified array of strings containing source code, using the specified compiler settings.
(Overrides CodeDomProviderCompileAssemblyFromSource(CompilerParameters, String).)
Public methodCreateCompiler Obsolete.
Gets an instance of the Visual Basic code compiler.
(Inherited from VBCodeProvider.)
Public methodCreateEscapedIdentifier
Creates an escaped identifier for the specified value.
(Inherited from CodeDomProvider.)
Public methodCreateGenerator Obsolete.
Gets an instance of the Visual Basic code generator.
(Inherited from VBCodeProvider.)
Public methodCreateGenerator(TextWriter)
When overridden in a derived class, creates a new code generator using the specified TextWriter for output.
(Inherited from CodeDomProvider.)
Public methodCreateGenerator(String)
When overridden in a derived class, creates a new code generator using the specified file name for output.
(Inherited from CodeDomProvider.)
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodCreateParser Obsolete.
When overridden in a derived class, creates a new code parser.
(Inherited from CodeDomProvider.)
Public methodCreateValidIdentifier
Creates a valid identifier for the specified value.
(Inherited from CodeDomProvider.)
Public methodDispose
Releases all resources used by the Component.
(Inherited from Component.)
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the Component and optionally releases the managed resources.
(Inherited from Component.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.
(Inherited from Component.)
Public methodGenerateCodeFromCompileUnit
Generates code for the specified Code Document Object Model (CodeDOM) compilation unit and sends it to the specified text writer, using the specified options.
(Inherited from CodeDomProvider.)
Public methodGenerateCodeFromExpression
Generates code for the specified Code Document Object Model (CodeDOM) expression and sends it to the specified text writer, using the specified options.
(Inherited from CodeDomProvider.)
Public methodGenerateCodeFromMember
Generates code for the specified class member using the specified text writer and code generator options.
(Inherited from VBCodeProvider.)
Public methodGenerateCodeFromNamespace
Generates code for the specified Code Document Object Model (CodeDOM) namespace and sends it to the specified text writer, using the specified options.
(Inherited from CodeDomProvider.)
Public methodGenerateCodeFromStatement
Generates code for the specified Code Document Object Model (CodeDOM) statement and sends it to the specified text writer, using the specified options.
(Inherited from CodeDomProvider.)
Public methodGenerateCodeFromType
Generates code for the specified Code Document Object Model (CodeDOM) type declaration and sends it to the specified text writer, using the specified options.
(Inherited from CodeDomProvider.)
Public methodGetConverter
Gets a TypeConverter for the specified type of object.
(Inherited from VBCodeProvider.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodGetService
Returns an object that represents a service provided by the Component or by its Container.
(Inherited from Component.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetTypeOutput
Gets the type indicated by the specified CodeTypeReference.
(Inherited from CodeDomProvider.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodIsValidIdentifier
Returns a value that indicates whether the specified value is a valid identifier for the current language.
(Inherited from CodeDomProvider.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Public methodParse
Compiles the code read from the specified text stream into a CodeCompileUnit.
(Inherited from CodeDomProvider.)
Public methodSupports
Returns a value indicating whether the specified code generation support is provided.
(Inherited from CodeDomProvider.)
Public methodToString
Returns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component.)
Top
Events
  NameDescription
Public eventDisposed
Occurs when the component is disposed by a call to the Dispose method.
(Inherited from Component.)
Top
Remarks
This changes the default behavior which overwrites the comments file on each invocation and/or dumps them into the temporary ASP.NET compilation folder.

A /docpath:[path] option should be added to the compilerOptions attribute in the Web.config file to specify the path to which the XML comments files will be written. The filenames will match the assembly names generated by the compiler.

Examples
Example Compiler Configuration
<configuration>
    <system.codedom>
      <compilers>
        <!-- For VB.NET -->
        <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
          compilerOptions="/docpath:C:\Publish\Doc"
          type="EWSoftware.CodeDom.VBCodeProviderWithDocs,
              EWSoftware.CodeDom, Version=1.0.0.0, Culture=neutral,
              PublicKeyToken=d633d7d5b41cbb65" />
      </compilers>
    </system.codedom>
</configuration>
See Also