コード例 #1
0
        private List <AgentVm> GetAgents(LocationRequest locRequest)
        {
            var req                = new AgentsRequest();
            var header             = new MoneyGram.PartnerService.DomainModel.Header();
            var processInstruction = new MoneyGram.PartnerService.DomainModel.ProcessingInstruction();

            req.header = header;
            req.header.ProcessingInstruction = processInstruction;

            req.AgentId = Convert.ToDecimal(locRequest.StoreNameNumberAgentId);
            req.header.ProcessingInstruction.Action = "GetAgents";
            req.AgentIdSpecified = true;
            req.AgentName        = locRequest.AgentName ?? string.Empty;
            req.City             = locRequest.City ?? string.Empty;
            req.State            = locRequest.State ?? string.Empty;
            req.StateCode        = locRequest.StateCode ?? string.Empty;
            req.Country          = locRequest.Country ?? string.Empty;
            req.ZipCode          = locRequest.ZipCode ?? string.Empty;
            req.Phone            = locRequest.Phone ?? string.Empty;
            req.HierarchyLevel   = locRequest.HierarchyLevel;
            //req.HierarchyLevelSpecified = (locationReqVm.HierarchyLevelSpecified == null ? true : locationReqVm.HierarchyLevelSpecified);

            var contentAgentsResponse = _partnerIntegration.GetAgents(req);

            return(contentAgentsResponse.ToVm().Agents);
        }
コード例 #2
0
        public AgentsResponse GetAgents(AgentsRequest agentsRequest)
        {
            Task <AgentsResponse> task = Task.Run(() => this.GetAgentsAsync(agentsRequest));

            task.Wait();

            return(task.Result);
        }
コード例 #3
0
        /// <summary>
        /// Returns AgentsResponse for the PartnerService Request...
        /// </summary>
        /// <param name="agentsRequest">agentsRequest</param>
        /// <returns>AgentsResponse</returns>
        public async Task <AgentsResponse> GetAgentsAsync(AgentsRequest agentsRequest)
        {
            agentsRequest.ThrowIfNull(nameof(agentsRequest));

            var agentsResponse = await PartnerServiceProxyFactory.UseService(service => service.getAgentsAsync(agentsRequest.ToAgentsRequest1Service()));

            return(agentsResponse.getAgentsResponse.ToDomain());
        }
コード例 #4
0
 private void RequestAgentsForChatServers()
 {
     AgentsRequest req = new AgentsRequest(_sm.LocalUser.ServerJID);
     _sm.BeginSend(req.ToPacket, new AsyncCallback(AgentsCompleteCallback));
 }
コード例 #5
0
 public virtual AgentsResponse GetAgents(AgentsRequest agentsRequest)
 {
     return(_partnerService.GetAgents(agentsRequest));
 }
コード例 #6
0
 public Task <AgentsResponse> GetAgentsAsync(AgentsRequest agentsRequest)
 {
     return(_partnerService.GetAgentsAsync(agentsRequest));
 }
コード例 #7
0
 public AgentsResponse GetAgents(AgentsRequest agentsRequest)
 {
     return(_partnerServiceRepository.GetAgents(agentsRequest));
 }