mscorlib(4.0.0.0) API with additions
ICodeGenerator.cs
1 using System.IO;
3 
5 {
7  public interface ICodeGenerator
8  {
13  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
14  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
15  bool IsValidIdentifier(string value);
16 
20  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
21  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
22  void ValidateIdentifier(string value);
23 
27  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
28  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
29  string CreateEscapedIdentifier(string value);
30 
34  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
35  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
36  string CreateValidIdentifier(string value);
37 
41  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
42  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
43  string GetTypeOutput(CodeTypeReference type);
44 
49  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
50  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
51  bool Supports(GeneratorSupport supports);
52 
57  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
58  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
60 
65  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
66  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
68 
73  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
74  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
76 
81  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
82  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
84 
89  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
90  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
92  }
93 }
void ValidateIdentifier(string value)
Throws an exception if the specified value is not a valid identifier.
string CreateEscapedIdentifier(string value)
Creates an escaped identifier for the specified value.
bool IsValidIdentifier(string value)
Gets a value that indicates whether the specified value is a valid identifier for the current languag...
Represents a type declaration for a class, structure, interface, or enumeration.
Definition: __Canon.cs:3
void GenerateCodeFromStatement(CodeStatement e, TextWriter w, CodeGeneratorOptions o)
Generates code for the specified Code Document Object Model (CodeDOM) statement and outputs it to the...
void GenerateCodeFromNamespace(CodeNamespace e, TextWriter w, CodeGeneratorOptions o)
Generates code for the specified Code Document Object Model (CodeDOM) namespace and outputs it to the...
SecurityAction
Specifies the security actions that can be performed using declarative security.
Defines an interface for generating code.
string CreateValidIdentifier(string value)
Creates a valid identifier for the specified value.
void GenerateCodeFromType(CodeTypeDeclaration e, TextWriter w, CodeGeneratorOptions o)
Generates code for the specified Code Document Object Model (CodeDOM) type declaration and outputs it...
Represents a writer that can write a sequential series of characters. This class is abstract.
Definition: TextWriter.cs:15
Represents a set of options used by a code generator.
void GenerateCodeFromExpression(CodeExpression e, TextWriter w, CodeGeneratorOptions o)
Generates code for the specified Code Document Object Model (CodeDOM) expression and outputs it to th...
Provides a container for a CodeDOM program graph.
GeneratorSupport
Defines identifiers used to determine whether a code generator supports certain types of code element...
Represents a namespace declaration.
Represents a code expression. This is a base class for other code expression objects that is never in...
Represents the abstract base class from which all code statements derive.
string GetTypeOutput(CodeTypeReference type)
Gets the type indicated by the specified T:System.CodeDom.CodeTypeReference.
bool Supports(GeneratorSupport supports)
Gets a value indicating whether the generator provides support for the language features represented ...
void GenerateCodeFromCompileUnit(CodeCompileUnit e, TextWriter w, CodeGeneratorOptions o)
Generates code for the specified Code Document Object Model (CodeDOM) compilation unit and outputs it...
Represents a reference to a type.