public ClientController(IConfiguration configuration, IClientServices clientServices, IMapper mapper, LinkGenerator linkGenerator)
 {
     Configuration  = configuration;
     ClientServices = clientServices;
     Mapper         = mapper;
     LinkGenerator  = linkGenerator;
 }
 public ClientController(IClientServices clienteServices, IBankAccountServices bankAccountServices, IAccountMovementServices accountMovementServices, IMapper mapper)
 {
     this.clienteServices         = clienteServices;
     this.bankAccountServices     = bankAccountServices;
     this.accountMovementServices = accountMovementServices;
     this.mapper = mapper;
 }
        public virtual void Initialize(IClientServices services)
        {
            this.Services = services;

            var children = this.GetChildren();

            foreach (var memoEdit in children.OfType <QA.Shared.Controls.MemoEdit>())
            {
                memoEdit.Initialize(services);
                memoEdit.Process();
            }

            foreach (var comboBox in children.OfType <QA.Shared.Controls.ComboBox>())
            {
                comboBox.Initialize(services);
                comboBox.Process();
            }



            //foreach (var control in children.OfType<QA.Controls.QAPractice.ICDCode>())
            //{
            //    control.Initialize(services);
            //    control.Process();
            //}

            //foreach (var control in children.OfType<QA.Controls.QAPractice.ICDName>())
            //{
            //    control.Initialize(services);
            //    control.Process();
            //}
        }
Exemple #4
0
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member 'ClientController.ClientController(IClientServices, ILogger<ClientController>)'
        public ClientController(IClientServices clientServices,
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member 'ClientController.ClientController(IClientServices, ILogger<ClientController>)'
                                ILogger <ClientController> logger)
        {
            _clientServices = clientServices;
            _logger         = logger;
        }
Exemple #5
0
 public ClientController(IClientServices clientServices,
                         IEventServices eventServices,
                         IMapper mapper)
 {
     _clientServices = clientServices;
     _eventServices  = eventServices;
     _mapper         = mapper;
 }
 public OrderController(IFullUserServices fullUserServices, IWorkerServices workerServices, IClientServices clientServices, IOrderServices orderServices, IOrderInfoServise orderInfoServise)
 {
     _fullUserServices = fullUserServices;
     _workerServises   = workerServices;
     _clientServices   = clientServices;
     _orderServices    = orderServices;
     _orderInfoServise = orderInfoServise;
 }
 public FuturesReportController(IEmailSender service,
                                IMovementsServices movementsServices,
                                IClientServices clientServices)
 {
     _service          = service;
     _movementServices = movementsServices;
     _clientServices   = clientServices;
 }
Exemple #8
0
 private static void GiveBackResult(Uri uri, MyTuple mt)
 {
     if (Root == true) //Only sends back to client if is ROOT SERVER
     {
         IClientServices obj = (IClientServices)Activator.GetObject(typeof(IClientServices), uri.AbsoluteUri + "MyRemoteClient");
         obj.sink(mt);
     }
 }
Exemple #9
0
 public HomeController(ILogger <HomeController> logger, IProductServices productServices, ICategoryServices categoryServices,
                       IBrandServices brandServices, IClientServices clientServices, UserManager <User> userManager, IMapper mapper)
 {
     _logger           = logger;
     _productServices  = productServices ?? throw new ArgumentNullException(nameof(productServices));
     _categoryServices = categoryServices ?? throw new ArgumentNullException(nameof(categoryServices));
     _brandServices    = brandServices ?? throw new ArgumentNullException(nameof(brandServices));
     _clientServices   = clientServices ?? throw new ArgumentNullException(nameof(brandServices));
     _mapper           = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
 public FuturesController(IClientServices clientServices,
                          IFuturesServices futuresServices,
                          IBankServices bankServices,
                          IFuturesRetireServices futuresRetireServices)
 {
     _clientServices        = clientServices;
     _futuresServices       = futuresServices;
     _bankServices          = bankServices;
     _futuresRetireServices = futuresRetireServices;
 }
Exemple #11
0
 public void sendMessage(string nick, string message)
 {
     foreach (KeyValuePair <string, string> _reg in clients)
     {
         if (_reg.Key != nick)
         {
             service = (IClientServices)Activator.GetObject(typeof(IClientServices), _reg.Value);
             service.receiveMessage(message);
         }
     }
     Log.Print("origin [" + nick + "]   message [" + message + "]");
 }
Exemple #12
0
        public ClientController(IClientServices clientServices,
                                ILogger <ClientController> logger) : base(logger)
        {
            _clientServices = clientServices;
            _logger         = logger;

            var trace = new Models.N.Core.Trace.TraceEventHandler(delegate(object sender, Models.N.Core.Trace.TraceEventArgs e)
            {
                base.Communicator_TraceHandler(sender, e);
            });

            _clientServices.TraceHandler += trace;
        }
Exemple #13
0
        public static void saveError(IClientServices Services, string spName, string paramQuery)
        {
            RequestCollection _query = DataQuery.Create("FW", "ws_Error_Save", new
            {
                ID               = "0",
                Error            = Services.LastError,
                LocalIP          = LocalIPAddress(),
                sPName           = spName,
                spParameterQuery = paramQuery,
                StackTrade       = "",
                StackMessage     = "",
                StackSource      = ""
            });
            DataSet _ds = Services.Execute(_query);

            if (_ds == null)
            {
                UI.ShowError(Services.LastError);
            }
        }
Exemple #14
0
        public static void saveError(IClientServices Services, Exception exception, string FormName)
        {
            UI.ShowError(exception.Message);
            RequestCollection _query = DataQuery.Create("FW", "ws_Error_Save", new
            {
                ID               = "0",
                Error            = Services.LastError + "(" + FormName + ")",
                LocalIP          = LocalIPAddress(),
                sPName           = "",
                spParameterQuery = "",
                exception.StackTrace,
                exception.Message,
                exception.Source
            }); DataSet _ds = Services.Execute(_query);

            if (_ds == null)
            {
                UI.ShowError(Services.LastError);
            }
        }
        public static IEnumerable <string> LoadValues(IClientServices services, string comboName)
        {
            return(null);
            //var comboValues = services.GetInformation("ComboValues") as DataTable;
            //if (comboValues == null)
            //{
            //    var query = DataAccess.DataQuery.Create("QAHosGenericDB", "ws_DOC_ComboValues_List", new
            //    {
            //        FacID = QAFunction.GetFacID(services)
            //    });
            //    var ds = services.Execute(query);
            //    comboValues = ds.FirstTable();
            //    services.SetInformation("ComboValues", comboValues);
            //}

            //var rows = comboValues.Select("ComboName='" + comboName + "'");
            //foreach (var row in rows)
            //{
            //    yield return row.Item("ComboValue");
            //}
        }
Exemple #16
0
        public static string TableCellValue(IClientServices Services, string TableName, string ColumnNameShow, string ColumnNameExpression, string Expression)
        {
            string            value  = "";
            RequestCollection _query = DataQuery.Create("QAHosGenericDB", "ws_GetFieldlValueOfTable", new
            {
                TableName           = TableName,
                FieldNameShow       = ColumnNameShow,
                FieldNameExpression = ColumnNameExpression,
                Expression          = Expression
            });
            DataSet _ds = Services.Execute(_query);

            if (_ds == null)
            {
                UI.ShowError(Services.LastError);
            }

            value = _ds.FirstValue();

            return(value);
        }
 public List <string> LookupByGenderAndAge(string gender, int lowerBound, int upperBound)
 {
     for (int i = 0; i < Config.Instance.NumberOfReplicas; i++)
     {
         string addr;
         lock (indexLock)
         {
             addr = replicas[(serverAddressToCall + i) % Config.Instance.NumberOfReplicas];
         }
         IClientServices obj = (IClientServices)Activator.GetObject(typeof(IClientServices), addr + "/ClientServices");
         if (obj != null)
         {
             try
             {
                 return(obj.LookupByGenderAndAge(gender, lowerBound, upperBound));
             }
             catch (IOException) { }
             catch (SocketException) { }
         }
     }
     throw new ServiceUnavailableException("Unable to contact any server.");
 }
 public Profile GetUserProfile(string userName)
 {
     for (int i = 0; i < Config.Instance.NumberOfReplicas; i++)
     {
         string addr;
         lock (indexLock)
         {
             addr = replicas[(serverAddressToCall + i) % Config.Instance.NumberOfReplicas];
         }
         IClientServices obj = (IClientServices)Activator.GetObject(typeof(IClientServices), addr + "/ClientServices");
         if (obj != null)
         {
             try
             {
                 return(obj.GetProfile(userName));
             }
             catch (IOException) { }
             catch (SocketException) { }
         }
     }
     throw new ServiceUnavailableException("Unable to contact any server.");
 }
 public void SendFriendRequest(FriendRequest fr)
 {
     for (int i = 0; i < Config.Instance.NumberOfReplicas; i++)
     {
         string addr;
         lock (indexLock)
         {
             addr = replicas[(serverAddressToCall + i) % Config.Instance.NumberOfReplicas];
         }
         IClientServices obj = (IClientServices)Activator.GetObject(typeof(IClientServices), addr + "/ClientServices");
         if (obj != null)
         {
             try
             {
                 obj.SendFriendRequest(fr);
                 return;
             }
             catch (IOException) { }
             catch (SocketException) { }
         }
     }
     throw new ServiceUnavailableException("Unable to contact any server.");
 }
 public void CreateProfile(string name, string gender, int age, List <string> interests, string address, int port)
 {
     for (int i = 0; i < Config.Instance.NumberOfReplicas; i++)
     {
         string addr;
         lock (indexLock)
         {
             addr = replicas[(serverAddressToCall + i) % Config.Instance.NumberOfReplicas];
         }
         IClientServices obj = (IClientServices)Activator.GetObject(typeof(IClientServices), addr + "/ClientServices");
         if (obj != null)
         {
             try
             {
                 obj.CreateProfile(name, gender, age, interests, address, port);
                 return;
             }
             catch (IOException) { }
             catch (SocketException) { }
         }
     }
     throw new ServiceUnavailableException("Unable to contact any server.");
 }
 public void Post(Profile user, string msg)
 {
     for (int i = 0; i < Config.Instance.NumberOfReplicas; i++)
     {
         string addr;
         lock (indexLock)
         {
             addr = replicas[(serverAddressToCall + i) % Config.Instance.NumberOfReplicas];
         }
         IClientServices obj = (IClientServices)Activator.GetObject(typeof(IClientServices), addr + "/ClientServices");
         if (obj != null)
         {
             try
             {
                 Post p = new Post(user.UserName, msg);
                 obj.AddPost(p);
                 return;
             }
             catch (IOException) { }
             catch (SocketException) { }
         }
     }
     throw new ServiceUnavailableException("Unable to contact any server.");
 }
 public CommonController(ApplicationDbContext context,
                         IClientServices clientServices)
 {
     _context        = context;
     _clientServices = clientServices;
 }
 public ClientController(ApplicationDbContext context, IClientServices clientServices)
 {
     this.context        = context;
     this.clientServices = clientServices;
 }
Exemple #24
0
 /// <summary>
 /// Método construtor da classe de Authorize
 /// </summary>
 /// <param name="clientServices">Comportamentos de cliente</param>
 /// <param name="logger">Comportamentos de logger</param>
 /// <param name="jwtOptions">IOptions obtém informações do appsettings através da DI e converte para a propriedade de JwtOptions</param>
 public AuthController(IClientServices clientServices, ILogger <AuthController> logger, IOptions <JwtOptions> jwtOptions)
 {
     _clientServices = clientServices;
     _logger         = logger;
     _jwtOptions     = jwtOptions.Value;
 }
Exemple #25
0
 public ClientController(IClientServices clientServices)
 {
     _clientServices = clientServices;
 }
Exemple #26
0
 public ClientController(IClientServices clientServices, ILogger <ClientController> logger)
 {
     _clientServices = clientServices;
     _logger         = logger;
 }
Exemple #27
0
 /// <summary>
 /// Método construtor da controller cliente.
 /// </summary>
 /// <param name="logger">Gravador de logs</param>
 /// <param name="clientServices">Contrato com comportamentos de cliente</param>
 public ClientController(ILogger <ClientController> logger, IClientServices clientServices)
 {
     _logger         = logger;
     _clientServices = clientServices;
 }
 public ClientController(IClientServices clientService)
 {
     _clientService = clientService;
 }
Exemple #29
0
 public RealLifeController(IClientServices clientServices)
 {
     _clientServices = clientServices;
 }
Exemple #30
0
        private static void GiveBackResult(Uri uri, Command mt)
        {
            IClientServices obj = (IClientServices)Activator.GetObject(typeof(IClientServices), uri.AbsoluteUri + "MyRemoteClient");

            obj.sink(mt);
        }