/// <summary> /// Initializes a new instance of the object. /// </summary> /// <param name="fullNode">The full node.</param> /// <param name="loggerFactory">Factory to be used to create logger for the node.</param> /// <param name="rpcSettings">The RPC Settings of the full node.</param> public RPCController(IFullNode fullNode, ILoggerFactory loggerFactory, RpcSettings rpcSettings, IRPCClientFactory rpcClientFactory) { Guard.NotNull(fullNode, nameof(fullNode)); Guard.NotNull(loggerFactory, nameof(loggerFactory)); Guard.NotNull(rpcSettings, nameof(rpcSettings)); Guard.NotNull(rpcClientFactory, nameof(rpcClientFactory)); this.fullNode = fullNode; this.logger = loggerFactory.CreateLogger("Impleum.Bitcoin.Fullnode"); this.rpcSettings = rpcSettings; this.rpcClientFactory = rpcClientFactory; }
/// <summary> /// Initializes a new instance of the object. /// </summary> /// <param name="fullNode">The full node.</param> /// <param name="loggerFactory">Factory to be used to create logger for the node.</param> /// <param name="rpcSettings">The RPC Settings of the full node.</param> public RPCController(IFullNode fullNode, ILoggerFactory loggerFactory, RpcSettings rpcSettings, IRPCClientFactory rpcClientFactory) { Guard.NotNull(fullNode, nameof(fullNode)); Guard.NotNull(loggerFactory, nameof(loggerFactory)); Guard.NotNull(rpcSettings, nameof(rpcSettings)); Guard.NotNull(rpcClientFactory, nameof(rpcClientFactory)); this.fullNode = fullNode; this.logger = loggerFactory.CreateLogger(this.GetType().FullName); this.rpcSettings = rpcSettings; this.rpcClientFactory = rpcClientFactory; }
public ClientEntrance(RPCClientRegistry reg) { this.clientReg = reg; this.container = new Container(reg); this.factory = container.GetInstance <IRPCClientFactory>(); }