Esempio n. 1
0
        public Provider(ApiSchema schema, string address, int port, string phone, ITelegramPersist persist)
        {
            _address = address;
            _port = port;
            _phone = phone;
            _persist = persist;
            _formatter = new Formatter();
            Combinator.Setup(schema, _formatter);

            _settings = LoadSettings();

            _connection = new TcpConnection(_address, _port, _formatter);
        }
Esempio n. 2
0
 private void SaveSettings(Settings settings)
 {
     _persist.Save(_phone, settings.AuthKey, settings.NonceNewNonceXor);
 }