public void Setup()
        {
            _subject = new Subject <string>();

            var options = new StreamDbContextOptionsBuilder()
                          .UseInMemoryStream(_subject.AsQbservable())
                          .Options;

            _sut = new StreamDbContext(options);
        }
        public void Setup()
        {
            _subject = new Subject <string>();

            _mockHttp = new MockHttpMessageHandler();
            var client = new HttpClient(_mockHttp);

            var options = new StreamDbContextOptionsBuilder()
                          .UseGrpcStream("http://some-host")
                          .Options;

            _sut = new StreamDbContext(options);
        }
Example #3
0
        static async Task Main(string[] args)
        {
            var types = new[] { typeof(TestEvent) };

            var options = new StreamDbContextOptionsBuilder()
                          .UseGrpcStream("127.0.0.1:5001")
                          .RegisterTypes(() => types)
                          .Options;

            var es = new StreamDbContext(options);

            var orderEvents = es.FromAll <TestEvent>()
                              .Subscribe(
                onNext: s => Console.WriteLine(JsonConvert.SerializeObject(s)),
                onError: e => Console.WriteLine("ERROR: " + e),
                onCompleted: () => Console.WriteLine("DONE")
                );

            while (!Console.KeyAvailable && Console.ReadKey(true).Key != ConsoleKey.Escape)
            {
                await Task.Delay(50);
            }
        }
Example #4
0
 public ApiPrizeController(StreamDbContext DbContext)
 {
     _dbContext = DbContext;
 }
 public HomeController(StreamDbContext context)
 {
     _context = context;
 }
Example #6
0
 public ApiCaptionController(StreamDbContext DbContext)
 {
     _dbContext = DbContext;
 }