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


C# Fakes.FakePublisher类代码示例

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


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


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