示例#1
0
            public void DefineObserver(Uri observerUri, Expression observer, object state)
            {
                UriToReactiveBinder binder = new UriToReactiveBinder();
                var bindingExpr            = binder.BindObserver(observer, observerUri, state);

                ((Expression <Action <IReactive> >)bindingExpr).Compile()(_innerService);
            }
示例#2
0
            public void CreateSubscription(Uri subscriptionUri, Expression subscription, object state)
            {
                UriToReactiveBinder binder = new UriToReactiveBinder();
                var bindingExpr            = binder.BindSubscription(subscription, subscriptionUri, state);

                ((Expression <Func <IReactive, IReactiveQubscription> >)bindingExpr).Compile()(_innerService);
            }
示例#3
0
            public void CreateStream(Uri streamUri, Expression stream, object state)
            {
                UriToReactiveBinder binder = new UriToReactiveBinder();
                var bindingExpr            = binder.BindSubject(stream, streamUri, state);

                Type exprType = bindingExpr.Type;

                Debug.Assert(exprType.IsGenericType);
                Debug.Assert(!exprType.IsGenericTypeDefinition);
                Debug.Assert(exprType.GetGenericTypeDefinition() == typeof(Func <,>));

                Type[] args = exprType.GetGenericArguments();

                _invokeTypedExpressionHelper1.MakeGenericMethod(args[0], args[1]).Invoke(null, new object[] { bindingExpr, _innerService });
            }