當前位置: 首頁>>代碼示例>>C#>>正文


C# CSharp.ReportPrinter類代碼示例

本文整理匯總了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;未經允許,請勿轉載。