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


C# Pipeline.Process方法代码示例

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


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

示例1: Compare

 public void Compare(VarietyPair varietyPair)
 {
     _busyService.ShowBusyIndicatorUntilFinishDrawing();
     Messenger.Default.Send(new PerformingComparisonMessage(varietyPair));
     var pipeline = new Pipeline<VarietyPair>(GetCompareProcessors());
     pipeline.Process(varietyPair.ToEnumerable());
     Messenger.Default.Send(new ComparisonPerformedMessage(varietyPair));
 }
开发者ID:sillsdev,项目名称:cog,代码行数:8,代码来源:AnalysisService.cs

示例2: TestStepExecutionException

		public void TestStepExecutionException()
		{
			var mockStep = new Mock<IPipelineStep<int>>();

			mockStep.Setup(x => x.Execute(0)).Throws(new StepExecutionException(0, typeof(int), null));

			// Act
			var pipeline = new Pipeline<int>();
			pipeline.Configure(new[] { mockStep.Object });

			Assert.Throws<StepExecutionException>(() => pipeline.Process(0));
		}
开发者ID:smhinsey,项目名称:Euclid,代码行数:12,代码来源:PipelineTests.cs

示例3: ExecutePipeline

		public void ExecutePipeline()
		{
			// Arrange
			const int expected = 2;
			var mockStep = new Mock<IPipelineStep<int>>();

			mockStep.Setup(x => x.Execute(0)).Returns(expected);

			// Act
			var pipeline = new Pipeline<int>();
			pipeline.Configure(new[] { mockStep.Object });
			var results = pipeline.Process(0);

			// Assert
			Assert.AreEqual(expected, results);
		}
开发者ID:smhinsey,项目名称:Euclid,代码行数:16,代码来源:PipelineTests.cs

示例4: Segment

 public void Segment(Variety variety)
 {
     var pipeline = new Pipeline<Variety>(GetSegmentProcessors());
     pipeline.Process(variety.ToEnumerable());
 }
开发者ID:rmunn,项目名称:cog,代码行数:5,代码来源:CognatesVerb.cs

示例5: Compare

 // Following code is from AnalysisService, tweaked just a little (e.g., not getting the project from ProjectService).
 // TODO: Refactor this, and/or AnalysisService, so that we don't have to have this code duplication.
 // (The code duplication is currently necessary because AnalysisService lives in Cog.Application, which references parts
 // of WPF like PresentationCore -- so we can't use Cog.Application with Mono on Linux. Moving AnalysisService to a
 // different assembly, or moving the WPF-dependent code to a different assembly, would be a good solution.) - 2015-09 RM
 public void Compare(VarietyPair varietyPair)
 {
     var pipeline = new Pipeline<VarietyPair>(GetCompareProcessors());
     pipeline.Process(varietyPair.ToEnumerable());
 }
开发者ID:rmunn,项目名称:cog,代码行数:10,代码来源:CognatesVerb.cs

示例6: Segment

 public void Segment(Variety variety)
 {
     _busyService.ShowBusyIndicatorUntilFinishDrawing();
     var pipeline = new Pipeline<Variety>(GetSegmentProcessors());
     pipeline.Process(variety.ToEnumerable());
 }
开发者ID:StephenEhmann,项目名称:cog,代码行数:6,代码来源:AnalysisService.cs

示例7: Compare

 public void Compare(VarietyPair varietyPair)
 {
     _busyService.ShowBusyIndicatorUntilFinishDrawing();
     var pipeline = new Pipeline<VarietyPair>(GetCompareProcessors());
     pipeline.Process(varietyPair.ToEnumerable());
 }
开发者ID:StephenEhmann,项目名称:cog,代码行数:6,代码来源:AnalysisService.cs

示例8: Stem

        public void Stem(StemmingMethod method, Variety variety)
        {
            _busyService.ShowBusyIndicatorUntilFinishDrawing();
            if (method == StemmingMethod.Automatic)
                variety.Affixes.Clear();

            var pipeline = new Pipeline<Variety>(GetStemProcessors(method));
            pipeline.Process(variety.ToEnumerable());
            Messenger.Default.Send(new DomainModelChangedMessage(true));
        }
开发者ID:StephenEhmann,项目名称:cog,代码行数:10,代码来源:AnalysisService.cs


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