コード例 #1
0
        public MoviesSubscription(IEventStream <Movie> eventStream)
        {
            Name = "Subscription";

            AddField(new EventStreamFieldType()
            {
                Name       = "movieCreated",
                Arguments  = new QueryArguments(),
                Type       = typeof(MovieType),
                Resolver   = new FuncFieldResolver <Movie>(ctx => ctx.Source as Movie),
                Subscriber = new EventStreamResolver <Movie>(ctx => eventStream.AsObservable())
            });
        }