本文整理汇总了C#中Mono.CSharp.ReportPrinter类的典型用法代码示例。如果您正苦于以下问题:C# ReportPrinter类的具体用法?C# ReportPrinter怎么用?C# ReportPrinter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReportPrinter类属于Mono.CSharp命名空间,在下文中一共展示了ReportPrinter类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Report
public Report (ReportPrinter printer)
{
if (printer == null)
throw new ArgumentNullException ("printer");
this.printer = printer;
warning_level = 4;
}
开发者ID:litoMalone,项目名称:mono,代码行数:8,代码来源:report.cs
示例2: Create
public static Driver Create (string[] args, bool require_files, ReportPrinter printer)
{
Driver d = new Driver (new CompilerContext (new Report (printer)));
if (!d.ParseArguments (args, require_files))
return null;
return d;
}
开发者ID:litoMalone,项目名称:mono,代码行数:9,代码来源:driver.cs
示例3: Create
public static Driver Create (string[] args, bool require_files, Func<string [], int, int> unknown_option_parser, ReportPrinter printer)
{
Driver d = new Driver (new CompilerContext (new Report (printer)));
if (!d.ParseArguments (args, require_files, unknown_option_parser))
return null;
return d;
}
开发者ID:nekresh,项目名称:mono,代码行数:9,代码来源:driver.cs
示例4: Report
public Report (CompilerContext context, ReportPrinter printer)
{
if (context == null)
throw new ArgumentNullException ("settings");
if (printer == null)
throw new ArgumentNullException ("printer");
this.settings = context.Settings;
this.printer = printer;
}
开发者ID:Profit0004,项目名称:mono,代码行数:10,代码来源:report.cs
示例5: ParseFile
public static CompilerCompilationUnit ParseFile(string[] args, Stream input, string inputFile, ReportPrinter reportPrinter)
{
lock (parseLock) {
try {
// Driver d = Driver.Create (args, false, null, reportPrinter);
// if (d == null)
// return null;
var r = new Report (reportPrinter);
CommandLineParser cmd = new CommandLineParser (r, Console.Out);
var setting = cmd.ParseArguments (args);
if (setting == null || r.Errors > 0)
return null;
setting.Version = LanguageVersion.V_5;
CompilerContext ctx = new CompilerContext (setting, r);
var files = new List<CompilationSourceFile> ();
var unit = new CompilationSourceFile (inputFile, inputFile, 0);
var module = new ModuleContainer (ctx);
unit.NamespaceContainer = new NamespaceContainer (null, module, null, unit);
files.Add (unit);
Location.Initialize (files);
// TODO: encoding from driver
SeekableStreamReader reader = new SeekableStreamReader (input, Encoding.UTF8);
RootContext.ToplevelTypes = module;
CSharpParser parser = new CSharpParser (reader, unit);
parser.Lexer.TabSize = 1;
parser.Lexer.sbag = new SpecialsBag ();
parser.LocationsBag = new LocationsBag ();
parser.UsingsBag = new UsingsBag ();
parser.parse ();
return new CompilerCompilationUnit () {
ModuleCompiled = RootContext.ToplevelTypes,
LocationsBag = parser.LocationsBag,
UsingsBag = parser.UsingsBag,
SpecialsBag = parser.Lexer.sbag,
LastYYValue = parser.LastYYVal
};
} finally {
Reset ();
}
}
}
开发者ID:holmak,项目名称:NRefactory,代码行数:48,代码来源:driver.cs
示例6: MCSCompiler
public MCSCompiler(string assemblyFileName, ReportPrinter reporter)
{
// Загружаем сборку компилятора
_dmcsAssembly = Assembly.LoadFile(assemblyFileName);
// Пробуем получить тип драйвера компиляции
_driverType = ReflectionUtils.ExtractTypeByName(_dmcsAssembly, "Mono.CSharp.Driver");
// Если не удалось
if (_driverType == null)
{
SuccessfulCreated = false;
throw new ClassDriverNotFoundException(String.Format("В сборке \"{0}\" не найден тип драйвера компиляции", assemblyFileName));
}
SuccessfulCreated = true;
_reporter = reporter;
}
开发者ID:ifanatic,项目名称:CSharpParseTree,代码行数:20,代码来源:MCSCompiler.cs
示例7: ParseFile
public static CompilerCompilationUnit ParseFile(string[] args, Stream input, string inputFile, ReportPrinter reportPrinter)
{
lock (parseLock) {
try {
Driver d = Driver.Create (args, false, null, reportPrinter);
if (d == null)
return null;
Location.AddFile (null, inputFile);
Location.Initialize ();
// TODO: encoding from driver
SeekableStreamReader reader = new SeekableStreamReader (input, Encoding.Default);
CompilerContext ctx = new CompilerContext (new Report (reportPrinter));
RootContext.ToplevelTypes = new ModuleContainer (ctx);
CompilationUnit unit = null;
try {
unit = (CompilationUnit) Location.SourceFiles [0];
} catch (Exception) {
string path = Path.GetFullPath (inputFile);
unit = new CompilationUnit (inputFile, path, 0);
}
CSharpParser parser = new CSharpParser (reader, unit, RootContext.ToplevelTypes);
parser.Lexer.TabSize = 1;
parser.Lexer.sbag = new SpecialsBag ();
parser.LocationsBag = new LocationsBag ();
parser.UsingsBag = new UsingsBag ();
parser.parse ();
return new CompilerCompilationUnit () { ModuleCompiled = RootContext.ToplevelTypes, LocationsBag = parser.LocationsBag, UsingsBag = parser.UsingsBag, SpecialsBag = parser.Lexer.sbag };
} finally {
Reset ();
}
}
}
开发者ID:richardschneider,项目名称:ILSpy,代码行数:37,代码来源:driver.cs
示例8: CompilerContext
public CompilerContext (CompilerSettings settings, ReportPrinter reportPrinter)
{
this.settings = settings;
this.report = new Report (this, reportPrinter);
this.builtin_types = new BuiltinTypes ();
this.TimeReporter = DisabledTimeReporter;
}
开发者ID:KAW0,项目名称:Alter-Native,代码行数:7,代码来源:context.cs
示例9: Merge
//
// Prints collected messages, common messages have a priority
//
public bool Merge (ReportPrinter dest)
{
ArrayList messages_to_print = merged_messages;
if (common_messages != null && common_messages.Count > 0) {
messages_to_print = common_messages;
}
if (messages_to_print == null)
return false;
foreach (AbstractMessage msg in messages_to_print)
dest.Print (msg);
return true;
}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:18,代码来源:report.cs
示例10: SetPrinter
public ReportPrinter SetPrinter (ReportPrinter printer)
{
ReportPrinter old = this.printer;
this.printer = printer;
return old;
}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:6,代码来源:report.cs
示例11: SetPrinter
internal static ReportPrinter SetPrinter (ReportPrinter report_printer)
{
return ctx.Report.SetPrinter (report_printer);
}
开发者ID:silk,项目名称:monodevelop,代码行数:4,代码来源:eval.cs
示例12: Merge
//
// Prints collected messages, common messages have a priority
//
public bool Merge (ReportPrinter dest)
{
var messages_to_print = merged_messages;
if (common_messages != null && common_messages.Count > 0) {
messages_to_print = common_messages;
}
if (messages_to_print == null)
return false;
bool error_msg = false;
foreach (AbstractMessage msg in messages_to_print) {
dest.Print (msg);
error_msg |= !msg.IsWarning;
}
return error_msg;
}
开发者ID:litoMalone,项目名称:mono,代码行数:21,代码来源:report.cs
示例13: Merge
//
// Prints collected messages, common messages have a priority
//
public bool Merge (ReportPrinter dest)
{
var messages_to_print = merged_messages;
if (common_messages != null && common_messages.Count > 0) {
messages_to_print = common_messages;
}
if (messages_to_print == null)
return false;
bool error_msg = false;
foreach (AbstractMessage msg in messages_to_print) {
dest.Print (msg, showFullPaths);
error_msg |= !msg.IsWarning;
}
if (reported_missing_definitions != null) {
foreach (var missing in reported_missing_definitions)
dest.MissingTypeReported (missing);
}
return error_msg;
}
开发者ID:Profit0004,项目名称:mono,代码行数:26,代码来源:report.cs
注:本文中的Mono.CSharp.ReportPrinter类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论