Exemplo n.º 1
0
            public void when()
            {
                _handler = new ByCorrelationId("", Console.WriteLine);
                _handler.Initialize();
                string sharedState;

                _result = _handler.ProcessEvent(
                    "", CheckpointTag.FromPosition(0, 200, 150), null,
                    new ResolvedEvent(
                        "cat1-stream1", 10, "cat1-stream1", 10, false, new TFPos(200, 150), Guid.NewGuid(),
                        "event_type", true, "{}", "{}"), out _state, out sharedState, out _emittedEvents);
            }
Exemplo n.º 2
0
            public void when()
            {
                _handler = new ByCorrelationId("", Console.WriteLine);
                _handler.Initialize();
                _dateTime = DateTime.UtcNow;
                string sharedState;

                var dataBytes     = Encoding.ASCII.GetBytes("10@cat1-stream1");
                var metadataBytes = Encoding.ASCII.GetBytes("{\"$correlationId\":\"testing2\", \"$whatever\":\"hello\"}");
                var myEvent       = new ResolvedEvent("cat2-stream2", 20, "cat2-stream2", 20, true, new TFPos(200, 150), new TFPos(200, 150), Guid.NewGuid(), "$>", true, dataBytes, metadataBytes, null, null, _dateTime);

                _eventId = myEvent.EventId;
                _result  = _handler.ProcessEvent(
                    "", CheckpointTag.FromPosition(0, 200, 150), null,
                    myEvent, out _state, out sharedState, out _emittedEvents);
            }
Exemplo n.º 3
0
            public void when()
            {
                _handler = new ByCorrelationId("", Console.WriteLine);
                _handler.Initialize();
                _dateTime = DateTime.UtcNow;
                var dataBytes     = Encoding.ASCII.GetBytes("{}");
                var metadataBytes = Encoding.ASCII.GetBytes("{\"$correlationId\":\"testing1\"}");

                string sharedState;

                _result = _handler.ProcessEvent(
                    "", CheckpointTag.FromPosition(0, 200, 150), null,
                    new ResolvedEvent(
                        "cat1-stream1", 10, "cat1-stream1", 10, false, new TFPos(200, 150), new TFPos(200, 150), Guid.NewGuid(),
                        "event_type", true, dataBytes, metadataBytes, null, null, _dateTime), out _state, out sharedState, out _emittedEvents);
            }