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


C# Framework.CustomBuildEventArgs類代碼示例

本文整理匯總了C#中Microsoft.Build.Framework.CustomBuildEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# CustomBuildEventArgs類的具體用法?C# CustomBuildEventArgs怎麽用?C# CustomBuildEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CustomBuildEventArgs類屬於Microsoft.Build.Framework命名空間,在下文中一共展示了CustomBuildEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CustomEvent

 void CustomEvent(object sender, CustomBuildEventArgs e)
 {
     //Do nothing, really a place holder for sub-classes
 }
開發者ID:JustJenFelice,項目名稱:sayed-samples,代碼行數:4,代碼來源:XmlLogger.cs

示例2: LogCustomEvent

		// Raises a custom event to all registered loggers.
		public void LogCustomEvent (CustomBuildEventArgs e)
		{
			engine.EventSource.FireCustomEventRaised (this, e);
		}
開發者ID:carrie901,項目名稱:mono,代碼行數:5,代碼來源:BuildEngine.cs

示例3: CustomHandler

 /// <summary>
 /// This is the delegate for CustomHandler events.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="buildEvent"></param>
 protected virtual void CustomHandler(object sender, CustomBuildEventArgs buildEvent)
 {
     // NOTE: This may run on a background thread!
     QueueOutputEvent(MessageImportance.High, buildEvent);
 }
開發者ID:ChrisJamesSadler,項目名稱:Cosmos,代碼行數:10,代碼來源:IDEBuildLogger.cs

示例4: LogCustomEvent

 /// <summary>
 /// Raises a custom event to all registered loggers.
 /// </summary>
 /// <param name="e">The event data.</param>
 public void LogCustomEvent(CustomBuildEventArgs e)
 {
     this.context.Information(e.Message);
 }
開發者ID:marcosnz,項目名稱:Cake.MSBuildTask,代碼行數:8,代碼來源:CakeMSBuildEngine.cs

示例5: CustomHandler

		/// <summary>
		/// This is the delegate for CustomHandler events.
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="buildEvent"></param>
		private void CustomHandler(object sender, CustomBuildEventArgs buildEvent)
		{
            try
            {
                LogEvent(sender, buildEvent);
            }
            catch (Exception e)
            {
                Debug.Assert(false, "Problem logging custom event: " + e.Message + " at " + e.TargetSite);
                // swallow the exception
            }
		}
開發者ID:CaptainHayashi,項目名稱:visualfsharp,代碼行數:17,代碼來源:IDEBuildLogger.cs

示例6: MyCustomBuildHandler

 /// <summary>
 /// Log and record the number of custom build events.
 /// </summary>
 internal void MyCustomBuildHandler(object s, CustomBuildEventArgs e)
 {
     _numberOfCustom++;
     _lastCustom = e;
     if (e.Message != null)
     {
         Console.Out.WriteLine("CustomEvent:" + e.Message.ToString());
     }
 }
開發者ID:ChronosWS,項目名稱:msbuild,代碼行數:12,代碼來源:TaskHost_Tests.cs

示例7: LogCustomEvent

 public void LogCustomEvent(CustomBuildEventArgs e)
 {
     _log.LogMessage(e.Message);
 }
開發者ID:dsgouda,項目名稱:buildtools,代碼行數:4,代碼來源:TestBuildEngine.cs

示例8: RaiseCustomEvent

        /// <summary>
        /// Raises a custom event to all registered loggers.
        /// </summary>
        /// <param name="sender">sender of the event</param>
        /// <param name="buildEvent">CustomBuildEventArgs</param>
        /// <exception cref="LoggerException">When EventHandler raises an logger exception the LoggerException is rethrown</exception>
        /// <exception cref="InternalLoggerException">Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException</exception>
        /// <exception cref="Exception">ExceptionHandling.IsCriticalException exceptions will not be wrapped</exception>
        private void RaiseCustomEvent(object sender, CustomBuildEventArgs buildEvent)
        {
            if (CustomEventRaised != null)
            {
                try
                {
                    CustomEventRaised(sender, buildEvent);
                }
                catch (LoggerException)
                {
                    // if a logger has failed politely, abort immediately
                    // first unregister all loggers, since other loggers may receive remaining events in unexpected orderings
                    // if a fellow logger is throwing in an event handler.
                    this.UnregisterAllEventHandlers();
                    throw;
                }
                catch (Exception exception)
                {
                    // first unregister all loggers, since other loggers may receive remaining events in unexpected orderings
                    // if a fellow logger is throwing in an event handler.
                    this.UnregisterAllEventHandlers();

                    if (ExceptionHandling.IsCriticalException(exception))
                    {
                        throw;
                    }

                    InternalLoggerException.Throw(exception, buildEvent, "FatalErrorWhileLogging", false);
                }
            }

            RaiseAnyEvent(sender, buildEvent);
        }
開發者ID:cameron314,項目名稱:msbuild,代碼行數:41,代碼來源:EventSourceSink.cs

示例9: CustomBuildEventRaised

 private void CustomBuildEventRaised(object sender, CustomBuildEventArgs e)
 {
     this.LogMessage("custom", e.Message, MessageImportance.Normal);
 }
開發者ID:hamidshahid,項目名稱:MSBuildExtensionPack,代碼行數:4,代碼來源:XmlFileLogger.cs

示例10: CustomEventHandler

        /// <summary>
        /// Prints a custom event
        /// </summary>
        public void CustomEventHandler(object sender, CustomBuildEventArgs e)
        {
            InitializeBaseConsoleLogger(); // for compat: see DDB#136924

            _consoleLogger.CustomEventHandler(sender, e);
        }
開發者ID:nikson,項目名稱:msbuild,代碼行數:9,代碼來源:ConsoleLogger.cs

示例11: LogCustomEvent

 public virtual void LogCustomEvent(CustomBuildEventArgs e)
 {
   throw new Exception("The method or operation is not implemented.");
 }
開發者ID:mgagne-atman,項目名稱:Projects,代碼行數:4,代碼來源:GenerateMonoRailSiteTreeTaskTests.cs

示例12: LogCustomEvent

 /// <summary>
 /// Allows tasks to raise custom events to all registered loggers.
 /// The build engine may perform some filtering or
 /// pre-processing on the events, before dispatching them.
 /// </summary>
 /// <param name="e">Details of event to raise.</param>
 public void LogCustomEvent(CustomBuildEventArgs e)
 {
     OnLogBuildEvent(e);
 }
開發者ID:CommonBuildToolset,項目名稱:CBT.Modules,代碼行數:10,代碼來源:CBTBuildEngine.cs

示例13: CustomEventHandler

 /// <summary>
 /// Prints a custom event
 /// </summary>
 public override void CustomEventHandler(object sender, CustomBuildEventArgs e)
 {
     // if verbosity is detailed or diagnostic
     if (IsVerbosityAtLeast(LoggerVerbosity.Detailed))
     {
         // ignore custom events with null messages -- some other
         // logger will handle them appropriately
         if (e.Message != null)
         {
             ShowDeferredMessages();
             WriteLinePretty(e.Message);
         }
     }
 }
開發者ID:cameron314,項目名稱:msbuild,代碼行數:17,代碼來源:SerialConsoleLogger.cs

示例14: LogCustomEvent

 /// <summary>
 /// Unused.
 /// </summary>
 public void LogCustomEvent(CustomBuildEventArgs e)
 {
     throw new NotImplementedException();
 }
開發者ID:cameron314,項目名稱:msbuild,代碼行數:7,代碼來源:TaskExecutionHost_Tests.cs

示例15: LogCustomEvent

		public void LogCustomEvent (CustomBuildEventArgs e)
		{
			event_source.FireCustomEventRaised (this, e);
		}
開發者ID:nlhepler,項目名稱:mono,代碼行數:4,代碼來源:BuildEngine4.cs


注:本文中的Microsoft.Build.Framework.CustomBuildEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。