Exemple #1
0
        public SyncCloudAgent(string url, UserIdentity identity, string channelId, uint updateInterval, uint timeout)
        {
            Url            = url;
            Identity       = identity;
            UpdateInterval = updateInterval;
            Timeout        = timeout;

            _good              = true;
            _authentication    = new Authentication(url);
            _connectionManager = new ConnectionManager()
            {
                HostUrl = url
            };

            _channelControllerAdapter = new MasterChannelControllerAdapter(this, channelId)
            {
                ConnectionManager = _connectionManager
            };

            _commandExecutor  = new MasterCommandExecutor(_channelControllerAdapter);
            _channelHeartbeat = new MasterChannelHeartbeat(_channelControllerAdapter, _commandExecutor, updateInterval, timeout);

            RegisterEvents();
        }
 public MasterCommandExecutor(MasterChannelControllerAdapter adapter)
     : base(adapter.ConnectionManager, adapter.WsChannelId, adapter.WsChannelName, adapter.ChannelId, adapter.User.Identity)
 {
     _channelControllerAdapter = adapter;
 }