Ejemplo n.º 1
0
        private MqttCacheTopic(IMqttConnection connection, MqttCacheTopic parent, string level)
        {
            _connection = connection;

            Level  = level;
            Parent = parent;
            Topic  = parent.Topic == null            //i.e. Root
                                ? level
                                : parent.Topic + "/" + level;

            var engine = Run().Replay(1, Scheduler.Immediate);

            _subscription = engine.Connect();
            _status       = engine;
        }
Ejemplo n.º 2
0
        private int _pendingInitializers;         // even if we should have only one concurrent initializer, be safer

        public MqttCache(IMqttConnection connection)
        {
            Root = new MqttCacheTopic(connection);
        }