예제 #1
0
        /// <summary>
        /// Returns a new instance of daemon client.
        /// </summary>
        /// <returns></returns>
        public IDaemonClient GetDaemonClient(IDaemonConfig daemonConfig, ICoinConfig coinConfig)
        {
            var @params = new NamedParameterOverloads
            {
                { "daemonConfig", daemonConfig },
                { "coinConfig", coinConfig }
            };

            return(_applicationContext.Container.Resolve <IDaemonClient>(@params));
        }
예제 #2
0
        public DaemonBase(IDaemonConfig daemonConfig, ICoinConfig coinConfig, IRpcExceptionFactory rpcExceptionFactory)
        {
            _rpcExceptionFactory = rpcExceptionFactory;
            _logger = LogManager.PacketLogger.ForContext <DaemonClient>().ForContext("Component", coinConfig.Name);

            _timeout = daemonConfig.Timeout * 1000; // set the daemon timeout.

            RpcUrl      = string.Format("http://{0}:{1}", daemonConfig.Host, daemonConfig.Port);
            RpcUser     = daemonConfig.Username;
            RpcPassword = daemonConfig.Password;

            RequestCounter = 0;
        }
예제 #3
0
        public static readonly object[] EmptyString = {}; // used as empty parameter.

        public DaemonClient(IDaemonConfig daemonConfig, ICoinConfig coinConfig, IRpcExceptionFactory rpcExceptionFactory)
            : base(daemonConfig, coinConfig, rpcExceptionFactory)
        {
        }
예제 #4
0
        public static readonly object[] EmptyString = {}; // used as empty parameter.

        public DaemonClient(IDaemonConfig daemonConfig, ICoinConfig coinConfig, IRpcExceptionFactory rpcExceptionFactory)
            : base(daemonConfig, coinConfig, rpcExceptionFactory)
        { }
예제 #5
0
        /// <summary>
        /// Returns a new instance of daemon client.
        /// </summary>
        /// <returns></returns>
        public IDaemonClient GetDaemonClient(IDaemonConfig daemonConfig, ICoinConfig coinConfig)
        {
            var @params = new NamedParameterOverloads
            {
                {"daemonConfig", daemonConfig},
                {"coinConfig", coinConfig}
            };

            return _applicationContext.Container.Resolve<IDaemonClient>(@params);
        }
예제 #6
0
        /// <summary>
        /// Returns a new instance of daemon client.
        /// </summary>
        /// <param name="pool"></param>
        /// <param name="daemonConfig"></param>
        /// <returns></returns>
        public IDaemonClient GetDaemonClient(string pool, IDaemonConfig daemonConfig)
        {
            var @params = new NamedParameterOverloads
            {
                {"pool", pool},
                {"daemonConfig", daemonConfig},
            };

            return _applicationContext.Container.Resolve<IDaemonClient>(@params);
        }
예제 #7
0
        public static readonly object[] EmptyString = {}; // used as empty parameter.

        #endregion Fields

        #region Constructors

        public DaemonClient(string pool, IDaemonConfig daemonConfig)
            : base(pool, daemonConfig)
        {
        }