Example #1
0
 public static void TestInitalize()
 {
     InitializeSettings();
     Settings.ApplicationCon = Settings.ApplicationCon.DBConnect(Settings.AppConnectionString);
     _client = new ServicesClient();
     _client.CreateTestCycle("EmployeeApp", "Karthik", "Sam", "1.0", "1.0", "Windows 10");
 }
        static DefaultConnection GetConnectionFromService(ServicesClient services)
        {
            Communicator communicator = (Communicator)services.GetPrivateField("_communicator");
            Session      session      = (Session)communicator.GetPrivateField("_session");

            return(session.GetPrivateProperty <DefaultConnection>("Connection"));
        }
Example #3
0
        public void StandardDownloadTest()
        {
            // TODO: make to a proper unittest
            var client   = new ServicesClient("http://localhost:8080/");
            var provider = new IGDBMetadataProvider(client);

            Assert.IsFalse(provider.GetSupportsIdSearch());
            var search = provider.SearchGames("Quake 3");

            CollectionAssert.IsNotEmpty(search);
            var game = search[0];
            var data = provider.GetGameData(game.Id);

            Assert.IsNotNull(data.GameData);
            Assert.IsNull(data.Icon);
            Assert.IsNotNull(data.Image);
            Assert.IsNotNull(data.GameData.ReleaseDate);
            Assert.IsTrue(string.IsNullOrEmpty(data.BackgroundImage));
            Assert.IsFalse(string.IsNullOrEmpty(data.GameData.Description));
            CollectionAssert.IsNotEmpty(data.GameData.Publishers);
            CollectionAssert.IsNotEmpty(data.GameData.Developers);
            CollectionAssert.IsNotEmpty(data.GameData.Tags);
            CollectionAssert.IsNotEmpty(data.GameData.Genres);
            CollectionAssert.IsNotEmpty(data.GameData.Links);
            CollectionAssert.IsNotEmpty(data.GameData.Publishers);
        }
        /// <summary>Snippet for DeleteServiceAsync</summary>
        public async Task DeleteServiceRequestObjectAsync()
        {
            // Snippet: DeleteServiceAsync(DeleteServiceRequest, CallSettings)
            // Additional: DeleteServiceAsync(DeleteServiceRequest, CancellationToken)
            // Create client
            ServicesClient servicesClient = await ServicesClient.CreateAsync();

            // Initialize request argument(s)
            DeleteServiceRequest request = new DeleteServiceRequest {
                Name = "",
            };
            // Make the request
            Operation <Empty, OperationMetadataV1> response = await servicesClient.DeleteServiceAsync(request);

            // Poll until the returned long-running operation is complete
            Operation <Empty, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync();

            // Retrieve the operation result
            Empty result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <Empty, OperationMetadataV1> retrievedResponse = await servicesClient.PollOnceDeleteServiceAsync(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Empty retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }
        /// <summary>Snippet for UpdateService</summary>
        public void UpdateServiceRequestObject()
        {
            // Snippet: UpdateService(UpdateServiceRequest, CallSettings)
            // Create client
            ServicesClient servicesClient = ServicesClient.Create();
            // Initialize request argument(s)
            UpdateServiceRequest request = new UpdateServiceRequest
            {
                Name           = "",
                Service        = new Service(),
                UpdateMask     = new FieldMask(),
                MigrateTraffic = false,
            };
            // Make the request
            Operation <Service, OperationMetadataV1> response = servicesClient.UpdateService(request);

            // Poll until the returned long-running operation is complete
            Operation <Service, OperationMetadataV1> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            Service result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <Service, OperationMetadataV1> retrievedResponse = servicesClient.PollOnceUpdateService(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Service retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }
Example #6
0
        static async Task Main(string[] args)
        {
            Console.WriteLine("Ropu Load Balancer");
            Console.WriteLine("Copyright (c) Daniel Hughes");
            Console.WriteLine();

            var settingsReader = new CommandLineSettingsReader();
            var settings       = settingsReader.ParseArgs(args);

            if (settings == null)
            {
                return;
            }

            var credentialsProvider = new CredentialsProvider()
            {
                Email    = settings.Email,
                Password = settings.Password
            };
            var webClient    = new RopuWebClient("https://192.168.1.9:5001/", credentialsProvider);
            var groupsClient = new GroupsClient(webClient, new ImageClient(webClient));


            var keysClient           = new KeysClient(webClient, true, encryptionKey => new CachedEncryptionKey(encryptionKey, key => new AesGcmWrapper(key)));
            var packetEncryption     = new PacketEncryption(keysClient);
            var loadBalancerProtocol = new LoadBalancerProtocol(new PortFinder(), 5069, packetEncryption, keysClient);

            var servicesClient = new ServicesClient(webClient, ServiceType.LoadBalancer);

            var controller = new LoadBalancerRunner(keysClient, loadBalancerProtocol, groupsClient, webClient, settings, servicesClient);
            await controller.Run();
        }
Example #7
0
        /// <summary>Snippet for DeleteService</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void DeleteServiceRequestObject()
        {
            // Create client
            ServicesClient servicesClient = ServicesClient.Create();
            // Initialize request argument(s)
            DeleteServiceRequest request = new DeleteServiceRequest {
                Name = "",
            };
            // Make the request
            Operation <Empty, OperationMetadataV1> response = servicesClient.DeleteService(request);

            // Poll until the returned long-running operation is complete
            Operation <Empty, OperationMetadataV1> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            Empty result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <Empty, OperationMetadataV1> retrievedResponse = servicesClient.PollOnceDeleteService(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Empty retrievedResult = retrievedResponse.Result;
            }
        }
        public IActionResult PutServicesClient([FromRoute] int id, [FromBody] ServicesClient servicesClient)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != servicesClient.ServiceClientId)
            {
                return(BadRequest());
            }

            _context.Entry(servicesClient).State = EntityState.Modified;

            try
            {
                _context.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ServicesClientExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(Ok(servicesClient));
        }
Example #9
0
 public Pagamento(DataRowView d, Cliente user, ServicesClient serv)
 {
     InitializeComponent();
     selectedPrenDRow = d;
     service          = serv;
     cliente          = user;
 }
 public OrderFoodForm(MainForm mf, User p)
 {
     InitializeComponent();
     this.mf = mf;
     svcClient = new ServicesClient();
     loadProducts();
     this.u = p;
 }
 public OrderFoodFormClient(User a)
 {
     InitializeComponent();
     this.u = a;
     svcClient = new ServicesClient();
     lofd = new List<OrderFoodData>();
     loadProducts();
 }
Example #12
0
        public static void TestInitialize()
        {
            InitializeSettings("dev");
            Settings.DbConnection = Settings.DbConnection.DBconnect(Settings.DbConnectionString);
            _Client = new ServicesClient();
            _Client.CreateTestCycle("NBTest", "DUARTE", "CARLOS", "1.0", "1.0", "Windows 10");

            NavigateSite();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ServicesClient servicesClient = new ServicesClient();

            DropDownList1.DataSource     = servicesClient.GetUsers();
            DropDownList1.DataValueField = "id";
            DropDownList1.DataTextField  = "userName";
            DropDownList1.DataBind();
        }
Example #14
0
        public Client()
        {
            InitializeComponent();

            Архив        = new DataClient();
            Конфигуратор = new ConfigurationClient();
            Бухгалтерия  = new FinanceClient();
            Сервисы      = new ServicesClient();
            Файлы        = new FileClient();
        }
        static void Main(string[] args)
        {
            ServicesClient client = new ServicesClient();

            client.CreateTestCycle("Test For Mushood", "Mushood", "Jacob", "2.0", "1", "Test Machine");

            client.WriteTestResult("New Feature", "New Scenario", "New Step", "", "PASSED");
            client.WriteTestResult("New Feature", "New Scenario1", "New Step2", "", "PASSED");
            client.WriteTestResult("New Feature", "New Scenario2", "New Step3", "", "FAILED");
        }
Example #16
0
        public About()
        {
            InitializeComponent();

            var pw = Password1.Password;

            /*
             <TextBlock Text="Scene 1: The Greeting"
                       FontWeight="Bold" FontSize="17">
              <LineBreak />
                <Run FontWeight="Bold" FontSize="14"
                     Text="Actor 1:" />
                <Run FontWeight="Normal" FontSize="14"
                     Text="Hello, how are you?" />
              <LineBreak />
              <Run FontWeight="Bold" FontSize="14"
                   Text="Actor 2:" />
              <Run FontWeight="Normal" FontSize="14"
                   Text="I am fine, thank you!" />
            </TextBlock>
             */

               this.Prop = string.Empty;

            var tb = new TextBlock();
            tb.Text = "Navn";
            tb.Inlines.Add(new LineBreak());
            tb.Inlines.Add(new Run(){Text = "Stian"});
            tb.Inlines.Add(new Run(){Text = "Olafsen"});

            service = new ServicesClient();

            service.PingCompleted += (s, p) =>
            {
                Thread.Sleep(500);
                lblWebService.Text = p.Result.Message;
            };

            service.IntendedFaultCompleted += (s, p) =>
            {
                Thread.Sleep(500);
                if (p.Error != null)
                {
                    lblWebServiceFault.Text = p.Error.Message;
                }
            };

            service.UnintendedExceptionCompleted += (s, p) =>
            {
                if (p.Error != null)
                {
                    lblWebServiceException.Text = p.Error.Message;
                }
            };
        }
Example #17
0
 /// <summary>Snippet for GetService</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetServiceRequestObject()
 {
     // Create client
     ServicesClient servicesClient = ServicesClient.Create();
     // Initialize request argument(s)
     GetServiceRequest request = new GetServiceRequest {
         Name = "",
     };
     // Make the request
     Service response = servicesClient.GetService(request);
 }
Example #18
0
        static void Main(string[] args)
        {
            ServicesClient client = new ServicesClient();

            client.CreateTestCycle("TestClient", "Karthik", "Me", "1.0", "1", "Windows 10");

            client.WriteTestResult("FeatureNew", "New Scenario", "Test Step", "", "PASSED");
            client.WriteTestResult("FeatureNew", "New Scenario", "Test Step", "", "PASSED");
            client.WriteTestResult("FeatureNew", "New Scenario", "Test Step", "", "PASSED");
            client.WriteTestResult("FeatureNew", "New Scenario", "Test Step", "", "FAILED");
        }
Example #19
0
        /// <summary>Snippet for GetServiceAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetServiceRequestObjectAsync()
        {
            // Create client
            ServicesClient servicesClient = await ServicesClient.CreateAsync();

            // Initialize request argument(s)
            GetServiceRequest request = new GetServiceRequest {
                Name = "",
            };
            // Make the request
            Service response = await servicesClient.GetServiceAsync(request);
        }
        public IActionResult PostServicesClient([FromBody] ServicesClient servicesClient)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _context.ServicesClient.Add(servicesClient);
            _context.SaveChangesAsync();

            return(CreatedAtAction("GetServicesClient", new { id = servicesClient.ServiceClientId }, servicesClient));
        }
 /// <summary>Snippet for GetService</summary>
 public void GetServiceRequestObject()
 {
     // Snippet: GetService(GetServiceRequest, CallSettings)
     // Create client
     ServicesClient servicesClient = ServicesClient.Create();
     // Initialize request argument(s)
     GetServiceRequest request = new GetServiceRequest {
         Name = "",
     };
     // Make the request
     Service response = servicesClient.GetService(request);
     // End snippet
 }
Example #22
0
        public async Task <IEnumerable <Shipment> > ProcessStatusServicesWeb(Carrier carrier, List <Shipment> shippments, List <ShipmentState> listShipmentState)
        {
            try
            {
                IServiceWebFactory iServiceWebFactory = new TypesServicesWeb();
                ServicesClient     serviceWeb         = new ServicesClient(iServiceWebFactory, carrier, shippments, listShipmentState);

                return(await serviceWeb.ProcessShippment());
            }
            catch (Exception ex) {
                return(null);
            }
        }
        static void Main(string[] args)
        {
            ServiceReference1.ServicesClient client = new ServicesClient();

            //localhost.AuthenticationServices proxy = new AuthenticationServices();
            string a = client.AuthenticateUser("bob", "bob");
            string s = client.AuthenticateUser("this", "sucks");
            //localhost.AuthenticationServices proxy = new AuthenticationServices();
            //proxy.AuthenticateUser(
            //ServiceReference1.IServices proxy = new AuthenticationServices();
            Console.Out.WriteLine("right: " + a + " wrong: " + s);
            Console.ReadLine();
        }
Example #24
0
        public Client(TimeSpan timeout)
        {
            InitializeComponent();

            //для создания timeout создаем новые ссылки
            this.Архив        = new DataClient(DefaultBinding, new EndpointAddress(string.Format(RosService.Client.DefaultEndpointAddress, "Data")));
            this.Бухгалтерия  = new FinanceClient(DefaultBinding, new EndpointAddress(string.Format(RosService.Client.DefaultEndpointAddress, "Finance")));
            this.Конфигуратор = new ConfigurationClient(DefaultBinding, new EndpointAddress(string.Format(RosService.Client.DefaultEndpointAddress, "Configuration")));
            this.Сервисы      = new ServicesClient(DefaultBinding, new EndpointAddress(string.Format(RosService.Client.DefaultEndpointAddress, "Services")));
            this.Файлы        = new FileClient(DefaultStreamingBinding, new EndpointAddress(string.Format(RosService.Client.DefaultStreamingEndpointAddress, "File")));

            CommunicationObjects = new ICommunicationObject[] { Архив, Конфигуратор, Бухгалтерия, Сервисы, Файлы };
            SetTimeout(timeout);
        }
Example #25
0
        public Client()
        {
            InitializeComponent();

            var current = null as ClientHost;

            do
            {
                if (currentService >= maxService)
                {
                    currentService = 0;
                }

                current = _ClientHosts.ElementAtOrDefault(currentService);
                Interlocked.Increment(ref currentService);
            } while (current == null);

            lock (current.lockObj)
            {
                #region NamePipe, Tcp сбрасывать соединение
                switch (Mode)
                {
                case ClientMode.Server:
                case ClientMode.Tcp:
                case ClientMode.NamedPipe:
                {
                    var _time = DateTime.Now;
                    if (current.IdleTimeout <= _time)
                    {
                        current.Dispose();
                        current.IdleTimeout = _time.Add(InactivityTimeout);
                    }
                }
                break;
                }
                #endregion

                if (!current.IsInitialize)
                {
                    current.Dispose();
                    current.Initialize();
                }

                this.Архив        = current.Архив;
                this.Конфигуратор = current.Конфигуратор;
                this.Бухгалтерия  = current.Бухгалтерия;
                this.Сервисы      = current.Сервисы;
                this.Файлы        = current.Файлы;
            }
        }
        public string WCFAuthUser(string weblogon, string password)
        {
            ServiceReference1.ServicesClient client = new ServicesClient();
            //WCFAuthenticationClient client = new WCFAuthenticationClient();

            //localhost.AuthenticationServices proxy = new AuthenticationServices();
            string a = client.AuthenticateUser(weblogon, password);
            //string s = client.AuthenticateUser("this", "sucks");
            //localhost.AuthenticationServices proxy = new AuthenticationServices();
            //proxy.AuthenticateUser(
            //ServiceReference1.IServices proxy = new AuthenticationServices();
            Console.Out.WriteLine("right: " + a);// + " wrong: " + s);
            Console.ReadLine();
            return a;
        }
 private void SendUsageData()
 {
     Task.Factory.StartNew(() =>
     {
         try
         {
             var client = new ServicesClient();
             client.PostUserUsage();
         }
         catch (Exception exc)
         {
             logger.Error(exc, "Failed to post user usage data.");
         }
     });
 }
Example #28
0
        /// <summary>
        /// Exports the PDF and return messenger error
        /// </summary>
        /// <param name="reportID">string</param>
        /// <param name="dataSource">DataSet</param>
        /// <param name="messErr">string</param>
        /// <returns>MemoryStream</returns>
        public MemoryStream ExportPDF(string reportID, DataSet dataSource, ref string messErr)
        {
            ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(IgnoreCertificateErrorHandler);
            ServicesClient client = new ServicesClient();
            MemoryStream   result = client.ExportPDFOutput(reportID, dataSource, ref messErr);

            if (result == null)
            {
                throw new Exception();
            }
            else
            {
                return(result);
            }
        }
        /// <summary>Snippet for GetServiceAsync</summary>
        public async Task GetServiceRequestObjectAsync()
        {
            // Snippet: GetServiceAsync(GetServiceRequest, CallSettings)
            // Additional: GetServiceAsync(GetServiceRequest, CancellationToken)
            // Create client
            ServicesClient servicesClient = await ServicesClient.CreateAsync();

            // Initialize request argument(s)
            GetServiceRequest request = new GetServiceRequest {
                Name = "",
            };
            // Make the request
            Service response = await servicesClient.GetServiceAsync(request);

            // End snippet
        }
Example #30
0
        static async Task Main(string[] args)
        {
            Console.WriteLine("Ropu Serving Node");
            Console.WriteLine("Copyright (c) Daniel Hughes");
            Console.WriteLine();

            var settingsReader = new CommandLineSettingsReader();
            var settings       = settingsReader.ParseArgs(args);

            if (settings == null)
            {
                return;
            }

            var portFinder          = new PortFinder();
            var credentialsProvider = new CredentialsProvider()
            {
                Email    = settings.Email,
                Password = settings.Password
            };
            var webClient        = new RopuWebClient("https://192.168.1.9:5001", credentialsProvider);
            var keysClient       = new KeysClient(webClient, true, encryptionKey => new CachedEncryptionKey(encryptionKey, key => new AesGcmWrapper(key)));
            var packetEncryption = new PacketEncryption(keysClient);

            var mediaProtocol        = new RopuProtocol(portFinder, StartingServingNodePort, packetEncryption, keysClient);
            var loadBalancerProtocol = new LoadBalancerProtocol(portFinder, StartingLoadBalancerPort, packetEncryption, keysClient);
            var serviceDiscovery     = new ServiceDiscovery();

            var groupsClient = new GroupsClient(webClient, new ImageClient(webClient));
            var registra     = new Registra(groupsClient);
            var servingNodes = new ServingNodes(100);
            var groupCallControllerLookup = new GroupCallControllerLookup();

            var servicesClient = new ServicesClient(webClient, ServiceType.ServingNode);

            var servingNodeRunner = new ServingNodeRunner(
                mediaProtocol,
                loadBalancerProtocol,
                serviceDiscovery,
                registra,
                servingNodes,
                groupCallControllerLookup,
                servicesClient,
                keysClient);

            await servingNodeRunner.Run();
        }
        /// <summary>Snippet for ListServicesAsync</summary>
        public async Task ListServicesRequestObjectAsync()
        {
            // Snippet: ListServicesAsync(ListServicesRequest, CallSettings)
            // Create client
            ServicesClient servicesClient = await ServicesClient.CreateAsync();

            // Initialize request argument(s)
            ListServicesRequest request = new ListServicesRequest {
                Parent = "",
            };
            // Make the request
            PagedAsyncEnumerable <ListServicesResponse, Service> response = servicesClient.ListServicesAsync(request);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((Service item) =>
            {
                // Do something with each item
                Console.WriteLine(item);
            });

            // Or iterate over pages (of server-defined size), performing one RPC per page
            await response.AsRawResponses().ForEachAsync((ListServicesResponse page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Service item in page)
                {
                    // Do something with each item
                    Console.WriteLine(item);
                }
            });

            // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
            int            pageSize   = 10;
            Page <Service> singlePage = await response.ReadPageAsync(pageSize);

            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (Service item in singlePage)
            {
                // Do something with each item
                Console.WriteLine(item);
            }
            // Store the pageToken, for when the next page is required.
            string nextPageToken = singlePage.NextPageToken;
            // End snippet
        }
Example #32
0
 public CallControl(
     LoadBalancerProtocol loadBalancerProtocol,
     ServiceDiscovery serviceDiscovery,
     RopuProtocol ropuProtocol,
     ServingNodes servingNodes,
     ServicesClient servicesClient,
     KeysClient keysClient)
 {
     _loadBalancerProtocol = loadBalancerProtocol;
     _loadBalancerProtocol.SetClientMessageHandler(this);
     _serviceDiscovery = serviceDiscovery;
     _ropuProtocol     = ropuProtocol;
     _ropuProtocol.SetMessageHandler(this);
     _servingNodes   = servingNodes;
     _servicesClient = servicesClient;
     _keysClient     = keysClient;
 }
        /// <summary>Snippet for ListServices</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void ListServicesRequestObject()
        {
            // Create client
            ServicesClient servicesClient = ServicesClient.Create();
            // Initialize request argument(s)
            ListServicesRequest request = new ListServicesRequest {
                Parent = "",
            };
            // Make the request
            PagedEnumerable <ListServicesResponse, Service> response = servicesClient.ListServices(request);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (Service item in response)
            {
                // Do something with each item
                Console.WriteLine(item);
            }

            // Or iterate over pages (of server-defined size), performing one RPC per page
            foreach (ListServicesResponse page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Service item in page)
                {
                    // Do something with each item
                    Console.WriteLine(item);
                }
            }

            // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
            int            pageSize   = 10;
            Page <Service> singlePage = response.ReadPage(pageSize);

            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (Service item in singlePage)
            {
                // Do something with each item
                Console.WriteLine(item);
            }
            // Store the pageToken, for when the next page is required.
            string nextPageToken = singlePage.NextPageToken;
        }
Example #34
0
        static async Task Main(string[] args)
        {
            Console.WriteLine("Starting Ropu Call Controller");
            Console.WriteLine("Copyright (c) Daniel Hughes 2018");
            Console.WriteLine();

            var settingsReader = new CommandLineSettingsReader();
            var settings       = settingsReader.ParseArgs(args);

            if (settings == null)
            {
                return;
            }

            var credentialsProvider = new CredentialsProvider()
            {
                Email    = settings.Email,
                Password = settings.Password
            };
            var webClient = new RopuWebClient("https://192.168.1.9:5001", credentialsProvider);

            var portFinder           = new PortFinder();
            var keysClient           = new KeysClient(webClient, true, encryptionKey => new CachedEncryptionKey(encryptionKey, key => new AesGcmWrapper(key)));
            var packetEncryption     = new PacketEncryption(keysClient);
            var ropuProtocol         = new RopuProtocol(portFinder, 9000, packetEncryption);
            var loadBalancerProtocol = new LoadBalancerProtocol(portFinder, StartingControlPort, packetEncryption, keysClient);
            var serviceDiscovery     = new ServiceDiscovery();
            var servingNodes         = new ServingNodes(100);


            var servicesClient = new ServicesClient(webClient, ServiceType.CallController);

            var callControl = new CallControl(
                loadBalancerProtocol,
                serviceDiscovery,
                ropuProtocol,
                servingNodes,
                servicesClient,
                keysClient);

            await callControl.Run();
        }
Example #35
0
 public ServingNodeRunner(
     RopuProtocol mediaProtocol,
     LoadBalancerProtocol loadBalancerProtocol,
     ServiceDiscovery serviceDiscovery,
     Registra registra,
     ServingNodes servingNodes,
     GroupCallControllerLookup groupCallControllerLookup,
     ServicesClient servicesClient,
     KeysClient keysClient)
 {
     _ropuProtocol = mediaProtocol;
     _ropuProtocol.SetMessageHandler(this);
     _loadBalancerProtocol      = loadBalancerProtocol;
     _serviceDiscovery          = serviceDiscovery;
     _registra                  = registra;
     _servingNodes              = servingNodes;
     _groupCallControllerLookup = groupCallControllerLookup;
     _servicesClient            = servicesClient;
     _keysClient                = keysClient;
     loadBalancerProtocol.SetClientMessageHandler(this);
 }
Example #36
0
        public static void TestAsync(DataTable dt, int i)
        {
            string guidString = GetGuidString(dt, i);
            string partString = GetPartString(dt, i);

            //Under Settings, use the following links to either point to production or test
            //production = http://enmiis01.global.nmhg.corp/AEPM_services/Services.svc'
            //test = http://enmdevex.global.nmhg.corp:82/AEPM_services/Services.svc'

            IServices client = new ServicesClient();

            GetMasterResult getResult = client.GetMaster(partString);

            Type objectType = getResult.GetType();
            var xmlSerializer = new XmlSerializer(objectType);
            var memoryStream = new MemoryStream();
            using (var xmlTextWriter =
                new XmlTextWriter(memoryStream, Encoding.Default) { Formatting = Formatting.None })
            {
                xmlSerializer.Serialize(xmlTextWriter, getResult);
                memoryStream = (MemoryStream)xmlTextWriter.BaseStream;
                // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
                new UTF8Encoding().GetString(memoryStream.ToArray());
                memoryStream.Dispose();
                // return xmlText;
            }

            if (getResult.Error == null)
            {
                UpdateFoundPart(guidString, getResult);

                InsertCrossParts(guidString, getResult);
            }
            else
            {
                UpdateFoundNotPart(guidString);
            }
        }
 public ProfileForm(User u)
 {
     InitializeComponent();
     svcClient = new ServicesClient();
     this.u = u;
 }
Example #38
0
        public Licensing.DownloadedSolutionDetails GetDetails()
        {
            try
            {
                var sr = new ServicesClient();
                var ti = sr.GetTitleInfo(AppTitle);
                if (ti == null)
                    return null;
                return ToDownloadedSolutionDetails(ti);

            }
            catch (Exception)
            {
            }
            return null;
        }
Example #39
0
 public ClientLogin()
 {
     InitializeComponent();
     svcClient = new ServicesClient();
 }