Exemplo n.º 1
0
        public ConnectionState For(string id, RavenDbApiController controller = null)
        {
            return(connections.GetOrAdd(id, _ =>
            {
                IEventsTransport eventsTransport = null;
                if (controller != null)
                {
                    eventsTransport = new ChangesPushContent(controller);
                }

                var connectionState = new ConnectionState(eventsTransport);
                TimeSensitiveStore.Missing(id);
                return connectionState;
            }));
        }
Exemplo n.º 2
0
		public HttpResponseMessage GetChangesEvents()
		{
			var eventsTransport = new ChangesPushContent(this);
            eventsTransport.Headers.ContentType = new MediaTypeHeaderValue("text/event-stream");
			Database.TransportState.Register(eventsTransport);
			return new HttpResponseMessage {Content = eventsTransport};
		}
Exemplo n.º 3
0
		public ConnectionState For(string id, RavenDbApiController controller = null)
		{
			return connections.GetOrAdd(id, _ =>
			{
				IEventsTransport eventsTransport = null;
				if (controller != null)
					eventsTransport = new ChangesPushContent(controller);
				
				var connectionState = new ConnectionState(eventsTransport);
				TimeSensitiveStore.Missing(id);
				return connectionState;
			});
		}