void PackageOperationMessageLogged (object sender, PackageOperationMessageLoggedEventArgs e)
		{
			progressMonitor.Log.WriteLine (e.Message.ToString ());

			if (e.Message.Level == MessageLevel.Warning) {
				WarningReported = true;
			}
		}
Esempio n. 2
0
        public void OnPackageOperationMessageLogged_InfoMessageLoggedWithOneEventSubscriber_EventArgsHasInfoMessageLevel()
        {
            CreateEvents();
            PackageOperationMessageLoggedEventArgs eventArgs = null;

            events.PackageOperationMessageLogged += (sender, e) => eventArgs = e;

            events.OnPackageOperationMessageLogged(MessageLevel.Info, "Test");

            Assert.AreEqual(MessageLevel.Info, eventArgs.Message.Level);
        }
Esempio n. 3
0
        public void OnPackageOperationMessageLogged_FormattedInfoMessageLoggedWithOneEventSubscriber_EventArgsHasFormattedMessage()
        {
            CreateEvents();
            PackageOperationMessageLoggedEventArgs eventArgs = null;

            events.PackageOperationMessageLogged += (sender, e) => eventArgs = e;

            string format = "Test {0}";

            events.OnPackageOperationMessageLogged(MessageLevel.Info, format, "B");

            string message = eventArgs.Message.ToString();

            string expectedMessage = "Test B";

            Assert.AreEqual(expectedMessage, message);
        }
 void PackageOperationMessageLogged(object sender, PackageOperationMessageLoggedEventArgs e)
 {
     Log(e.Message.Level, e.Message.ToString());
 }
Esempio n. 5
0
 void PackageOperationMessageLogged(object sender, PackageOperationMessageLoggedEventArgs e)
 {
     Console.WriteLine(e.Message.ToString());
 }
 void PackageOperationMessageLogged(object sender, PackageOperationMessageLoggedEventArgs e)
 {
     Log(e.Message.Level, e.Message.ToString());
 }
		void PackageOperationMessageLogged (object sender, PackageOperationMessageLoggedEventArgs e)
		{
			if (e.Message.Level == MessageLevel.Warning) {
				ReportWarning (e.Message.ToString ());
			} else {
				LogMessage (e.Message.ToString ());
			}
		}
Esempio n. 8
0
		void PackageOperationMessageLogged (object sender, PackageOperationMessageLoggedEventArgs e)
		{
			AppendMessage (e.Message.ToString ());
		}
		public void OnPackageOperationMessageLogged(MessageLevel level, string message, params object[] args)
		{
			if (PackageOperationMessageLogged != null) {
				var eventArgs = new PackageOperationMessageLoggedEventArgs(level, message, args);
				PackageOperationMessageLogged(this, eventArgs);
			}
		}
		void PackageOperationMessageLogged (object sender, PackageOperationMessageLoggedEventArgs e)
		{
			progressMonitor.Log.WriteLine (e.Message.ToString ());
		}