本文整理汇总了C#中IPipeline类的典型用法代码示例。如果您正苦于以下问题:C# IPipeline类的具体用法?C# IPipeline怎么用?C# IPipeline使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPipeline类属于命名空间,在下文中一共展示了IPipeline类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PipelineStepProfiler
/// <summary>
/// Creates the profiler
/// </summary>
public PipelineStepProfiler(IPipeline pipeline, PipelineStepProfilerStats profilerStats)
{
if (pipeline == null) throw new ArgumentNullException(nameof(pipeline));
if (profilerStats == null) throw new ArgumentNullException(nameof(profilerStats));
_pipeline = pipeline;
_profilerStats = profilerStats;
}
示例2: MainPipelineExecutor
public MainPipelineExecutor(IBuilder builder, IEventAggregator eventAggregator, IPipelineCache pipelineCache, IPipeline<ITransportReceiveContext> mainPipeline)
{
this.mainPipeline = mainPipeline;
this.pipelineCache = pipelineCache;
this.builder = builder;
this.eventAggregator = eventAggregator;
}
示例3: TcpChannel
public TcpChannel(IPipeline pipeline, BufferPool pool)
{
_pipeline = pipeline;
Pipeline.SetChannel(this);
_readBuffer = pool.PopSlice();
_stream = new PeekableMemoryStream(_readBuffer.Buffer, _readBuffer.StartOffset, _readBuffer.Capacity);
}
示例4: Initialize
public void Initialize(IPipeline pipelineRunner)
{
pipelineRunner.Notify(WrapOperations)
.After<KnownStages.IRequestDecoding>()
.And
.Before<KnownStages.IOperationExecution>();
}
示例5: Initialize
public void Initialize(IPipeline pipelineRunner)
{
pipelineRunner.Notify(ChallengeIfUnauthorized)
.After<KnownStages.IOperationExecution>()
.And
.Before<KnownStages.IResponseCoding>();
}
示例6: ThreadPoolWorkerFactory
/// <summary>
/// Creates the worker factory
/// </summary>
public ThreadPoolWorkerFactory(ITransport transport, IRebusLoggerFactory rebusLoggerFactory, IPipeline pipeline, IPipelineInvoker pipelineInvoker, Options options, Func<RebusBus> busGetter, BusLifetimeEvents busLifetimeEvents, ISyncBackoffStrategy backoffStrategy)
{
if (transport == null) throw new ArgumentNullException(nameof(transport));
if (rebusLoggerFactory == null) throw new ArgumentNullException(nameof(rebusLoggerFactory));
if (pipeline == null) throw new ArgumentNullException(nameof(pipeline));
if (pipelineInvoker == null) throw new ArgumentNullException(nameof(pipelineInvoker));
if (options == null) throw new ArgumentNullException(nameof(options));
if (busGetter == null) throw new ArgumentNullException(nameof(busGetter));
if (busLifetimeEvents == null) throw new ArgumentNullException(nameof(busLifetimeEvents));
if (backoffStrategy == null) throw new ArgumentNullException(nameof(backoffStrategy));
_transport = transport;
_rebusLoggerFactory = rebusLoggerFactory;
_pipeline = pipeline;
_pipelineInvoker = pipelineInvoker;
_options = options;
_busGetter = busGetter;
_backoffStrategy = backoffStrategy;
_parallelOperationsManager = new ParallelOperationsManager(options.MaxParallelism);
_log = _rebusLoggerFactory.GetCurrentClassLogger();
if (_options.MaxParallelism < 1)
{
throw new ArgumentException($"Max parallelism is {_options.MaxParallelism} which is an invalid value");
}
if (options.WorkerShutdownTimeout < TimeSpan.Zero)
{
throw new ArgumentOutOfRangeException($"Cannot use '{options.WorkerShutdownTimeout}' as worker shutdown timeout as it");
}
busLifetimeEvents.WorkersStopped += WaitForContinuationsToFinish;
}
示例7: Initialize
public void Initialize(IPipeline pipeline)
{
pipeline.Notify(WriteResponse).After<KnownStages.ICodecResponseSelection>();
//.And
//.Before<KnownStages.IEnd>();
Log = NullLogger.Instance;
}
示例8: NancyPipelineRoutes
public NancyPipelineRoutes(IPipeline pipeline, INotificationTarget notifier)
{
Post["/bitbucket"] = parameters => {
string notificationString = Request.Form.Payload;
var commitNotification = JsonConvert.DeserializeObject<BitbucketPostReceiveNotification>(notificationString);
commitNotification.Commits.ForEach(c => pipeline.AddToPipeline(new Commit(c.Author, c.Message, c.Branch)));
return "THANKS BITBUCKET";
};
Post["/jenkins"] = parameters => {
var buildNotification = this.Bind<JenkinsBuildNotification>();
var buildStep = pipeline[buildNotification.Name];
if (buildNotification.Build.Phase == "STARTED") {
buildStep.Start();
} else if (buildNotification.Build.Phase == "FINISHED") {
if (buildNotification.Build.Status == "SUCCESS")
{
buildStep.Pass();
}
else
{
buildStep.Fail();
}
}
return "THANKS FOR THE BUILD DEETS";
};
}
示例9: Initialize
public void Initialize(IPipeline pipelineRunner)
{
pipelineRunner.Notify(PostExecution).After<KnownStages.IOperationExecution>()
.And.Before<KnownStages.IOperationResultInvocation>();
pipelineRunner.Notify(RewriteResult).After<KnownStages.IOperationResultInvocation>()
.And.Before<KnownStages.IResponseCoding>();
}
示例10: Initialize
public void Initialize(IPipeline pipelineRunner)
{
pipelineRunner.Notify(AuthoriseRequest)
.After<KnownStages.IBegin>()
.And
.Before<KnownStages.IHandlerSelection>();
}
示例11: Initialize
public void Initialize(IPipeline pipelineRunner)
{
pipelineRunner.Notify(ProcessPostConditional)
.Before<ConditionalLastModifiedContributor>()
.And
.Before<KnownStages.IResponseCoding>();
}
示例12: Cache
/// <summary>
/// Initializes a new instance of the <see cref="Cache"/> class.
/// </summary>
/// <param name="pipeline">The pipeline component.</param>
/// <param name="cachePruner">The cache pruner component.</param>
public Cache(IPipeline pipeline, ICachePruner cachePruner)
{
Ensure.ArgumentNotNull(pipeline, "pipeline");
Ensure.ArgumentNotNull(cachePruner, "cachePruner");
this.Pipeline = pipeline;
cachePruner.Start(this);
}
示例13: ProxyBase
protected ProxyBase(Type contract, IPipeline<ClientActionContext> pipeline)
{
if (contract == null) throw new ArgumentNullException(nameof(contract));
if (pipeline == null) throw new ArgumentNullException(nameof(pipeline));
Contract = contract;
_pipeline = pipeline;
}
示例14: Initialize
public void Initialize(IPipeline pipelineRunner)
{
_authentication = _resolver.Resolve<IAuthenticationProvider>();
pipelineRunner.Notify(ReadCredentials)
.After<KnownStages.IBegin>()
.And
.Before<KnownStages.IHandlerSelection>();
}
示例15: TcpServerChannel
public TcpServerChannel(IPipeline serverPipeline, IPipeline childPipeline, int maxNumberOfClients)
{
_bufferManager = new BufferManager(maxNumberOfClients, 65535);
_argsPool = new ObjectPool<SocketAsyncEventArgs>(AllocateArgs);
Pipeline = serverPipeline;
_contexts = new ContextCollection(this);
ChildPipeline = childPipeline;
}