Esempio 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;
            }));
        }
Esempio 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};
		}
Esempio 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;
			});
		}