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


C# IRunner类代码示例

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


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


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