当前位置: 首页>>代码示例>>C#>>正文


C# MessageImportance类代码示例

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


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

示例1: LogEventsFromTextOutput

 /// <summary>
 /// Parses a single line of text to identify any errors or warnings in canonical format.
 /// </summary>
 /// <param name="singleLine">A single line of text for the method to parse.</param><param name="messageImportance">A value of <see cref="T:Microsoft.Build.Framework.MessageImportance"/> that indicates the importance level with which to log the message.</param>
 protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance)
 {
     if (!string.IsNullOrEmpty(singleLine))
     {
         base.LogEventsFromTextOutput(singleLine, messageImportance);
     }
 }
开发者ID:Xtremrules,项目名称:dot42,代码行数:11,代码来源:AdbToolTask.cs

示例2: LogEventsFromTextOutput

        protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance)
        {
            if (singleLine.StartsWith("Successfully created package"))
            {
                var outputPackage = singleLine.Split('\'').Skip(1).First();
                var outputPackageItem = new TaskItem(outputPackage);
                if (outputPackage.EndsWith(".symbols.nupkg", StringComparison.OrdinalIgnoreCase))
                {
                    OutputSymbolsPackage = new[] { outputPackageItem };
                }
                else
                {
                    OutputPackage = new[] { outputPackageItem };
                }
            }

            if (messageImportance == MessageImportance.High)
            {
                Log.LogError(singleLine);
                return;
            }

            if (singleLine.StartsWith("Issue:") || singleLine.StartsWith("Description:") || singleLine.StartsWith("Solution:"))
            {
                Log.LogWarning(singleLine);
                return;
            }

            base.LogEventsFromTextOutput(singleLine, messageImportance);
        }
开发者ID:kovalikp,项目名称:nuproj,代码行数:30,代码来源:NuGetPack.cs

示例3: LogCommentFromText

 /// <summary>
 /// Log a comment
 /// </summary>
 /// <param name="buildEventContext">Event context information which describes who is logging the event</param>
 /// <param name="importance">How important is the message, this will determine which verbosities the message will show up on. 
 /// The higher the importance the lower the verbosity needs to be for the message to be seen</param>
 /// <param name="message">Message to log</param>
 /// <exception cref="InternalErrorException">BuildEventContext is null</exception>
 /// <exception cref="InternalErrorException">Message is null</exception>
 public void LogCommentFromText(BuildEventContext buildEventContext, MessageImportance importance, string message)
 {
     lock (_lockObject)
     {
         this.LogCommentFromText(buildEventContext, importance, message, null);
     }
 }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:16,代码来源:LoggingServiceLogMethods.cs

示例4: HandleMessage

 /// <summary>
 /// Handle a raised message. 
 /// </summary>
 /// <param name="message">
 /// The message.
 /// </param>
 /// <param name="importance">
 /// The importance.
 /// </param>
 public void HandleMessage(string message, MessageImportance importance = MessageImportance.Normal)
 {
     if (this.OutputMessage(importance))
     {
         NotificationWriter.Write(message);
     }
 }
开发者ID:Erls-Corporation,项目名称:Git-Source-Control-Provider,代码行数:16,代码来源:BuildNotificationLogger.cs

示例5: LogMessage

 protected void LogMessage(string message, MessageImportance importance = MessageImportance.High)
 {
     if (BuildEngine != null)
     {
         BuildEngine.LogMessageEvent(new BuildMessageEventArgs("CrmCross: " + message, "CrmCross", "CrmCross", importance));
     }
 }
开发者ID:syncromatics,项目名称:Xamarin.TestyDroid,代码行数:7,代码来源:AbstractTask.cs

示例6: BuildMessageEventArgs

 public BuildMessageEventArgs(string message,
     string helpKeyword,
     string senderName,
     MessageImportance importance)
     : base(message, helpKeyword, senderName)
 {
     this.importance = importance;
 }
开发者ID:Jedzia,项目名称:BackBock,代码行数:8,代码来源:BuildMessageEventArgs.cs

示例7: LogItemMetadata

 private static void LogItemMetadata(Task task, ITaskItem item, MessageImportance importance)
 {
     var metadata = item.CloneCustomMetadata();
     foreach (var name in metadata.Keys.Cast<string>())
     {
         LogMetadata(task, name, (string)metadata[name], importance);
     }
 }
开发者ID:JayBazuzi,项目名称:MSBuildTaskParameterLogger,代码行数:8,代码来源:LoggingTaskExtensions.cs

示例8: TaskCommandLineEventArgs

		public TaskCommandLineEventArgs (string commandLine,
						 string taskName,
						 MessageImportance importance)
			: base (commandLine, null, null, importance)
		{
			this.taskName = taskName;
			this.commandLine = commandLine;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:8,代码来源:TaskCommandLineEventArgs.cs

示例9: OutputEventArgs

        /// <summary>
        /// Initializes a new instance of the OutputEventArgs class.
        /// </summary>
        /// <param name="text">The output text.</param>
        /// <param name="importance">The level of importance for this output event.</param>
        public OutputEventArgs(string text, MessageImportance importance)
        {
            Param.RequireNotNull(text, "text");
            Param.Ignore(importance);

            this.Output = text;
            this.Importance = importance;
        }
开发者ID:jonthegiant,项目名称:StyleCop,代码行数:13,代码来源:OutputEventArgs.cs

示例10: LogEventsFromTextOutput

        /// <summary>
        /// Parses a single line of text to identify any errors or warnings in canonical format.
        /// </summary>
        /// <param name="singleLine">A single line of text for the method to parse.</param>
        /// <param name="messageImportance">A value of <see cref="T:Microsoft.Build.Framework.MessageImportance"/> that indicates the importance level with which to log the message.</param>
        protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance)
        {
            bool isError = messageImportance == StandardErrorLoggingImportance;

            if (isError)
                base.LogEventsFromTextOutput(singleLine, messageImportance);
            else
                CommitHash = singleLine.Trim();
        }
开发者ID:kajanthan19,项目名称:TestProject,代码行数:14,代码来源:GitVersion.cs

示例11: LogInputs

        public static void LogInputs(this Task task, MessageImportance importance)
        {
            task.Log.LogMessage(importance, "Inputs:");

            foreach (var propertyInfo in GetInputProperties(task))
            {
                LogProperty(propertyInfo, importance, task);
            }
        }
开发者ID:JayBazuzi,项目名称:MSBuildTaskParameterLogger,代码行数:9,代码来源:LoggingTaskExtensions.cs

示例12: LogTaskItems

        private static void LogTaskItems(ITaskItem[] taskItems, string itemGroup, MessageImportance importance, Task task)
        {
            task.Log.LogMessage(importance, "  {0} =", itemGroup);

            foreach (var item in taskItems)
            {
                LogTaskItem(task, item, importance);
            }
        }
开发者ID:JayBazuzi,项目名称:MSBuildTaskParameterLogger,代码行数:9,代码来源:LoggingTaskExtensions.cs

示例13: LogEventsFromTextOutput

        protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance)
        {
            if ((Set == null || Set.Length == 0) && !String.IsNullOrWhiteSpace(singleLine) && !singleLine.StartsWith("WARNING", StringComparison.OrdinalIgnoreCase))
            {
                Value = singleLine;
            }

            base.LogEventsFromTextOutput(singleLine, messageImportance);
        }
开发者ID:CommonBuildToolset,项目名称:CBT.Modules,代码行数:9,代码来源:NuGetConfig.cs

示例14: LogEventsFromTextOutput

		/// <summary>
		/// Parse the output of the console and gets the Branch or Tag.
		/// </summary>
		/// <param name="singleLine">the line being parsed</param>
		/// <param name="messageImportance">message importance</param>
		protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance)
		{
			bool isError = messageImportance == StandardErrorLoggingImportance;

			if (isError)
				base.LogEventsFromTextOutput(singleLine, messageImportance);
			else if (IsBranchStatusLine(singleLine))
				Branch = ParseStatusLineOutput(singleLine);
		}
开发者ID:464884492,项目名称:msbuildtasks,代码行数:14,代码来源:GitBranch.cs

示例15: ConcurrentLoggingHelper

		public ConcurrentLoggingHelper (TaskLoggingHelper taskLog,
						StreamReader messageStream,
						MessageImportance messageImportance)
		{
			this.taskLog = taskLog;
			this.messageStream = messageStream;
			this.messageImportance = messageImportance;
			this.hasLoggedErrors = false;
		}
开发者ID:Profit0004,项目名称:mono,代码行数:9,代码来源:ConcurrentLoggingHelper.cs


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