Esempio n. 1
0
        public Form1()
        {
            aFactory = new RpcFactory();
            aService = aFactory.CreateSingleInstanceService <IMyService>(new MyService());
            // Use TCP for the communication.
            // You also can use other protocols e.g. WebSockets.
            IMessagingSystemFactory aMessaging = new TcpMessagingSystemFactory();

            IDuplexInputChannel anInputChannel =
                aMessaging.CreateDuplexInputChannel("tcp://192.168.1.102:8041/");

            // Attach the input channel to the RpcService and start listening.
            aService.AttachDuplexInputChannel(anInputChannel);
            //IS THIS SERVICE MULTITHREADED ?


            InitializeComponent();

            button2.Enabled = false;
            button3.Enabled = true;

            var materialSkinManager = MaterialSkinManager.Instance;

            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme       = MaterialSkinManager.Themes.LIGHT;
            materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE);

            formContext = this; //don't run more than 1 instances of this form
        }
Esempio n. 2
0
        public RpcAddressGenerator(IRpcFactory factory)
        {
            if (factory == null)
            {
                throw new ArgumentNullException(nameof(factory));
            }

            this.factory = factory;
        }
Esempio n. 3
0
        public BlocksRetriever(IConfiguration config, IRpcFactory rpc)
        {
            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            if (rpc == null)
            {
                throw new ArgumentNullException(nameof(rpc));
            }

            this.config = config.GetZcoinSection();
            this.rpc    = rpc;
        }
Esempio n. 4
0
        public IssueTokenController(
            IRpcFactory factory,
            IConfiguration configuration,
            ITransactionConfirmationWatcher watcher,
            IRuleRepository ruleRepository,
            ControllerHelper helper)
        {
            if (factory == null)
            {
                throw new ArgumentNullException(nameof(factory));
            }

            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            if (watcher == null)
            {
                throw new ArgumentNullException(nameof(watcher));
            }

            if (ruleRepository == null)
            {
                throw new ArgumentNullException(nameof(ruleRepository));
            }

            if (helper == null)
            {
                throw new ArgumentNullException(nameof(helper));
            }

            this.factory        = factory;
            this.configuration  = configuration;
            this.watcher        = watcher;
            this.ruleRepository = ruleRepository;
            this.helper         = helper;

            this.zcoinConfig = this.configuration.GetZcoinSection();
            this.apiConfig   = this.configuration.GetApiSection();
        }