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

C# Framework.BuildEventContext类代码示例

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

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



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

示例1:

        /// <summary>
        /// Creates an instance of this class for the specified task.
        /// </summary>
        public TaskEngine
        (
            XmlElement taskNodeXmlElement,
            ITaskHost hostObject,
            string projectFileOfTaskNode,
            string parentProjectFullFileName,
            EngineLoggingServices loggingServices,
            int handleId,
            TaskExecutionModule parentModule,
            BuildEventContext targetBuildEventContext
        )
        {
            ErrorUtilities.VerifyThrow(taskNodeXmlElement != null, "Need to specify the task node.");
            ErrorUtilities.VerifyThrow(projectFileOfTaskNode != null, "Need to specify path of project.");
            ErrorUtilities.VerifyThrow(parentProjectFullFileName != null, "Need to specify name of project.");
            ErrorUtilities.VerifyThrow(loggingServices != null, "Need to specify the node logger.");

            this.taskNode = taskNodeXmlElement;
            this.taskClass = null;
            this.hostObject = hostObject;
            this.projectFileOfTaskNode = projectFileOfTaskNode;
            this.parentProjectFullFileName = parentProjectFullFileName;
            this.loggingServices = loggingServices;
            this.handleId = handleId;
            this.parentModule = parentModule;
            this.continueOnError = false;
            this.conditionAttribute = taskNode.Attributes[XMakeAttributes.condition];
            this.buildEventContext = targetBuildEventContext;
        }
开发者ID:nikson,项目名称:msbuild,代码行数:32,代码来源:TaskEngine.cs


示例2:

        /// <summary>
        /// The constructor obtains the state information and the
        /// callback delegate.
        /// </summary>
        internal TaskExecutionState
        (
            TaskExecutionMode howToExecuteTask,
            Lookup lookupForInference,
            Lookup lookupForExecution,
            XmlElement taskXmlNode,
            ITaskHost hostObject,
            string projectFileOfTaskNode,
            string parentProjectFullFileName,
            string executionDirectory,
            int handleId,
            BuildEventContext buildEventContext
        )
        {
            ErrorUtilities.VerifyThrow(taskXmlNode != null, "Must have task node");

            this.howToExecuteTask = howToExecuteTask;
            this.lookupForInference = lookupForInference;
            this.lookupForExecution = lookupForExecution;
            this.hostObject = hostObject;
            this.projectFileOfTaskNode = projectFileOfTaskNode;
            this.parentProjectFullFileName = parentProjectFullFileName;
            this.executionDirectory = executionDirectory;
            this.handleId = handleId;
            this.buildEventContext = buildEventContext;
            this.taskXmlNode = taskXmlNode;
        }
开发者ID:nikson,项目名称:msbuild,代码行数:31,代码来源:TaskExecutionState.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:

        internal TargetExecutionWrapper
        (
            Target targetClass,
            ArrayList taskElementList,
            List<string> targetParameters,
            XmlElement targetElement,
            Expander expander,
            BuildEventContext targetBuildEventContext
        )
        {
            // Initialize the data about the target XML that has been calculated in the target class
            this.targetClass   = targetClass;
            this.parentEngine  = targetClass.ParentEngine;
            this.parentProject = targetClass.ParentProject;
            this.targetElement   = targetElement;
            this.taskElementList = taskElementList;
            this.targetParameters = targetParameters;
            this.targetBuildEventContext = targetBuildEventContext;

            // Expand the list of depends on targets
            dependsOnTargetNames = expander.ExpandAllIntoStringList(targetClass.DependsOnTargets, targetClass.DependsOnTargetsAttribute);

            // Starting to build the target
            inProgressBuildState = InProgressBuildState.StartingBuild;
            // No messages have been logged
            loggedTargetStart = false;
        }
开发者ID:nikson,项目名称:msbuild,代码行数:27,代码来源:TargetExecutionWrapper.cs


示例5: ProjectBuildState

 /// <summary>
 /// Create a build request from the list of targets to build and build request object
 /// </summary>
 internal ProjectBuildState(BuildRequest buildRequest, ArrayList targetNamesToBuild, BuildEventContext buildEventContext)
 {
     this.buildRequest = buildRequest;
     this.indexOfTargetInProgress = 0;
     this.targetNamesToBuild = targetNamesToBuild;
     this.buildContextState = BuildContextState.StartingFirstTarget;
     this.projectBuildEventContext = buildEventContext;
 }
开发者ID:nikson,项目名称:msbuild,代码行数:11,代码来源:ProjectBuildState.cs


示例6: FixtureSetup

 public static void FixtureSetup(TestContext testContext)
 {
     BuildEventContext context = new BuildEventContext(1, 2, 3, 4);
     s_error.BuildEventContext = context;
     s_warning.BuildEventContext = context;
     s_targetStarted.BuildEventContext = context;
     s_targetFinished.BuildEventContext = context;
 }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:8,代码来源:ConfigureableForwardingLogger_Tests.cs


示例7: Throw

        internal static void Throw(Exception innerException, BuildEventContext buildEventContext, string messageResourceName, params string[] messageArgs)
        {
            ErrorUtilities.VerifyThrow(messageResourceName != null, "Need error message.");

            string message = ResourceUtilities.FormatResourceString(messageResourceName, messageArgs);

            throw new RemoteErrorException(message, innerException, buildEventContext);
        }
开发者ID:nikson,项目名称:msbuild,代码行数:8,代码来源:RemoteErrorException.cs


示例8: ConfigureableForwardingLogger_Tests

 public ConfigureableForwardingLogger_Tests()
 {
     BuildEventContext context = new BuildEventContext(1, 2, 3, 4);
     _error.BuildEventContext = context;
     _warning.BuildEventContext = context;
     _targetStarted.BuildEventContext = context;
     _targetFinished.BuildEventContext = context;
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:8,代码来源:ConfigureableForwardingLogger_Tests.cs


示例9: RemoteErrorException

        internal RemoteErrorException(string message, Exception innerException, BuildEventContext buildEventContext)
            : base(message, innerException)
        {
            ErrorUtilities.VerifyThrow((message != null) && (message.Length > 0), "Need error message.");
            ErrorUtilities.VerifyThrow(innerException != null, "Need the logger exception.");

            this.buildEventContext = buildEventContext;
        }
开发者ID:nikson,项目名称:msbuild,代码行数:8,代码来源:RemoteErrorException.cs


示例10: FixtureSetup

 public void FixtureSetup()
 {
     BuildEventContext context = new BuildEventContext(1, 2, 3, 4);
     error.BuildEventContext = context;
     warning.BuildEventContext = context;
     targetStarted.BuildEventContext = context;
     targetFinished.BuildEventContext = context;
 }
开发者ID:nikson,项目名称:msbuild,代码行数:8,代码来源:ConfigureableForwardingLogger_Tests.cs


示例11: AddProjectStartedEvent

 internal void AddProjectStartedEvent(string projectFile, BuildEventContext context)
 {
     lock (this.projectStartedEvents)
     {
         if (!this.projectStartedEvents.ContainsKey(context))
         {
             this.projectStartedEvents.Add(context, projectFile);
         }
     }
 }
开发者ID:majianxiong,项目名称:vulcan,代码行数:10,代码来源:MsBuildNodeLogger.cs


示例12: BuildEventArgs

		protected BuildEventArgs (string message, string helpKeyword,
					  string senderName, DateTime eventTimestamp)
		{
			this.message = message;
			this.helpKeyword = helpKeyword;
			this.senderName = senderName;
			this.threadId = Thread.CurrentThread.GetHashCode ();
			this.timestamp = eventTimestamp;
			this.context = BuildEventContext.NewInstance ();
		}
开发者ID:GirlD,项目名称:mono,代码行数:10,代码来源:BuildEventArgs.cs


示例13: GetProjectFile

        internal string GetProjectFile(BuildEventContext e)
        {
            string file;

            lock (projectStartedEvents)
            {
                projectStartedEvents.TryGetValue(e, out file);
            }

            return file;
        }
开发者ID:majianxiong,项目名称:vulcan,代码行数:11,代码来源:MsBuildNodeLogger.cs


示例14: Generate

        /// <summary>
        /// Given the full path to a solution, returns a string containing the v3.5 MSBuild-format
        /// wrapper project for that solution.  
        /// </summary>
        /// <param name="solutionPath">Full path to the solution we are wrapping</param>
        /// <param name="toolsVersionOverride">May be null.  If non-null, contains the ToolsVersion passed in on the command line</param>\
        /// <param name="projectBuildEventContext">An event context for logging purposes.</param>
        /// <returns></returns>
        static public string Generate(string solutionPath, string toolsVersionOverride, BuildEventContext projectBuildEventContext)
        {
            Project msbuildProject = new Project();

            SolutionParser solution = new SolutionParser();
            solution.SolutionFile = solutionPath;
            solution.ParseSolutionFile();

            Generate(solution, msbuildProject, toolsVersionOverride, projectBuildEventContext);

            return msbuildProject.Xml;
        }
开发者ID:nikson,项目名称:msbuild,代码行数:20,代码来源:SolutionWrapperProject.cs


示例15: LogComment

        /// <summary>
        /// Logs a comment (BuildMessageEventArgs) with a certain MessageImportance level
        /// </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="messageResourceName">String which identifies the message in the string resx</param>
        /// <param name="messageArgs">Arguments for the format string indexed by messageResourceName</param>
        /// <exception cref="InternalErrorException">MessageResourceName is null</exception>
        public void LogComment(BuildEventContext buildEventContext, MessageImportance importance, string messageResourceName, params object[] messageArgs)
        {
            lock (_lockObject)
            {
                if (!OnlyLogCriticalEvents)
                {
                    ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for comment message.");

                    LogCommentFromText(buildEventContext, importance, ResourceUtilities.GetResourceString(messageResourceName), messageArgs);
                }
            }
        }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:21,代码来源:LoggingServiceLogMethods.cs


示例16: TargetDependencyAnalyzer

        /// <summary>
        /// Creates an instance of this class for the given target.
        /// </summary>
        /// <owner>SumedhK</owner>
        internal TargetDependencyAnalyzer(string projectDirectory, Target targetToAnalyze, EngineLoggingServices loggingServices, BuildEventContext buildEventContext)
        {
            ErrorUtilities.VerifyThrow(projectDirectory != null, "Need a project directory.");
            ErrorUtilities.VerifyThrow(targetToAnalyze != null, "Need a target to analyze.");
            ErrorUtilities.VerifyThrow(targetToAnalyze.TargetElement != null, "Need a target element.");

            this.projectDirectory = projectDirectory;
            this.targetToAnalyze = targetToAnalyze;
            this.targetInputsAttribute = targetToAnalyze.TargetElement.Attributes[XMakeAttributes.inputs];
            this.targetOutputsAttribute = targetToAnalyze.TargetElement.Attributes[XMakeAttributes.outputs];
            this.loggingService = loggingServices;
            this.buildEventContext = buildEventContext;
        }
开发者ID:nikson,项目名称:msbuild,代码行数:17,代码来源:TargetDependencyAnalyzer.cs


示例17: this

 /// <summary>
 /// This constructor allows event data to be initialized.
 /// Sender is assumed to be "MSBuild".
 /// </summary>
 /// <param name="projectId">project id</param>
 /// <param name="message">text message</param>
 /// <param name="helpKeyword">help keyword </param>
 /// <param name="projectFile">project name</param>
 /// <param name="targetNames">targets we are going to build (empty indicates default targets)</param>
 /// <param name="properties">list of properties</param>
 /// <param name="items">list of items</param>
 /// <param name="parentBuildEventContext">event context info for the parent project</param>
 public ProjectStartedEventArgs
 (
     int projectId,
     string message,
     string helpKeyword,
     string projectFile,
     string targetNames,
     IEnumerable properties,
     IEnumerable items,
     BuildEventContext parentBuildEventContext
 )
     : this(projectId, message, helpKeyword, projectFile, targetNames, properties, items, parentBuildEventContext, DateTime.UtcNow)
 {
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:26,代码来源:ProjectStartedEventArgs.cs


示例18: CreateFromStream

 internal override void CreateFromStream(BinaryReader reader)
 {
     base.CreateFromStream(reader);
     this.projectId = reader.ReadInt32();
     if (reader.ReadByte() == 0)
     {
         this.parentProjectBuildEventContext = null;
     }
     else
     {
         int nodeId = reader.ReadInt32();
         int submissionId = reader.ReadInt32();
         int projectInstanceId = reader.ReadInt32();
         int projectContextId = reader.ReadInt32();
         int targetId = reader.ReadInt32();
         int taskId = reader.ReadInt32();
         this.parentProjectBuildEventContext = new BuildEventContext(submissionId, nodeId, projectInstanceId, projectContextId, targetId, taskId);
     }
     if (reader.ReadByte() == 0)
     {
         this.projectFile = null;
     }
     else
     {
         this.projectFile = reader.ReadString();
     }
     this.targetNames = reader.ReadString();
     if (reader.ReadByte() == 0)
     {
         this.properties = null;
     }
     else
     {
         int capacity = reader.ReadInt32();
         ArrayList list = new ArrayList(capacity);
         for (int i = 0; i < capacity; i++)
         {
             string key = reader.ReadString();
             string str2 = reader.ReadString();
             if ((key != null) && (str2 != null))
             {
                 DictionaryEntry entry = new DictionaryEntry(key, str2);
                 list.Add(entry);
             }
         }
         this.properties = list;
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:48,代码来源:ProjectStartedEventArgs.cs


示例19: Compare

		public void Compare ()
		{
			Assert.IsTrue (BuildEventContext.Invalid == BuildEventContext.Invalid, "#1");
			Assert.IsFalse (BuildEventContext.Invalid != BuildEventContext.Invalid, "#2");
			var inst = new BuildEventContext (0, 0, 0, 0);
			Assert.IsFalse (BuildEventContext.Invalid == inst, "#3");
			Assert.IsTrue (BuildEventContext.Invalid != inst, "#4");
			Assert.IsFalse (BuildEventContext.Invalid == null, "#5");
			Assert.IsTrue (BuildEventContext.Invalid != null, "#6");
			Assert.IsFalse (BuildEventContext.Invalid.Equals (null), "#7");
			Assert.IsFalse (BuildEventContext.Invalid.Equals (inst), "#8");
			Assert.IsTrue (BuildEventContext.Invalid.Equals (BuildEventContext.Invalid), "#9");
			Assert.IsFalse (inst.Equals (null), "#10");
			Assert.IsTrue (inst.Equals (inst), "#11");
			Assert.IsFalse (inst.Equals (BuildEventContext.Invalid), "#12");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:16,代码来源:BuildEventContextTest.cs


示例20:

 /// <summary>
 /// Override to BuildProject file to return true so we can test that
 /// </summary>
 override internal bool BuildProjectFile
 (
     int nodeProxyId,
     string[] projectFileNames,
     string[] targetNames,
     IDictionary[] globalProperties,
     IDictionary[] targetOutputsPerProject,
     EngineLoggingServices loggingServices,
     string[] toolsVersions,
     bool useResultsCache,
     bool unloadProjectsOnCompletion,
     BuildEventContext taskContext
 )
 {
     return true;
 }
开发者ID:nikson,项目名称:msbuild,代码行数:19,代码来源:MockNode.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Framework.BuildFinishedEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Framework.BuildEventArgs类代码示例发布时间: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