First, let us identify some of the functions of
CodeDomProvider class in a tabular format.
S NO
|
Method Name / Property Name
|
Description
|
1
|
CompileAssemblyFromSource
|
Compiles an array of source code strings.
|
2
|
CreateCompiler
|
Creates an ICodeCompiler that can be used for compilation
and returns it.
|
3
|
CreateProvider
|
Creates a CodeDomProvider and returns it.
|
4
|
CompileAssemblyFromDom
|
Compiles an assembly based on the System.CodeDom trees
contained in the specified array of System.CodeDom.CodeCompileUnit objects
using the specified compiler
|
5
|
CompileAssemblyFromFile
|
Compiles an assembly by taking the name of the file.
|
6
|
GetLanguageFromExtension
|
Returns a language name associated with the specified file
name extension as configured in the System.CodeDom.Compiler.CodeDomProvider
compiler configuration section.
|
7
|
GetCompilerInfo
|
Returns the language provider and compiler configuration
settings for the specified language.
|
As we can see from the tabular format, we have methods of
two types: Creating a compiler and compiling the source code from an existing
compiler. We can identify here that CodeDomProvider encapsulates the creation
part and the compilation part. Therefore, CodeDomProvider is a vital class in
the architecture of CodeDom 2.0.