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

C# Fakes.FakePublisher类代码示例

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

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



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

示例1: setup

        public void setup()
        {
            _publisher = new FakePublisher();
            _manager = new ProjectionManager(_publisher, checkpointForStatistics: null);

            _manager.Handle(new ProjectionManagementMessage.Post(new PublishEnvelope(_publisher), @"log(1);", enabled: true));
        }
开发者ID:vishal-h,项目名称:EventStore-1,代码行数:7,代码来源:when_posting_an_adhoc_projection.cs


示例2: setup

 public void setup()
 {
     _publisher = new FakePublisher();
     _readyHandler = new TestMessageHandler<ProjectionMessage.Projections.ReadyForCheckpoint>();
     _stream = new EmittedStream("test", _publisher, _readyHandler, false, 50);
     _stream.Start();
 }
开发者ID:jpierson,项目名称:EventStore,代码行数:7,代码来源:when_the_stream_is_started.cs


示例3: setup

 public void setup()
 {
     _publisher = new FakePublisher();
     _readyHandler = new TestCheckpointManagerMessageHandler();;
     _stream = new EmittedStream("test", CheckpointTag.FromPosition(0, -1), _publisher, _readyHandler, 50);
     _stream.Start();
 }
开发者ID:robashton,项目名称:EventStore,代码行数:7,代码来源:when_the_stream_is_started.cs


示例4: Setup

        public void Setup()
        {
            var fakePublisher = new FakePublisher();
            _ioDispatcher = new IODispatcher(fakePublisher, new PublishEnvelope(fakePublisher));

            _subscriptionDispatcher =
                new ReaderSubscriptionDispatcher(new FakePublisher());
        }
开发者ID:jjoergensen,项目名称:EventStore,代码行数:8,代码来源:when_creating_a_projection.cs


示例5: setup

 public void setup()
 {
     _publisher = new FakePublisher();
     _readyHandler = new TestMessageHandler<ProjectionMessage.Projections.ReadyForCheckpoint>();
     _stream = new EmittedStream("test", _publisher, _readyHandler, false, 50);
     _stream.EmitEvents(
         new[] {new EmittedEvent("stream", Guid.NewGuid(), "type", "data")}, CheckpointTag.FromPosition(200, 150));
 }
开发者ID:vishal-h,项目名称:EventStore-1,代码行数:8,代码来源:when_handling_an_emit_the_not_started_stream.cs


示例6: setup

        public void setup()
        {
            _publisher = new FakePublisher();
            _manager = new ProjectionManager(_publisher, checkpointForStatistics: null);

            _projectionQuery = @"fromAll(); on_any(function(){});log(1);";
            _manager.Handle(new ProjectionManagementMessage.Post(new PublishEnvelope(_publisher), _projectionQuery, enabled: true));
            _projectionName = _publisher.Messages.OfType<ProjectionManagementMessage.Updated>().Single().Name;
        }
开发者ID:jpierson,项目名称:EventStore,代码行数:9,代码来源:when_the_adhoc_projection_has_been_posted.cs


示例7: setup

 public void setup()
 {
     _publisher = new FakePublisher();
     _readyHandler = new TestMessageHandler<ProjectionMessage.Projections.ReadyForCheckpoint>();
     _stream = new EmittedStream("test", _publisher, _readyHandler, false, 50);
     _stream.Start();
     _stream.EmitEvents(
         new[] {new EmittedEvent("stream", Guid.NewGuid(), "type", "data")}, CheckpointTag.FromPosition(-1, -1));
     var msg = _publisher.Messages.OfType<ClientMessage.WriteEvents>().First();
     _stream.Handle(new ClientMessage.WriteEventsCompleted(msg.CorrelationId, msg.EventStreamId, 0));
     _stream.Checkpoint();
 }
开发者ID:jpierson,项目名称:EventStore,代码行数:12,代码来源:when_checkpoint_requested_with_all_writes_already_completed.cs


示例8: setup

 public void setup()
 {
     _fakePublisher = new FakePublisher();
     _readDispatcher =
         new RequestResponseDispatcher
             <ClientMessage.ReadStreamEventsBackward, ClientMessage.ReadStreamEventsBackwardCompleted>(
             _fakePublisher, v => v.CorrelationId, v => v.CorrelationId, new PublishEnvelope(_fakePublisher));
     _writeDispatcher =
         new RequestResponseDispatcher<ClientMessage.WriteEvents, ClientMessage.WriteEventsCompleted>(
             _fakePublisher, v => v.CorrelationId, v => v.CorrelationId, new PublishEnvelope(_fakePublisher));
     ;
 }
开发者ID:jjvdangelo,项目名称:EventStore,代码行数:12,代码来源:when_creating_an_emitted_stream.cs


示例9: SetUp

 public void SetUp()
 {
     _bus = new FakePublisher();
     _manager = new TwoPhaseCommitRequestManager(_bus, 2, 2);
     _correlationID = Guid.NewGuid();
     _manager.Handle(new ReplicationMessage.WriteRequestCreated(_correlationID,
                                                                new NoopEnvelope(),
                                                                "test-stream",
                                                                -1,
                                                                new Event[0]));
     _prepareAck = new ReplicationMessage.PrepareAck(_correlationID, 0, PrepareFlags.TransactionBegin | PrepareFlags.TransactionEnd);
     _commitAck = new ReplicationMessage.CommitAck(_correlationID, 0, 0);
 }
开发者ID:vishal-h,项目名称:EventStore-1,代码行数:13,代码来源:two_pc_manager_should.cs


示例10: Setup

 public void Setup()
 {
     Publisher = new FakePublisher();
     Envelope = new FakeEnvelope();
     Manager = OnManager(Publisher);
     foreach(var m in WithInitialMessages())
     {
         Manager.AsDynamic().Handle(m);
     }
     Publisher.Messages.Clear();
     Manager.AsDynamic().Handle(When());
     Produced = new List<Message>(Publisher.Messages);
 }
开发者ID:Kristinn-Stefansson,项目名称:EventStore,代码行数:13,代码来源:RequestManagerSpecification.cs


示例11: setup

 public void setup()
 {
     _publisher = new FakePublisher();
     _readyHandler = new TestMessageHandler<ProjectionMessage.Projections.ReadyForCheckpoint>();
     _stream = new EmittedStream("test", _publisher, _readyHandler, false, 50);
     try
     {
         _stream.Checkpoint();
     }
     catch (Exception ex)
     {
         _caughtException = ex;
     }
 }
开发者ID:vishal-h,项目名称:EventStore-1,代码行数:14,代码来源:a_checkpoint_requested_on_a_non_started_stream.cs


示例12: setup

 public void setup()
 {
     _timeProvider = new FakeTimeProvider();
     _queues = new Dictionary<Guid, IPublisher> {{Guid.NewGuid(), new FakePublisher()}};
     _timeoutSchedulers = ProjectionCoreWorkersNode.CreateTimeoutSchedulers(_queues.Count);
     var fakePublisher = new FakePublisher();
     new ProjectionCoreCoordinator(
         ProjectionType.All, 
         _timeoutSchedulers,
         _queues.Values.ToArray(),
         fakePublisher,
         new NoopEnvelope());
     _ioDispatcher = new IODispatcher(fakePublisher, new PublishEnvelope(fakePublisher));
 }
开发者ID:EventStore,项目名称:EventStore,代码行数:14,代码来源:when_creating_projection_manager.cs


示例13: setup

 public void setup()
 {
     _publisher = new FakePublisher();
     _readyHandler = new TestCheckpointManagerMessageHandler();;
     _stream = new EmittedStream("test", CheckpointTag.FromPosition(0, -1), _publisher, _readyHandler, 50);
     try
     {
         _stream.Checkpoint();
     }
     catch (Exception ex)
     {
         _caughtException = ex;
     }
 }
开发者ID:robashton,项目名称:EventStore,代码行数:14,代码来源:a_checkpoint_requested_on_a_non_started_stream.cs


示例14: setup

        public void setup()
        {
            _checkpointUnhandledBytesThreshold = 1000;
            Given();
            _bus = new FakePublisher();
            _projectionCorrelationId = Guid.NewGuid();
            _eventHandler = new TestMessageHandler<ProjectionMessage.Projections.CommittedEventReceived>();
            _checkpointHandler = new TestMessageHandler<ProjectionMessage.Projections.CheckpointSuggested>();
            _subscription = new ProjectionSubscription(
                _projectionCorrelationId, CheckpointTag.FromPosition(0, -1), _eventHandler, _checkpointHandler,
                CreateCheckpointStrategy(), _checkpointUnhandledBytesThreshold);

            When();
        }
开发者ID:ninjaferret,项目名称:EventStore,代码行数:14,代码来源:TestFixtureWithProjectionSubscription.cs


示例15: setup

        public void setup()
        {
            _checkpointUnhandledBytesThreshold = 1000;
            Given();
            _bus = new FakePublisher();
            _projectionCorrelationId = Guid.NewGuid();
            _eventHandler = new TestHandler<ProjectionSubscriptionMessage.CommittedEventReceived>();
            _checkpointHandler = new TestHandler<ProjectionSubscriptionMessage.CheckpointSuggested>();
            _progressHandler = new TestHandler<ProjectionSubscriptionMessage.ProgressChanged>();
            _eofHandler = new TestHandler<ProjectionSubscriptionMessage.EofReached>();
            _checkpointStrategy = CreateCheckpointStrategy();
            _subscription = CreateProjectionSubscription();


            When();
        }
开发者ID:base31,项目名称:geteventstore_EventStore,代码行数:16,代码来源:TestFixtureWithProjectionSubscription.cs


示例16: SetUp

        public void SetUp()
        {
            _bus = new FakePublisher();
            _manager = new TwoPhaseCommitRequestManager(_bus, 2, 2);

            _correlationID = Guid.NewGuid();

            _manager.Handle(new ReplicationMessage.WriteRequestCreated(
                                _correlationID,
                                new NoopEnvelope(),
                                "test-stream",
                                -1,
                                new[]
                                {
                                    new Event(Guid.NewGuid(), "test-event-type", false,  null, null),
                                    new Event(Guid.NewGuid(), "test-event-type", false,  null, null),
                                    new Event(Guid.NewGuid(), "test-event-type", false,  null, null)
                                }));
        }
开发者ID:vishal-h,项目名称:EventStore-1,代码行数:19,代码来源:when_writing_transactions.cs


示例17: setup

 public void setup()
 {
     _fakePublisher = new FakePublisher();
     _ioDispatcher = new IODispatcher(_fakePublisher, new PublishEnvelope(_fakePublisher));
 }
开发者ID:thinkbeforecoding,项目名称:EventStore,代码行数:5,代码来源:when_creating_an_emitted_stream.cs


示例18: OnManager

 protected override TwoPhaseRequestManagerBase OnManager(FakePublisher publisher)
 {
     return new DeleteStreamTwoPhaseRequestManager(publisher, 3, 3, PrepareTimeout, CommitTimeout);
 }
开发者ID:jjvdangelo,项目名称:EventStore,代码行数:4,代码来源:when_delete_stream_gets_commit_timeout_before_commit_stage.cs


示例19: OnManager

 protected override TwoPhaseRequestManagerBase OnManager(FakePublisher publisher)
 {
     return new WriteStreamTwoPhaseRequestManager(publisher, 3, 3);
 }
开发者ID:soto,项目名称:EventStore,代码行数:4,代码来源:when_write_stream_completes_successfully.cs


示例20: OnManager

 protected override TwoPhaseRequestManagerBase OnManager(FakePublisher publisher)
 {
     return new TransactionCommitTwoPhaseRequestManager(publisher, 3, 3);
 }
开发者ID:soto,项目名称:EventStore,代码行数:4,代码来源:when_transaction_commit_completes_successfully.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Chunks.TFChunkDb类代码示例发布时间:2022-05-24
下一篇:
C# Tcp.TcpPackage类代码示例发布时间: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