/// <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)); }
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; }
public static readonly object[] EmptyString = {}; // used as empty parameter. public DaemonClient(IDaemonConfig daemonConfig, ICoinConfig coinConfig, IRpcExceptionFactory rpcExceptionFactory) : base(daemonConfig, coinConfig, rpcExceptionFactory) { }
/// <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); }
/// <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); }
public static readonly object[] EmptyString = {}; // used as empty parameter. #endregion Fields #region Constructors public DaemonClient(string pool, IDaemonConfig daemonConfig) : base(pool, daemonConfig) { }