public RedisWampWebSocketHandler(ISynchronizationPolicy syncPoly, IRoleDescriber roleDescriber) : this(
         ConfigurationManager.AppSettings.Get("Redis.Endpoint"),
         ConfigurationManager.AppSettings.Get("Redis.Key"),
         ConfigurationManager.AppSettings.Get("Redis.UseSsl"),
         syncPoly, roleDescriber
         )
 {
 }
Exemplo n.º 2
0
        protected WampWebSocketHandler(ISynchronizationPolicy synchronizationPolicy, IRoleDescriber roleDescriber)
        {
            this.roleDescriber    = roleDescriber;
            SynchronizationPolicy = synchronizationPolicy;

            //Hello += OnHello;


            if (SynchronizationPolicy != null && SynchronizationPolicy.Synchronize)
            {
                Configure(SynchronizationPolicy.Endpoints);
                Subscribe   += OnLocalSubscribe;
                Unsubscribe += OnLocalUnsubscribe;
            }
        }
 public RedisWampWebSocketHandler(string endpoint, string key, string useSsl, ISynchronizationPolicy syncPoly,
                                  IRoleDescriber roleDescriber) :
     base(syncPoly, roleDescriber)
 {
     cache.Initialize(
         new Dictionary <string, string>
     {
         { "Endpoint", endpoint },
         { "Key", key },
         { "UseSsl", useSsl }
     });
     cache.MessageReceived += OnMessageReceived;
     Subscribe             += OnSubscribe;
     Unsubscribe           += OnUnsubscribe;
     Publish += OnPublish;
     Event   += OnEvent;
 }
        public ServiceBusWampWebSocketHandler(ISynchronizationPolicy synchronizationPolicy, IRoleDescriber roleDescriber)
            :
            base(synchronizationPolicy, roleDescriber)
        {
            namespaceManager = NamespaceManager.CreateFromConnectionString(connectionString);

            Subscribe   += OnSubscribe;
            Unsubscribe += OnUnsubscribe;
            Publish     += OnPublish;
            Event       += OnEvent;
        }