本文整理汇总了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));
}
示例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));
}
示例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);
}
示例4: Segment
public void Segment(Variety variety)
{
var pipeline = new Pipeline<Variety>(GetSegmentProcessors());
pipeline.Process(variety.ToEnumerable());
}
示例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());
}
示例6: Segment
public void Segment(Variety variety)
{
_busyService.ShowBusyIndicatorUntilFinishDrawing();
var pipeline = new Pipeline<Variety>(GetSegmentProcessors());
pipeline.Process(variety.ToEnumerable());
}
示例7: Compare
public void Compare(VarietyPair varietyPair)
{
_busyService.ShowBusyIndicatorUntilFinishDrawing();
var pipeline = new Pipeline<VarietyPair>(GetCompareProcessors());
pipeline.Process(varietyPair.ToEnumerable());
}
示例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));
}