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


C# Framework.ProjectStartedEventArgs类代码示例

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


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

示例1: ProjectStarted

 void ProjectStarted(object sender, ProjectStartedEventArgs e)
 {
     string directoryName = Path.GetDirectoryName(e.ProjectFile);
     if (null != directoryName)
         this.ProjectDirectory = directoryName;
     // Console.WriteLine("Project Started: " + e.ProjectFile);
 }
开发者ID:psineur,项目名称:MonoSublimeLogger,代码行数:7,代码来源:LoggerImpl.cs

示例2: 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

示例3: eventSource_ProjectStarted

 void eventSource_ProjectStarted(object sender, ProjectStartedEventArgs e)
 {
     // ProjectStartedEventArgs adds ProjectFile, TargetNames
     // Just the regular message string is good enough here, so just display that.
     WriteLine(String.Empty, e);
     indent++;
 }
开发者ID:twistedtwig,项目名称:NHibernateRepository,代码行数:7,代码来源:MsBuildLogger.cs

示例4: Project

        /// <summary>
        /// Initializes a new instance of the <see cref="Project"/> class.
        /// </summary>
        /// <param name="projectId">The project identifier.</param>
        /// <param name="e">The <see cref="ProjectStartedEventArgs"/> instance containing the event data.</param>
        /// <param name="parentPropertyBag">The parent property bag (to check for inherited properties).</param>
        public Project(int projectId, ProjectStartedEventArgs e, PropertyBag parentPropertyBag)
        {
            Properties = new PropertyBag(parentPropertyBag);
            Id = projectId;

            TryUpdate(e);
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:13,代码来源:Project.cs

示例5: eventSource_ProjectStarted

 /// <summary>
 /// Handler for the ProjectStarted event. 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void eventSource_ProjectStarted(object sender, ProjectStartedEventArgs e)
 {
     // Clone and store the properties so we can inspect the values later on
     foreach (DictionaryEntry property in e.Properties)
     {
         projectStartedProperties[(string) property.Key] = (string) property.Value;
     }
 }
开发者ID:nikson,项目名称:msbuild,代码行数:13,代码来源:MockProjectStartedLogger.cs

示例6: ProjectState

 public ProjectState(ProjectStartedEventArgs args)
 {
     GlobalProperties = args.GlobalProperties;
     ProjectFile = args.ProjectFile;
     ContextId = args.BuildEventContext.ProjectContextId;
     ParentContextId = args.ParentProjectBuildEventContext.ProjectContextId;
     TargetPath = (string)args.Properties?.Cast<DictionaryEntry>().FirstOrDefault(p => ((string)p.Key).Equals("TargetPath")).Value;
 }
开发者ID:dsgouda,项目名称:buildtools,代码行数:8,代码来源:BinClashLogger.cs

示例7: EventArgsCtors

        public void EventArgsCtors()
        {
            ProjectStartedEventArgs projectStartedEvent = new ProjectStartedEventArgs2();
            Assert.IsNotNull(projectStartedEvent);

            projectStartedEvent = new ProjectStartedEventArgs("Message", "HelpKeyword", "ProjecFile", "TargetNames", null, null);
            projectStartedEvent = new ProjectStartedEventArgs("Message", "HelpKeyword", "ProjecFile", "TargetNames", null, null, DateTime.Now);
            projectStartedEvent = new ProjectStartedEventArgs(1, "Message", "HelpKeyword", "ProjecFile", "TargetNames", null, null, null);
            projectStartedEvent = new ProjectStartedEventArgs(1, "Message", "HelpKeyword", "ProjecFile", "TargetNames", null, null, null, DateTime.Now);
            projectStartedEvent = new ProjectStartedEventArgs(null, null, null, null, null, null);
            projectStartedEvent = new ProjectStartedEventArgs(null, null, null, null, null, null, DateTime.Now);
            projectStartedEvent = new ProjectStartedEventArgs(1, null, null, null, null, null, null, null);
            projectStartedEvent = new ProjectStartedEventArgs(1, null, null, null, null, null, null, null, DateTime.Now);
        }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:14,代码来源:ProjectStartedEventArgs_Tests.cs

示例8: AssignmentTest

		public void AssignmentTest ()
		{
			ProjectStartedEventArgs psea;
			string message = "message";
			string helpKeyword = "helpKeyword";
			string projectFile = "projectFile";
			string targetNames = "targetNames";
			string [] properties = new string [2] { "a", "b" };
			string [] items = new string [2] { "c", "d" };

			
			psea = new ProjectStartedEventArgs (message, helpKeyword, projectFile, targetNames, properties, items);
			
			Assert.AreEqual (message, psea.Message, "A1");
			Assert.AreEqual (helpKeyword, psea.HelpKeyword, "A2");
			Assert.AreEqual (projectFile, psea.ProjectFile, "A3");
			Assert.AreEqual (targetNames, psea.TargetNames, "A4");
			Assert.AreEqual (properties, psea.Properties, "A5");
			Assert.AreEqual (items, psea.Items, "A6");
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:20,代码来源:ProjectStartedEventArgsTest.cs

示例9: ItemsAndPropertiesDifferentEquals

        public void ItemsAndPropertiesDifferentEquals()
        {
            ArrayList itemsList = new ArrayList();
            ArrayList propertiesList = new ArrayList();
            ProjectStartedEventArgs differentItemsAndProperties = new ProjectStartedEventArgs
                (
                  s_baseProjectStartedEvent.ProjectId,
                  s_baseProjectStartedEvent.Message,
                  s_baseProjectStartedEvent.HelpKeyword,
                  s_baseProjectStartedEvent.ProjectFile,
                  s_baseProjectStartedEvent.TargetNames,
                  propertiesList,
                  itemsList,
                  s_baseProjectStartedEvent.ParentProjectBuildEventContext,
                  s_baseProjectStartedEvent.Timestamp
                );

            Assert.IsFalse(propertiesList == s_baseProjectStartedEvent.Properties);
            Assert.IsFalse(itemsList == s_baseProjectStartedEvent.Items);
        }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:20,代码来源:ProjectStartedEventArgs_Tests.cs

示例10: eventSource_ProjectStartedHandler

		private void eventSource_ProjectStartedHandler(object sender, ProjectStartedEventArgs e)
		{
            LogStageStarted(XmlLoggerElements.Project, e.TargetNames, e.ProjectFile, e.Timestamp);
		}
开发者ID:jlewin,项目名称:Kobush.Build,代码行数:4,代码来源:XmlLogger.cs

示例11: ProjectStartedHandler

		/// <summary>
		/// This is the delegate for ProjectStartedHandler events.
		/// </summary>
		private void ProjectStartedHandler(object sender, ProjectStartedEventArgs buildEvent)
		{
            try
            {
                if (LogAtImportance(MessageImportance.Low))
                {
                    LogEvent(sender, buildEvent);
                }
            }
            catch (Exception e)
            {
                Debug.Assert(false, "Problem logging projectstarted event: " + e.Message + " at " + e.TargetSite);
                // swallow the exception
            }
		}
开发者ID:CaptainHayashi,项目名称:visualfsharp,代码行数:18,代码来源:IDEBuildLogger.cs

示例12: ProjectStarted

        private void ProjectStarted(object sender, ProjectStartedEventArgs e)
        {
            string targets = string.IsNullOrEmpty(e.TargetNames) ? "default" : e.TargetNames;
            string line = string.Format(CultureInfo.InvariantCulture, "Project \"{0}\" ({1} target(s)):", e.ProjectFile, targets);
            this.WriteLine(line + Environment.NewLine);

            if (this.IsVerbosityAtLeast(LoggerVerbosity.Diagnostic))
            {
                this.WriteLine("Initial Properties:");

                SortedDictionary<string, string> sortedProperties = new SortedDictionary<string, string>();
                foreach (DictionaryEntry k in e.Properties.Cast<DictionaryEntry>())
                {
                    sortedProperties.Add(k.Key.ToString(), k.Value.ToString());
                }

                foreach (var p in sortedProperties)
                {
                    bool matched = this.regExRules.Select(s => new Regex(s)).Select(r => r.Match(p.Key)).Any(m => m.Success);

                    if (matched)
                    {
                        this.WriteLine(p.Key + "\t = " + SecureChar.Repeat(p.Value.Length));
                    }
                    else
                    {
                        this.WriteLine(p.Key + "\t = " + p.Value);
                    }
                }
            }
        }
开发者ID:simondmorias,项目名称:MSBuildExtensionPack,代码行数:31,代码来源:SecureFileLogger.cs

示例13: OnProjectStarted

 private void OnProjectStarted(object sender, ProjectStartedEventArgs e)
 {
     _projects.Add(new BuildProjectContextEntry(
         e.BuildEventContext.ProjectInstanceId,
         e.BuildEventContext.ProjectContextId,
         e.ProjectFile,
         e.GlobalProperties));
 }
开发者ID:ashwinsathyar,项目名称:BuildVision,代码行数:8,代码来源:BuildOutputLogger.cs

示例14: ProjectStarted

 /// <summary>
 /// Event handler which signals the event.
 /// </summary>
 private void ProjectStarted(object sender, ProjectStartedEventArgs e)
 {
     _projectStartedEvent.Set();
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:7,代码来源:MuxLogger_Tests.cs

示例15: eventSource_ProjectStarted

 private void eventSource_ProjectStarted(object sender, ProjectStartedEventArgs e)
 {
 	Console.WriteLine("project started: file=\"{0}\"", e.ProjectFile);
 }
开发者ID:die-Deutsche-Orthopaedie,项目名称:LiteDevelop,代码行数:4,代码来源:ConsoleLogger.cs


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