Exemplo n.º 1
0
        public MainViewModel(IConfigReaderService configReaderService, ILogService logService, INccService nccService)
        {
            _configReaderService = configReaderService;
            _nccService          = nccService;
            _logService          = logService;

            try
            {
                NCCConfig = configReaderService.ReadNccConfig();
            }
            catch (Exception e)
            {
                _logService.LogError("WRONG CONFIG: " + e.Message);
            }



            BindingOperations.EnableCollectionSynchronization(Logs, _lock);

            if (NCCConfig.DomainSlave == false)
            {
                _nccService.StartListening("127.0.0.1", NCCConfig.ServerPort);
            }
            else
            {
                _nccService.ConnectToNcc("127.0.0.1", NCCConfig.ClientPort, NCCConfig.Name);
                _nccService.StartListening("127.0.0.1", NCCConfig.ServerPort);
            }
        }
Exemplo n.º 2
0
        public RCViewModel(IConfigReaderService configReaderService)
        {
            WindowTitle          = configReaderService.ReadSubnetworkConfig().Name.Remove(0, 2);
            _configReaderService = configReaderService;
            _logService          = new LogService();

            BindingOperations.EnableCollectionSynchronization(Logs, _lock);
        }
        public ManagementService(IConfigReaderService configReaderService, ILogService logService, IObjectSerializerService objectSerializerService)
        {
            _logService = logService;
            _objectSerializerService = objectSerializerService;

            try
            {
                ManagementConfig = configReaderService.ReadFromFile();
            }
            catch (Exception e)
            {
                _logService.LogError("WRONG CONFIG: " + e.Message);
            }
        }
Exemplo n.º 4
0
        public MainViewModel(RCViewModel rcViewModel, IConfigReaderService configReaderService, ILogService logService, IRCService rcService, ICCService ccService, IConnectivityService connectivityService)
        {
            x = rcViewModel;
            _configReaderService = configReaderService;
            _logService          = logService;
            _rcService           = rcService;
            _ccService           = ccService;
            _connectivityService = connectivityService;
            _connectivityService.MessageReceived += OnMessageReceived;
            BindingOperations.EnableCollectionSynchronization(Logs, _lock);

            try
            {
                SubnetworkConfig = configReaderService.ReadSubnetworkConfig();
            }
            catch (Exception e)
            {
                _logService.LogError("WRONG CONFIG: " + e.Message);
            }

            if (SubnetworkConfig.IsDomain)
            {
                _connectivityService.ConnectToNCCorDomain("127.0.0.1", SubnetworkConfig.NCCPort, SubnetworkConfig.Name);
                _connectivityService.StartListening("127.0.0.1", SubnetworkConfig.ServerPort);
            }
            else
            {
                //_cableCloudConnectionService.StartClient("127.0.0.1", SubnetworkConfig.CableCloudPort, SubnetworkConfig.Name);
                _connectivityService.ConnectToNCCorDomain("127.0.0.1", SubnetworkConfig.ClientPort, SubnetworkConfig.Name);
                _connectivityService.StartListening("127.0.0.1", SubnetworkConfig.ServerPort);
            }

            Task.Run(async() =>
            {
                while (true)
                {
                    await CheckList();
                    Thread.Sleep(50);
                }
            });
        }
Exemplo n.º 5
0
 public RCService(IConfigReaderService configReaderService, ILogService logService)
 {
     _subnetworkConfigDto = configReaderService.ReadSubnetworkConfig();
     _logService          = logService;
 }
Exemplo n.º 6
0
 public NccService(ILogService logService, IObjectSerializerService objectSerializerService, IConfigReaderService configReaderService)
 {
     _logService = logService;
     _objectSerializerService = objectSerializerService;
     _nccConfig = configReaderService.ReadNccConfig();
 }
Exemplo n.º 7
0
 public IdentityClientSeeder(IIdentityServerClientService clientService, IConfigReaderService <ClientConfigModel> clientConfigService)
 {
     _clientService       = clientService;
     _clientConfigService = clientConfigService;
 }
        public MainViewModel(ICableCloudConnectionService cableCloudConnectionService, IManagementAgentService managementAgentService, IConfigReaderService configReaderService, ILogService logService, IRoutingService routingService, ILRMService lrmService)
        {
            _cableCloudConnectionService = cableCloudConnectionService;
            _cableCloudConnectionService.PackageReceived += OnPackageReceived;
            _cableCloudConnectionService.MessageReceived += OnMessageReceived;
            _managementAgentService = managementAgentService;
            //_managementAgentService.RowInfoReceived += OnRowInfoReceived;

            _logService                  = logService;
            _routingService              = routingService;
            _lrmService                  = lrmService;
            _lrmService.RowInfoReceived += OnRowInfoReceived;
            _lrmService.MessageReceived += OnMessageReceived;

            NetworkNodeConfig = configReaderService.ReadHostConfig();
            try
            {
                NetworkNodeConfig = configReaderService.ReadHostConfig();
            }
            catch (Exception e)
            {
                _logService.LogError("WRONG CONFIG: " + e.Message);
            }

            BindingOperations.EnableCollectionSynchronization(Logs, _lock);

            StartClients();
            Task.Run(async() =>
            {
                while (true)
                {
                    await CheckList();
                    Thread.Sleep(50);
                }
            });
        }