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

C# IRunner类代码示例

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

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



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

示例1: TextResultWriter

		public TextResultWriter (IRunner runner, string fileName)
			: base (runner, fileName)
		{
			if ((fileName == null) || (fileName.Length == 0)) {
				writer = System.Console.Out;

				string color_override = Environment.GetEnvironmentVariable ("GENDARME_COLOR") ?? "dark";
				switch (color_override.ToLowerInvariant ()) {
				case "none":
					color_scheme = ColorScheme.None;
					break;
				case "light":
					color_scheme = ColorScheme.Light;
					break;
				case "dark":
				default:
					color_scheme = ColorScheme.Dark;
					break;
				}
			} else {
				color_scheme = ColorScheme.None;
				writer = new StreamWriter (fileName);
				need_closing = true;
			}
		}
开发者ID:TheRealDuckboy,项目名称:mono-soc-2008,代码行数:25,代码来源:TextResultWriter.cs


示例2: XmlResultWriter

		public XmlResultWriter (IRunner runner, string fileName)
			: base (runner, fileName)
		{
			writer = XmlWriter.Create (
				CreateWriterFor (fileName),
				new XmlWriterSettings { Indent = true, CloseOutput = true, CheckCharacters = false });
		}
开发者ID:col42dev,项目名称:mono-tools,代码行数:7,代码来源:XmlResultWriter.cs


示例3: ScoresController

 public ScoresController(IDbContext context, ICompiler compiler, IRunner runner, Participant participant = null)
 {
     _context = context;
     _compiler = compiler;
     _runner = runner;
     _participant = participant ?? GetCurrentParticipant();
 }
开发者ID:prademak,项目名称:JavaProgrammingContest,代码行数:7,代码来源:ScoresController.cs


示例4: IgnoreFileList

		public IgnoreFileList (IRunner runner, string fileName)
			: base (runner)
		{
			if (!String.IsNullOrEmpty (fileName) && File.Exists (fileName)) {
				Parse (fileName);
			}
		}
开发者ID:nolanlum,项目名称:mono-tools,代码行数:7,代码来源:IgnoreFileList.cs


示例5: RunController

 public RunController(IDbContext context, ICompiler compiler, IRunner runner, Participant participant = null)
 {
     _context = context;
     _compiler = compiler;
     _runner = runner;
     _participant = participant == null ? GetCurrentParticipant() : participant;
 }
开发者ID:prademak,项目名称:JavaProgrammingContest,代码行数:7,代码来源:RunController.cs


示例6: FillSectionMap

        private static void FillSectionMap(IRunner runner)
        {
            SectionMap = new Dictionary<string, Section>();

            // We may later read the current directory for dlls to load
            // 3rd party section handler modules but right now
            // there is not such a requirement

            // get types inherited from Section
            var types =
                typeof(Section).Assembly.
                GetTypes().
                Where(t => typeof(Section).IsAssignableFrom(t)).
                ToArray();

            foreach (var type in types)
            {
                var heading = type.GetCustomAttributes(
                        typeof(SectionHeaderAttribute),
                        inherit: false).
                    OfType<SectionHeaderAttribute>().
                    FirstOrDefault();

                // only accept Sections types which have SectionHeader attribute
                if (heading != null)
                {
                    var instance = Activator.CreateInstance(type) as Section;
                    instance.Runner = runner;
                    // cache the concrete section handler
                    SectionMap.Add("[" + heading.Header.ToLower() + "]", instance);
                }
            }
        }
开发者ID:shayanelhami,项目名称:DeployScript,代码行数:33,代码来源:SectionFactory.cs


示例7: XmlResultWriter

		public XmlResultWriter (IRunner runner, string fileName)
			: base (runner, fileName)
		{
			if ((fileName == null) || (fileName.Length == 0))
				writer = new XmlTextWriter (System.Console.Out);
			else
				writer = new XmlTextWriter (fileName, Encoding.UTF8);
		}
开发者ID:TheRealDuckboy,项目名称:mono-soc-2008,代码行数:8,代码来源:XmlResultWriter.cs


示例8: RunnerFactory

 public RunnerFactory(ICategoryFinderService categoryFinderService,
     IResultsParser resultsParser,
     IRunner runner)
 {
     _categoryFinderService = categoryFinderService;
     _resultsParser = resultsParser;
     _runner = runner;
 }
开发者ID:uShip,项目名称:Concord,代码行数:8,代码来源:RunnerFactory.cs


示例9: UpdatesMetadata

 /// <summary>
 /// Constructor for the updater
 /// </summary>
 /// <param name="index"></param>
 /// <param name="createDate"></param>
 /// <param name="description"></param>
 /// <param name="createBy"></param>
 /// <param name="runner"></param>
 public UpdatesMetadata(double index, string createDate, string description, string createBy, IRunner runner)
 {
     _index = index;
     _createDate = createDate;
     _description = description;
     _createBy = createBy;
     _runner = runner;
 }
开发者ID:rolfwessels,项目名称:databaseversioncontrol,代码行数:16,代码来源:UpdatesMetadata.cs


示例10: Initialize

		public override void Initialize (IRunner runner)
		{
			base.Initialize (runner);

			// avoid checking all methods unless the type has some properties
			Runner.AnalyzeType += delegate (object o, RunnerEventArgs e) {
				Active = e.CurrentType.HasProperties;
			};
		}
开发者ID:nolanlum,项目名称:mono-tools,代码行数:9,代码来源:UseValueInPropertySetterRule.cs


示例11: Initialize

		public override void Initialize (IRunner runner)
		{
			base.Initialize (runner);

			// Nullable cannot be used if the assembly target runtime is earlier than 2.0
			Runner.AnalyzeModule += delegate (object o, RunnerEventArgs e) {
				Active = (e.CurrentModule.Runtime >= TargetRuntime.Net_2_0);
			};
		}
开发者ID:nolanlum,项目名称:mono-tools,代码行数:9,代码来源:ConsiderConvertingFieldToNullableRule.cs


示例12: Initialize

		public override void Initialize (IRunner runner)
		{
			base.Initialize (runner);

			Runner.AnalyzeModule += (object o, RunnerEventArgs e) => {
				Active = (e.CurrentAssembly.Name.Name == "mscorlib" ||
				e.CurrentModule.HasTypeReference ("System.ArgIterator"));
			};
		}
开发者ID:nolanlum,项目名称:mono-tools,代码行数:9,代码来源:PreferParamsArrayForVariableArgumentsRule.cs


示例13: PausableTask

		internal PausableTask(IEnumerator enumerator, IRunner runner)
		{
            if (enumerator is SingleTask || enumerator is PausableTask || enumerator is AsyncTask)
				throw new ArgumentException("Use of incompatible Enumerator, cannot be SingleTask/PausableTask/AsyncTask");

            _enumerator = enumerator;
			
			_runner = runner;
		}
开发者ID:minhhh,项目名称:TaskRunner,代码行数:9,代码来源:PausableTask.cs


示例14: PausableTask

        public PausableTask(IEnumerator enumerator, IRunner runner)
        {
            if (enumerator is SingleTask || enumerator is PausableTask || enumerator is AsyncTask)
                throw new ArgumentException("Internal task used outside the framework scope");

            _enumerator = enumerator;

            _runner = runner;
        }
开发者ID:sebas77,项目名称:Svelto-ECS-Example,代码行数:9,代码来源:PausableTask.cs


示例15: Initialize

		public override void Initialize (IRunner runner)
		{
			base.Initialize (runner);

			Runner.AnalyzeType += (object sender, RunnerEventArgs e) =>
			{
				Active = e.CurrentType.Implements ("Gendarme.Framework", "IRule");
			};
		}
开发者ID:FreeBSD-DotNet,项目名称:mono-tools,代码行数:9,代码来源:DoNotThrowExceptionRule.cs


示例16: Initialize

		public override void Initialize (IRunner runner)
		{
			base.Initialize (runner);

			//check if this is a Boo assembly using macros
			Runner.AnalyzeAssembly += delegate (object o, RunnerEventArgs e) {
				IsBooAssemblyUsingMacro = (e.CurrentAssembly.MainModule.HasTypeReference (BooMacroStatement));
			};
		}
开发者ID:nolanlum,项目名称:mono-tools,代码行数:9,代码来源:ParameterNamesShouldMatchOverridenMethodRule.cs


示例17: Profile

 public Profile(IRunner runner)
 {
     _runner = runner;
     _home = Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%");
     if (string.IsNullOrEmpty(_home)) return;
     _profile = Path.Combine(_home, RcFile);
     var fi = new FileInfo(_profile);
     Exists = fi.Exists;
 }
开发者ID:neiz,项目名称:Wish,代码行数:9,代码来源:Profile.cs


示例18: ServiceRunner

        public ServiceRunner(ISettingsRunnable settings, IRunner runner, string threadName, bool autoStart = false)
        {
            _settings = settings;
            _runnableObject = runner;
            _threadName = threadName;

            if (autoStart)
                Start();
        }
开发者ID:rubenlr,项目名称:Utilities,代码行数:9,代码来源:ServiceRunner.cs


示例19: Initialize

		public override void Initialize (IRunner runner)
		{
			base.Initialize (runner);
			// extension methods are only available in FX3.5
			// check runtime >= NET2_0 (fast) then check if [ExtensionAttribute] is referenced
			Runner.AnalyzeModule += (object o, RunnerEventArgs e) => {
				Active = e.CurrentModule.Runtime >= TargetRuntime.Net_2_0 &&
					e.CurrentModule.HasTypeReference ("System.Runtime.CompilerServices.ExtensionAttribute");
			};
		}
开发者ID:nolanlum,项目名称:mono-tools,代码行数:10,代码来源:AvoidExtensionMethodOnSystemObjectRule.cs


示例20: GetSubject

        private string GetSubject(Mapping map, BuildData build, IRunner runner)
        {
            string errorMessage = "Success: ";
            if (runner.ErrorOccured)
            {
                errorMessage = "Failed: ";
            }

            return string.Format("{0} TfsDeployer Ran Script {1} on Machine {2} for {3}/{4}/{5}",errorMessage, map.Script, map.Computer, build.TeamProject, build.BuildType, build.BuildNumber);
        }
开发者ID:hopenbr,项目名称:HopDev,代码行数:10,代码来源:EmailAlerter.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IRuntime类代码示例发布时间:2022-05-24
下一篇:
C# IRunnable类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap