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


C# IMessenger.Write方法代码示例

本文整理汇总了C#中IMessenger.Write方法的典型用法代码示例。如果您正苦于以下问题:C# IMessenger.Write方法的具体用法?C# IMessenger.Write怎么用?C# IMessenger.Write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IMessenger的用法示例。


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

示例1: Run

		/// <summary>
		/// Runs an appropriate Action method
		/// </summary>
		/// <param name="targetType">Type where to search for Action methods</param>
		/// <param name="args">Arguments that will be converted to Action method arguments</param>
		/// <param name="messenger">Uses for writing messages instead of Console class methods</param>
		public static void Run(Type targetType, string[] args, IMessenger messenger)
		{
			try
			{
				new Consolery(targetType, args, messenger).RunAction();
			}
			catch (NConsolerException e)
			{
				messenger.Write(e.Message);
			}
		}
开发者ID:Galad,项目名称:SpecFlow,代码行数:17,代码来源:NConsoler.cs

示例2: Run

 /// <summary>
 /// Runs an appropriate Action method
 /// </summary>
 /// <param name="targetType">Type where to search for Action methods</param>
 /// <param name="args">Arguments that will be converted to Action method arguments</param>
 /// <param name="messenger">Uses for writing messages instead of Console class methods</param>
 /// <param name="notationType">Switch for command line syntax. Windows: /param:value Linux: -param value</param>
 public static void Run(Type targetType, string[] args, IMessenger messenger, Notation notationType = Notation.Windows)
 {
     try
     {
         new Consolery(targetType, null, args, messenger, notationType).RunAction();
     }
     catch (NConsolerException e)
     {
         messenger.Write(e.Message);
         const int genericErrorExitCode = 1;
         Environment.ExitCode = genericErrorExitCode;
     }
 }
开发者ID:lukesmith,项目名称:SpecFlow,代码行数:20,代码来源:NConsoler.cs

示例3: Run

 /// <summary>
 /// Runs an appropriate Action method
 /// </summary>
 /// <param name="target">Type where to search for Action methods</param>
 /// <param name="args">Arguments that will be converted to Action method arguments</param>
 /// <param name="messenger">Uses for writing messages instead of Console class methods</param>
 /// <param name="notationType">Switch for command line syntax. Windows: /param:value Linux: -param value</param>
 public static void Run(object target, string[] args, IMessenger messenger, Notation notationType = Notation.Windows)
 {
     Contract.Requires(target != null);
     try
     {
         new Consolery(target.GetType(), target, args, messenger, notationType).RunAction();
     }
     catch (NConsolerException e)
     {
         messenger.Write(e.Message);
     }
 }
开发者ID:nuxleus,项目名称:nconsoler,代码行数:19,代码来源:Consolery.cs

示例4: RunInstance

 /// <summary>
 /// Runs an appropriate Action method
 /// </summary>
 /// <param name="targetObject">Object where to search for Action methods</param>
 /// <param name="args">Arguments that will be converted to Action method arguments</param>
 /// <param name="messenger">Uses for writing messages instead of Console class methods</param>
 public static int RunInstance(object targetObject, string[] args, IMessenger messenger)
 {
     try
     {
         return new Consolery(targetObject.GetType(), args, messenger, true, targetObject).RunAction();
     }
     catch (NConsolerException e)
     {
         messenger.Write(e.Message);
         return 100;
     }
 }
开发者ID:penartur,项目名称:FLocal,代码行数:18,代码来源:NConsoler.cs

示例5: Run

 /// <summary>
 /// Runs an appropriate Action method
 /// </summary>
 /// <param name="targetType">Type where to search for Action methods</param>
 /// <param name="args">Arguments that will be converted to Action method arguments</param>
 /// <param name="messenger">Uses for writing messages instead of Console class methods</param>
 public static int Run(Type targetType, string[] args, IMessenger messenger)
 {
     try
     {
         return new Consolery(targetType, args, messenger, false, null).RunAction();
     }
     catch (NConsolerException e)
     {
         messenger.Write(e.Message);
         return 100;
     }
 }
开发者ID:penartur,项目名称:FLocal,代码行数:18,代码来源:NConsoler.cs


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