public void EventArgsCtors()
 {
     ExternalProjectFinishedEventArgs externalProjectFinishedEvent = new ExternalProjectFinishedEventArgs2();
     externalProjectFinishedEvent = new ExternalProjectFinishedEventArgs("Message", "HelpKeyword", "Sender", "ProjectFile", true);
     externalProjectFinishedEvent = new ExternalProjectFinishedEventArgs("Message", "HelpKeyword", "Sender", "ProjectFile", true, DateTime.Now);
     externalProjectFinishedEvent = new ExternalProjectFinishedEventArgs(null, null, null, null, true);
     externalProjectFinishedEvent = new ExternalProjectFinishedEventArgs(null, null, null, null, true, DateTime.Now);
 }
		public void AssignmentTest ()
		{
			ExternalProjectFinishedEventArgs epfea;
			string message = "message";
			string helpKeyword = "helpKeyword";
			string senderName = "senderName";
			string projectFile = "projectFile";
			bool succeeded = true;
			
			epfea = new ExternalProjectFinishedEventArgs (message, helpKeyword, senderName, projectFile, succeeded);
			
			Assert.AreEqual (message, epfea.Message, "Message");
			Assert.AreEqual (helpKeyword, epfea.HelpKeyword, "HelpKeyword");
			Assert.AreEqual (senderName, epfea.SenderName, "SenderName");
			Assert.AreEqual (projectFile, epfea.ProjectFile, "ProjectFile");
			Assert.AreEqual (succeeded, epfea.Succeeded, "Succeeded");
		}
        /// <summary>
        /// Compare this build event context with another object to determine 
        /// equality. This means the values inside the object are identical.
        /// </summary>
        /// <param name="obj">Object to compare to this object</param>
        /// <returns>True if the object values are identical, false if they are not identical</returns>
        public static bool IsEquivalent(ExternalProjectFinishedEventArgs args, ExternalProjectFinishedEventArgs other)
        {
            if (args.Succeeded != other.Succeeded)
            {
                return false;
            }

            if (!String.Equals(args.ProjectFile, other.ProjectFile, StringComparison.OrdinalIgnoreCase))
            {
                return false;
            }

            return ((BuildEventArgs)args).IsEquivalent(other);
        }
        /// <summary>
        /// Read and reconstruct a ProjectFinishedEventArgs from the stream
        /// </summary>
        private ExternalProjectFinishedEventArgs ReadExternalProjectFinishedEventFromStream(INodePacketTranslator translator, string message, string helpKeyword, string senderName)
        {
            string projectFile = null;
            translator.Translate(ref projectFile);

            bool succeeded = true;
            translator.Translate(ref succeeded);

            ExternalProjectFinishedEventArgs buildEvent =
                new ExternalProjectFinishedEventArgs(
                    message,
                    helpKeyword,
                    senderName,
                    projectFile,
                    succeeded);

            return buildEvent;
        }
        /// <summary>
        /// Serialize ExternalProjectFinished Event Argument to the stream
        /// </summary>
        private void WriteExternalProjectFinishedEventToStream(ExternalProjectFinishedEventArgs externalProjectFinishedEventArgs, INodePacketTranslator translator)
        {
            string projectFile = externalProjectFinishedEventArgs.ProjectFile;
            translator.Translate(ref projectFile);

            bool succeeded = externalProjectFinishedEventArgs.Succeeded;
            translator.Translate(ref succeeded);
        }
 /// <summary>
 /// Small helper for logging the custom ExternalProjectFinished build event.
 /// Thread safe.
 /// </summary>
 /// <param name="message">text message</param>
 /// <param name="helpKeyword">help keyword</param>
 /// <param name="projectFile">project name</param>
 /// <param name="succeeded">true indicates project built successfully</param>
 public void LogExternalProjectFinished
 (
     string message,
     string helpKeyword,
     string projectFile,
     bool succeeded
 )
 {
     // No lock needed, as BuildEngine methods from v4.5 onwards are thread safe.
     ExternalProjectFinishedEventArgs epf = new ExternalProjectFinishedEventArgs(message, helpKeyword, TaskName, projectFile, succeeded);
     BuildEngine.LogCustomEvent(epf);
 }