public void BindWithPullDelivery( Uri listeningResourceUri, string dialect, Type filterType, IEventingRequestHandler eventSource, Uri deliveryResourceUri ) { PullDeliverySubscriptionManager enumHandler = new PullDeliverySubscriptionManager(deliveryResourceUri.ToString(), _pullDeliveryServer, eventSource); _filterMap.Bind(dialect, filterType); _enumHandlers[new HandlerMapKey(listeningResourceUri.ToString(), dialect)] = enumHandler; }
public void BindWithPullDelivery( Uri listeningResourceUri, string dialect, Type filterType, IEventingRequestHandler eventSource, Uri deliveryResourceUri ) { PullDeliverySubscriptionManager enumHandler = new PullDeliverySubscriptionManager(deliveryResourceUri.ToString(), _pullDeliveryServer, eventSource); _filterMap.Bind(dialect, filterType); _enumHandlers[new HandlerMapKey(listeningResourceUri.ToString(), dialect)] = enumHandler; }
public PullDeliverySubscriptionManager(string deliveryResourceUri, EventingPullDeliveryServer deliveryServer, IEventingRequestHandler handler) { Type eventingRequestHandlerGenericInterface = handler.GetType().GetInterface(typeof (IEventingRequestHandler<>).Name); if (eventingRequestHandlerGenericInterface == null) { throw new InvalidOperationException("Eventing request handler must implement generic version of IEventingRequestHandler interface."); } _eventType = eventingRequestHandlerGenericInterface.GetGenericArguments()[0]; _deliveryResourceUri = deliveryResourceUri; _handler = handler; _deliveryServer = deliveryServer; }
public PullDeliverySubscriptionManager(string deliveryResourceUri, EventingPullDeliveryServer deliveryServer, IEventingRequestHandler handler) { Type eventingRequestHandlerGenericInterface = handler.GetType().GetInterface(typeof(IEventingRequestHandler <>).Name); if (eventingRequestHandlerGenericInterface == null) { throw new InvalidOperationException("Eventing request handler must implement generic version of IEventingRequestHandler interface."); } _eventType = eventingRequestHandlerGenericInterface.GetGenericArguments()[0]; _deliveryResourceUri = deliveryResourceUri; _handler = handler; _deliveryServer = deliveryServer; }
public void If_pull_returns_no_items_exception_is_thrown() { IEventingRequestHandler <int> mockHandler = MockRepository.GenerateMock <IEventingRequestHandler <int> >(); OperationContextProxy.Dummy.LocalAddress = ResourceUri; EventingServer server = new EventingServer(); server.BindWithPullDelivery(ResourceUri, FilterMap.DefaultDialect, typeof(void), mockHandler, ResourceUri); SubscribeResponse subscribeResponse = server.Subscribe(ResourceUri.ToString(), null, new SubscribeRequest { Delivery = Delivery.Pull(), Expires = Expires.FromTimeSpan(TimeSpan.Zero) }); server.Pull(new PullRequest { EnumerationContext = subscribeResponse.EnumerationContext, }); }
public Subscription(Expires expires, IEventingRequestHandler requestHandler, object filterInstance, EndpointReference subscriptionManagerReference, IIncomingHeaders incomingHeaders) { _handlerSubscription = requestHandler.Subscribe(this, filterInstance, subscriptionManagerReference, incomingHeaders); Renew(expires); }
public EventingServer(IEventingRequestHandler requestHandler) { _requestHandler = requestHandler; }
public void BindPullEventing(Uri resourceUri, string dialect, Type filterType, IEventingRequestHandler eventingRequestHandler, Uri deliveryResourceUri) { _filterMap.Bind(dialect, filterType); _pullRoutingTable[deliveryResourceUri.ToString()] = _pullDeliveryServer.Pull; _eventingServer.BindWithPullDelivery(resourceUri, dialect, filterType, eventingRequestHandler, deliveryResourceUri); }
public Subscription(Expires expires, IEventingRequestHandler requestHandler, object filterInstance, EndpointReference subscriptionManagerReference, IIncomingHeaders incomingHeaders) { _handlerSubscription = requestHandler.Subscribe(this, filterInstance, subscriptionManagerReference, incomingHeaders); Renew(expires); }
public EventingServer(IEventingRequestHandler requestHandler) { _requestHandler = requestHandler; }