本文整理汇总了C#中Mono.CSharp.ModuleContainer.AddTypeContainer方法的典型用法代码示例。如果您正苦于以下问题:C# ModuleContainer.AddTypeContainer方法的具体用法?C# ModuleContainer.AddTypeContainer怎么用?C# ModuleContainer.AddTypeContainer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.CSharp.ModuleContainer
的用法示例。
在下文中一共展示了ModuleContainer.AddTypeContainer方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Parse
public static void Parse(SeekableStreamReader reader, SourceFile sourceFile, ModuleContainer module, ParserSession session, Report report)
{
var file = new CompilationSourceFile(module, sourceFile);
module.AddTypeContainer(file);
CSharpParser parser = new CSharpParser(reader, file, report, session);
parser.parse();
}
示例2: Evaluator
public Evaluator (CompilerContext ctx)
{
this.ctx = ctx;
module = new ModuleContainer (ctx);
module.Evaluator = this;
source_file = new CompilationSourceFile (module);
module.AddTypeContainer (source_file);
startup_files = ctx.SourceFiles.Count;
// FIXME: Importer needs this assembly for internalsvisibleto
module.SetDeclaringAssembly (new AssemblyDefinitionDynamic (module, "evaluator"));
importer = new ReflectionImporter (module, ctx.BuiltinTypes);
InteractiveBaseClass = typeof (InteractiveBase);
fields = new Dictionary<string, Tuple<FieldSpec, FieldInfo>> ();
}
示例3: Parse
public static CSharpParser Parse(SeekableStreamReader reader, SourceFile sourceFile, ModuleContainer module, ParserSession session, Report report, int lineModifier = 0, int colModifier = 0)
{
var file = new CompilationSourceFile (module, sourceFile);
module.AddTypeContainer(file);
CSharpParser parser = new CSharpParser (reader, file, report, session);
parser.Lexer.Line += lineModifier;
parser.Lexer.Column += colModifier;
parser.Lexer.sbag = new SpecialsBag ();
parser.parse ();
return parser;
}
示例4: Parse
public static void Parse (SeekableStreamReader reader, SourceFile sourceFile, ModuleContainer module, ParserSession session, Report report)
{
var file = new CompilationSourceFile (module, sourceFile);
module.AddTypeContainer (file);
if (sourceFile.FileType == SourceFileType.CSharp) {
CSharpParser parser = new CSharpParser (reader, file, session);
parser.parse ();
} else {
PlayScriptParser parser = new PlayScriptParser (reader, file, session);
parser.parsing_playscript = sourceFile.PsExtended;
parser.parse ();
}
}
示例5: Parse
public CSharpParser Parse (SeekableStreamReader reader, SourceFile sourceFile, ModuleContainer module)
{
var file = new CompilationSourceFile (module, sourceFile);
module.AddTypeContainer (file);
CSharpParser parser = new CSharpParser (reader, file);
parser.Lexer.sbag = new SpecialsBag ();
parser.parse ();
return parser;
}