Exemplo n.º 1
0
        public SimpleCanalConnection([NotNull] SimpleCanalOptions options, ILogger <SimpleCanalConnection> logger)
        {
            Check.NotNull(options, nameof(options));

            _options = options;
            _logger  = logger;
            State    = ConnectionState.Closed;
        }
        private SimpleCanalOptions CopyOptions(CanalServerRunningInfo runningInfo)
        {
            var tmpArr = runningInfo.Address.Split(":");
            var op     = new SimpleCanalOptions(tmpArr[0], int.Parse(tmpArr[1]), _options.ClientId)
            {
                Destination    = _options.Destination,
                IdleTimeout    = _options.IdleTimeout,
                LazyParseEntry = _options.LazyParseEntry,
                Password       = _options.Password,
                SoTimeout      = _options.SoTimeout,
                UserName       = _options.UserName
            };

            return(op);
        }