• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Framework.BuildFinishedEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Microsoft.Build.Framework.BuildFinishedEventArgs的典型用法代码示例。如果您正苦于以下问题:C# BuildFinishedEventArgs类的具体用法?C# BuildFinishedEventArgs怎么用?C# BuildFinishedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BuildFinishedEventArgs类属于Microsoft.Build.Framework命名空间,在下文中一共展示了BuildFinishedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: VerifyEventType

        public void VerifyEventType()
        {
            BuildFinishedEventArgs buildFinished = new BuildFinishedEventArgs("Message", "Keyword", true);
            BuildStartedEventArgs buildStarted = new BuildStartedEventArgs("Message", "Help");
            BuildMessageEventArgs lowMessage = new BuildMessageEventArgs("Message", "help", "sender", MessageImportance.Low);
            TaskStartedEventArgs taskStarted = new TaskStartedEventArgs("message", "help", "projectFile", "taskFile", "taskName");
            TaskFinishedEventArgs taskFinished = new TaskFinishedEventArgs("message", "help", "projectFile", "taskFile", "taskName", true);
            TaskCommandLineEventArgs commandLine = new TaskCommandLineEventArgs("commandLine", "taskName", MessageImportance.Low);
            BuildWarningEventArgs warning = new BuildWarningEventArgs("SubCategoryForSchemaValidationErrors", "MSB4000", "file", 1, 2, 3, 4, "message", "help", "sender");
            BuildErrorEventArgs error = new BuildErrorEventArgs("SubCategoryForSchemaValidationErrors", "MSB4000", "file", 1, 2, 3, 4, "message", "help", "sender");
            TargetStartedEventArgs targetStarted = new TargetStartedEventArgs("message", "help", "targetName", "ProjectFile", "targetFile");
            TargetFinishedEventArgs targetFinished = new TargetFinishedEventArgs("message", "help", "targetName", "ProjectFile", "targetFile", true);
            ProjectStartedEventArgs projectStarted = new ProjectStartedEventArgs(-1, "message", "help", "ProjectFile", "targetNames", null, null, null);
            ProjectFinishedEventArgs projectFinished = new ProjectFinishedEventArgs("message", "help", "ProjectFile", true);
            ExternalProjectStartedEventArgs externalStartedEvent = new ExternalProjectStartedEventArgs("message", "help", "senderName", "projectFile", "targetNames");

            VerifyLoggingPacket(buildFinished, LoggingEventType.BuildFinishedEvent);
            VerifyLoggingPacket(buildStarted, LoggingEventType.BuildStartedEvent);
            VerifyLoggingPacket(lowMessage, LoggingEventType.BuildMessageEvent);
            VerifyLoggingPacket(taskStarted, LoggingEventType.TaskStartedEvent);
            VerifyLoggingPacket(taskFinished, LoggingEventType.TaskFinishedEvent);
            VerifyLoggingPacket(commandLine, LoggingEventType.TaskCommandLineEvent);
            VerifyLoggingPacket(warning, LoggingEventType.BuildWarningEvent);
            VerifyLoggingPacket(error, LoggingEventType.BuildErrorEvent);
            VerifyLoggingPacket(targetStarted, LoggingEventType.TargetStartedEvent);
            VerifyLoggingPacket(targetFinished, LoggingEventType.TargetFinishedEvent);
            VerifyLoggingPacket(projectStarted, LoggingEventType.ProjectStartedEvent);
            VerifyLoggingPacket(projectFinished, LoggingEventType.ProjectFinishedEvent);
            VerifyLoggingPacket(externalStartedEvent, LoggingEventType.CustomEvent);
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:30,代码来源:NodePackets_Tests.cs


示例2: BuildFinishedHandler

 void BuildFinishedHandler(object sender, BuildFinishedEventArgs e)
 {
     // Console.Write in the context of a unit test is very expensive.  A hundred
     // calls to Console.Write can easily take two seconds on a fast machine.  Therefore, only
     // do the Console.Write once at the end of the build.
     Console.Write(fullLog);
 }
开发者ID:nikson,项目名称:msbuild,代码行数:7,代码来源:ProjectIdLogger.cs


示例3: FileLoggerBuildFinished

 private void FileLoggerBuildFinished(object sender, BuildFinishedEventArgs e)
 {
     if (_fileWriter != null)
     {
         _fileWriter.Flush();
     }
 }
开发者ID:nikson,项目名称:msbuild,代码行数:7,代码来源:FileLogger.cs


示例4: BuildFinishedEventHandler

        /// <summary>
        /// Handles the BuildFinished event.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="BuildFinishedEventArgs" /> instance containing the event data.</param>
        private void BuildFinishedEventHandler(object sender, BuildFinishedEventArgs e)
        {
            Log("Warning", "Project", "File", "Line", "Column", "Message");

            foreach (var warning in _warnings.OrderBy(w => w.Code))
            {
                Log(warning.Code, warning.ProjectFile, warning.File, warning.LineNumber.ToString(), warning.ColumnNumber.ToString(), warning.Message);
            }
        }
开发者ID:codehulknet,项目名称:test,代码行数:14,代码来源:CSVWarningsLogger.cs


示例5: BuildFinished

        private void BuildFinished(object sender, BuildFinishedEventArgs e)
        {
            this.handler(this, this.errors == 0 ? new ValEventArgs(e.Message, this.indent, Helper.MessageType.Success) : new ValEventArgs(e.Message, this.indent, Helper.MessageType.Error));

            this.handler(this, new ValEventArgs(string.Format(CultureInfo.InvariantCulture, "{0} Warning(s) ", this.warnings), this.indent));
            this.handler(this, new ValEventArgs(string.Format(CultureInfo.InvariantCulture, "{0} Error(s) ", this.errors) + Environment.NewLine + Environment.NewLine, this.indent));

            TimeSpan s = DateTime.UtcNow - this.startTime;
            this.handler(this, new ValEventArgs(string.Format(CultureInfo.InvariantCulture, "Time Elapsed {0}", s), this.indent));
        }
开发者ID:nagyist,项目名称:MSBuildExplorer,代码行数:10,代码来源:MSBuildExplorerLogger.cs


示例6: EventArgsCtors

 public void EventArgsCtors()
 {
     BuildFinishedEventArgs buildFinishedEvent = new BuildFinishedEventArgs2();
     buildFinishedEvent = new BuildFinishedEventArgs("Message", "HelpKeyword", true);
     buildFinishedEvent = new BuildFinishedEventArgs("Message", "HelpKeyword", true, new DateTime());
     buildFinishedEvent = new BuildFinishedEventArgs("{0}", "HelpKeyword", true, new DateTime(), "Message");
     buildFinishedEvent = new BuildFinishedEventArgs(null, null, true);
     buildFinishedEvent = new BuildFinishedEventArgs(null, null, true, new DateTime());
     buildFinishedEvent = new BuildFinishedEventArgs(null, null, true, new DateTime(), null);
 }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:10,代码来源:BuildFinishedEventArgs_Tests.cs


示例7: HandleBuildFinished

 private void HandleBuildFinished(object sender, BuildFinishedEventArgs e)
 {
     if (e.Succeeded)
     {
         Console.WriteLine("Build succeeded. Warnings:{0}", m_warningCount);
     }
     else
     {
         Console.WriteLine("Build failed. Errors:{0} Warnings:{1}", m_errorCount, m_warningCount);
     }
 }
开发者ID:aggsol,项目名称:Unity3DBuild,代码行数:11,代码来源:LoggerImpl.cs


示例8: AssignmentTest

		public void AssignmentTest ()
		{
			BuildFinishedEventArgs bfea;
			string message = "message";
			string helpKeyword = "helpKeyword";
			bool succeeded = true;
			
			bfea = new BuildFinishedEventArgs (message, helpKeyword, succeeded);
			
			Assert.AreEqual (message, bfea.Message, "Message");
			Assert.AreEqual (helpKeyword, bfea.HelpKeyword, "HelpKeyword");
			Assert.AreEqual (succeeded, bfea.Succeeded, "Succeeded");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:BuildFinishedEventArgsTest.cs


示例9: BuildFinishedEventHandler

        /// <summary>
        /// Handles the BuildFinished event.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="BuildFinishedEventArgs"/> instance containing the event data.</param>
        private void BuildFinishedEventHandler(object sender, BuildFinishedEventArgs e)
        {
            foreach (var category in _categories)
            {
                foreach (var warning in category.Value.OrderBy(w => w.Code))
                {
                    Console.ForegroundColor = category.Key.Color;
                    Console.WriteLine("\n[{4}] {0} ({1},{2}): {3}", Path.Combine(Path.GetDirectoryName(warning.ProjectFile), warning.File ?? string.Empty), warning.LineNumber, warning.ColumnNumber, warning.Message, warning.Code);
                    Console.ResetColor();
                }
            }

            foreach (var warning in _warnings.OrderBy(w => w.Code))
            {
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("\n[{4}] {0} ({1},{2}): {3}", Path.Combine(Path.GetDirectoryName(warning.ProjectFile), warning.File ?? string.Empty), warning.LineNumber, warning.ColumnNumber, warning.Message, warning.Code);
                Console.ResetColor();
            }

            foreach (var error in _errors)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("\n[{4}] {0} ({1},{2}): {3}", Path.Combine(Path.GetDirectoryName(error.ProjectFile), error.File ?? string.Empty), error.LineNumber, error.ColumnNumber, error.Message, error.Code);
                Console.ResetColor();
            }

            Console.WriteLine();

            if (_categories.Count > 0)
            {
                foreach (var category in _categories)
                {
                    Console.ForegroundColor = category.Key.Color;
                    Console.Write("   {0} categorized warnings", category.Value.Count);
                    Console.WriteLine(!string.IsNullOrWhiteSpace(category.Key.Description) ? string.Format(" ({0})", category.Key.Description) : string.Empty);
                    Console.ResetColor();
                }
            }

            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("   {0} warnings", _warnings.Count);
            Console.ResetColor();

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("   {0} errors\n", _errors.Count);
            Console.ResetColor();

            var buildFinishedTimeStamp = DateTime.Now;
            var timeSpan = buildFinishedTimeStamp - _buildStartedTimeStamp;
            Console.WriteLine("   Build finished at {0} in {1}.", buildFinishedTimeStamp, string.Format("{0:m\\:ss} minutes", timeSpan));
        }
开发者ID:codehulknet,项目名称:test,代码行数:56,代码来源:MinimalConsoleLogger.cs


示例10: BuildFinishedHandler

        /// <summary>
        /// This is the delegate for BuildFinishedHandler events.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="buildEvent"></param>
        protected override void BuildFinishedHandler(object sender, BuildFinishedEventArgs buildEvent)
        {
            base.BuildFinishedHandler(sender, buildEvent);

            var msg =
                (BuildTargetName ?? "Build") +
                (buildEvent.Succeeded ? " succeeded -- " : " failed -- ") +
                (!buildEvent.Succeeded ? TaskCount(TaskErrorCategory.Error) + " errors, " : "") +
                (TaskCount(TaskErrorCategory.Warning) + " warnings. ") +
                ("Build took: " + _timer.Elapsed + ".") +
                Environment.NewLine;

            QueueOutputEvent(MessageImportance.High, new BuildFinishedEventArgs(msg, string.Empty, buildEvent.Succeeded));
        }
开发者ID:89sos98,项目名称:nemerle,代码行数:19,代码来源:NemerleIdeBuildLogger.cs


示例11: BuildFinished

 void BuildFinished(object sender, BuildFinishedEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.White;
     if (e.Succeeded)
     {
         Console.ForegroundColor = ConsoleColor.DarkGreen;
         Console.WriteLine("Compilation SUCCEEDED! Errors:{0} Warnings:{1}",ErrorCount,WarningCount);
     }
     else
     {
         Console.ForegroundColor = ConsoleColor.DarkRed;
         Console.WriteLine("Compilation FAILED! Errors:{0} Warnings:{1}",ErrorCount,WarningCount);
     }
     Console.BackgroundColor = ConsoleColor.Black;
 }
开发者ID:fredpointzero,项目名称:UnityBuild,代码行数:15,代码来源:LoggerImpl.cs


示例12: CompleteBuild

        /// <summary>
        /// Completes the build and writes to the XML log file.
        /// </summary>
        /// <param name="buildFinishedEventArgs">The <see cref="BuildFinishedEventArgs"/> instance containing the event data.</param>
        /// <param name="logFile">The XML log file.</param>
        public void CompleteBuild(BuildFinishedEventArgs buildFinishedEventArgs, string logFile, int errorCount, int warningCount)
        {
            EndTime = buildFinishedEventArgs.Timestamp;
            var document = new XDocument();
            var root = new XElement("Build",
                new XAttribute("BuildSucceeded", buildFinishedEventArgs.Succeeded),
                new XAttribute("StartTime", StartTime),
                new XAttribute("EndTime", EndTime),
                new XAttribute("Errors", errorCount),
                new XAttribute("Warnings", warningCount));

            document.Add(root);
            SaveToElement(root);

            document.Save(logFile);
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:21,代码来源:Build.cs


示例13: BuildFinished

 void BuildFinished(object sender, BuildFinishedEventArgs e)
 {
     _stopwatch.Stop();
     Console.WriteLine();
     Console.WriteLine();
     Console.WriteLine("Compilation done in {0}ms.", _stopwatch.ElapsedMilliseconds);
     Console.WriteLine();
     Console.ForegroundColor = ConsoleColor.White;
     if (e.Succeeded)
     {
         Console.BackgroundColor = ConsoleColor.DarkGreen;
         Console.WriteLine("Compilation SUCCEEDED.");
     }
     else
     {
         Console.BackgroundColor = ConsoleColor.DarkRed;
         Console.WriteLine("Compilation FAILED!.");
     }
     Console.BackgroundColor = ConsoleColor.Black;
 }
开发者ID:wpoch,项目名称:SublimeLogger,代码行数:20,代码来源:LoggerImpl.cs


示例14: BuildFinishedHandler

 /// <summary>
 /// This is the delegate for BuildFinishedHandler events.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="buildEvent"></param>
 private void BuildFinishedHandler(object sender, BuildFinishedEventArgs buildEvent)
 {
     if (LogAtImportance(buildEvent.Succeeded ? MessageImportance.Low :
                                                MessageImportance.High))
     {
         if (this.outputWindowPane != null)
             this.outputWindowPane.OutputStringThreadSafe(Environment.NewLine);
         LogEvent(sender, buildEvent);
     }
 }
开发者ID:Jeremiahf,项目名称:wix3,代码行数:15,代码来源:idebuildlogger.cs


示例15: ForwardEvents

        public void ForwardEvents()
        {
            BuildStartedEventArgs buildStarted = new BuildStartedEventArgs("Message", "Help");
            BuildFinishedEventArgs buildFinished = new BuildFinishedEventArgs("Message", "Keyword", true);
            BuildMessageEventArgs normalMessage = new BuildMessageEventArgs("Message2", "help", "sender", MessageImportance.Normal);

            EventSourceSink loggerSource = AttachForwardingLoggerAndRedirector(buildStarted);
            loggerSource.Consume(buildStarted);

            loggerSource = AttachForwardingLoggerAndRedirector(buildFinished);
            loggerSource.Consume(buildFinished);

            loggerSource = AttachForwardingLoggerAndRedirector(normalMessage);
            loggerSource.Consume(normalMessage);
        }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:15,代码来源:CentralForwardingLogger_Tests.cs


示例16: BuildFinished

        private void BuildFinished(object sender, BuildFinishedEventArgs e)
        {
            this.WriteLine(e.Message);
            this.WriteLine(string.Format(CultureInfo.InvariantCulture, "{0} Warning(s) ", this.warnings));
            this.WriteLine(string.Format(CultureInfo.InvariantCulture, "{0} Error(s) ", this.errors) + Environment.NewLine + Environment.NewLine);

            TimeSpan s = DateTime.UtcNow - this.startTime;
            this.WriteLine(string.Format(CultureInfo.InvariantCulture, "Time Elapsed {0}", s));
        }
开发者ID:simondmorias,项目名称:MSBuildExtensionPack,代码行数:9,代码来源:SecureFileLogger.cs


示例17: TestLoggingEventCustomerSerialization

        public void TestLoggingEventCustomerSerialization()
        {
            Hashtable loggingTypeCacheWrites = new Hashtable();
            stream.Position = 0;
            BuildEventContext context = new BuildEventContext(1,3,5,7);
            GenericBuildEventArg genericBuildEvent = new GenericBuildEventArg("Message","Help","Sender");
            genericBuildEvent.BuildEventContext = context;
            NodeLoggingEvent genericBuildEventLoggingEvent = new NodeLoggingEvent(genericBuildEvent);
            genericBuildEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            GenericCustomBuildEventArg genericCustomEvent = new GenericCustomBuildEventArg("FooFighter");
            genericCustomEvent.BuildEventContext = context;
            NodeLoggingEvent genericCustomEventLoggingEvent = new NodeLoggingEvent(genericCustomEvent);
            genericCustomEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            BuildErrorEventArgs errorEvent = new BuildErrorEventArgs("Subcategory", "Code", "File", 1, 2, 3, 4, "Message", "HelpKeyword", "SenderName");
            errorEvent.BuildEventContext = context;
            NodeLoggingEvent errorEventLoggingEvent = new NodeLoggingEvent(errorEvent);
            errorEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            BuildMessageEventArgs messageEvent = new BuildMessageEventArgs("Message", "HelpKeyword", "SenderName",MessageImportance.High);
            messageEvent.BuildEventContext = context;
            NodeLoggingEvent messageEventLoggingEvent = new NodeLoggingEvent(messageEvent);
            messageEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            BuildWarningEventArgs warningEvent = new BuildWarningEventArgs("Subcategory", "Code", "File", 1, 2, 3, 4, "Message", "HelpKeyword", "SenderName");
            warningEvent.BuildEventContext = context;
            NodeLoggingEvent warningEventLoggingEvent = new NodeLoggingEvent(warningEvent);
            warningEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            ProjectStartedEventArgs projectStartedEvent = new ProjectStartedEventArgs( 8,"Message", "HelpKeyword", "ProjectFile", "TargetNames", null, null, new BuildEventContext(7,8,9,10));
            projectStartedEvent.BuildEventContext = context;
            NodeLoggingEvent projectStartedEventLoggingEvent = new NodeLoggingEvent(projectStartedEvent);
            projectStartedEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            ProjectFinishedEventArgs projectFinishedEvent = new ProjectFinishedEventArgs("Message", "HelpKeyword","ProjectFile",true);
            projectFinishedEvent.BuildEventContext = context;
            NodeLoggingEvent projectFinishedEventLoggingEvent = new NodeLoggingEvent(projectFinishedEvent);
            projectFinishedEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            TargetStartedEventArgs targetStartedEvent = new TargetStartedEventArgs("Message", "HelpKeyword", "TargetName", "ProjectFile", "TargetFile");
            targetStartedEvent.BuildEventContext = context;
            NodeLoggingEvent targetStartedEventLoggingEvent = new NodeLoggingEvent(targetStartedEvent);
            targetStartedEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            TargetFinishedEventArgs targetFinished = new TargetFinishedEventArgs("Message", "HelpKeyword","TargetName", "ProjectFile", "TargetFile", true);
            targetFinished.BuildEventContext = context;
            NodeLoggingEvent targetFinishedEventLoggingEvent = new NodeLoggingEvent(targetFinished);
            targetFinishedEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            TaskStartedEventArgs taskStartedEvent = new TaskStartedEventArgs("Message", "HelpKeyword", "ProjectFile", "TaskFile", "TaskName");
            taskStartedEvent.BuildEventContext = context;
            NodeLoggingEvent taskStartedEventLoggingEvent = new NodeLoggingEvent(taskStartedEvent);
            taskStartedEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            TaskFinishedEventArgs taskFinishedEvent = new TaskFinishedEventArgs("Message", "HelpKeyword", "ProjectFile", "TaskFile", "TaskName", true);
            taskFinishedEvent.BuildEventContext = context;
            NodeLoggingEvent taskFinishedEventLoggingEvent = new NodeLoggingEvent(taskFinishedEvent);
            taskFinishedEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            BuildFinishedEventArgs buildFinishedEvent = new BuildFinishedEventArgs("Message","Help",true);
            buildFinishedEvent.BuildEventContext = context;
            NodeLoggingEvent buildFinishedEventEventLoggingEvent = new NodeLoggingEvent(buildFinishedEvent);
            buildFinishedEventEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            BuildStartedEventArgs buildStartedEvent = new BuildStartedEventArgs("Message","Help");
            buildStartedEvent.BuildEventContext = context;
            NodeLoggingEvent buildStartedEventLoggingEvent = new NodeLoggingEvent(buildStartedEvent);
            buildStartedEventLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            TaskCommandLineEventArgs commandlineEventArg = new TaskCommandLineEventArgs("CommandLine","TaskName", MessageImportance.High);
            commandlineEventArg.BuildEventContext = context;
            NodeLoggingEvent commandlineEventArgLoggingEvent = new NodeLoggingEvent(commandlineEventArg);
            commandlineEventArgLoggingEvent.WriteToStream(writer, loggingTypeCacheWrites);

            Hashtable loggingTypeCacheReads = new Hashtable();
            long streamWriteEndPosition = stream.Position;
            stream.Position = 0;

            NodeLoggingEvent nodeLoggingEvent = new NodeLoggingEvent(null);
            nodeLoggingEvent.CreateFromStream(reader, loggingTypeCacheReads);
            Assert.IsTrue(nodeLoggingEvent.BuildEvent.GetType() == typeof(GenericBuildEventArg));

            nodeLoggingEvent = new NodeLoggingEvent(null);
            nodeLoggingEvent.CreateFromStream(reader, loggingTypeCacheReads);
            Assert.IsTrue(nodeLoggingEvent.BuildEvent.GetType() == typeof(GenericCustomBuildEventArg));

            nodeLoggingEvent = new NodeLoggingEvent(null);
            nodeLoggingEvent.CreateFromStream(reader, loggingTypeCacheReads);
            Assert.IsTrue(nodeLoggingEvent.BuildEvent.GetType() == typeof(BuildErrorEventArgs));

            nodeLoggingEvent = new NodeLoggingEvent(null);
            nodeLoggingEvent.CreateFromStream(reader, loggingTypeCacheReads);
            Assert.IsTrue(nodeLoggingEvent.BuildEvent.GetType() == typeof(BuildMessageEventArgs));

            nodeLoggingEvent = new NodeLoggingEvent(null);
            nodeLoggingEvent.CreateFromStream(reader, loggingTypeCacheReads);
            Assert.IsTrue(nodeLoggingEvent.BuildEvent.GetType() == typeof(BuildWarningEventArgs));

            nodeLoggingEvent = new NodeLoggingEvent(null);
//.........这里部分代码省略.........
开发者ID:nikson,项目名称:msbuild,代码行数:101,代码来源:NodeLoggingEventTests.cs


示例18: HandleBuildFinished

		void HandleBuildFinished (object sender, BuildFinishedEventArgs args)
		{
			base.WriteHandler = null;
			if (sw != null) {
				sw.Close ();
				sw = null;
			}
		}
开发者ID:nlhepler,项目名称:mono,代码行数:8,代码来源:FileLogger.cs


示例19: BuildFinishedHandler

		/// <summary>
		/// This is the delegate for BuildFinishedHandler events.
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="buildEvent"></param>
		private void BuildFinishedHandler(object sender, BuildFinishedEventArgs buildEvent)
		{
            try
            {
                if (LogAtImportance(buildEvent.Succeeded ? MessageImportance.Low :
                                                           MessageImportance.High))
                {
                    if (this.outputWindowPane != null)
                        Output(Environment.NewLine);
                    LogEvent(sender, buildEvent);
                }
                // BRIANMCN:
                // There are two reasons to call UIThread.Run.  
                // The obvious one is when you have to call IVsBlahBlah that must be accessed on the UI thread.  
                // That’s not the case here, here it’s for the less obvious reason that, whereas all the events 
                // happening in this class (that happen on the MSBuild logger thread) have a chronological 
                // ordering, most of those events transfer to the UIThread via UIThread.Run, and so we need to 
                // preserve the ordering.
                UIThread.Run(delegate()
                    {
                        taskReporter.OutputTaskList();
                    });
            }
            catch (Exception e)
            {
                Debug.Assert(false, "Problem logging buildfinished event: " + e.Message + " at " + e.TargetSite);
                // swallow the exception
            }
		}
开发者ID:CaptainHayashi,项目名称:visualfsharp,代码行数:34,代码来源:IDEBuildLogger.cs


示例20: eventSource_BuildFinishedHandler

		private void eventSource_BuildFinishedHandler(object sender, BuildFinishedEventArgs e)
		{
			LogStageFinished(e.Succeeded, e.Timestamp);
		}
开发者ID:jlewin,项目名称:Kobush.Build,代码行数:4,代码来源:XmlLogger.cs



注:本文中的Microsoft.Build.Framework.BuildFinishedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Framework.BuildMessageEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Framework.BuildEventContext类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap