Esempio n. 1
0
 /// <summary>
 /// Aborts the request
 /// </summary>
 public void Abort()
 {
     if (this.proxy != null)
     {
         proxy.Abort();
     }
 }
Esempio n. 2
0
        public async Task <List <Agent> > DeleteAgentAsync(List <Agent> listAgent)
        {
            List <Agent> result = new List <Agent>();

            try
            {
                result = (await _channel.delete_data_agentAsync(_companyName, listAgent.AgentTypeToArray())).ArrayTypeToAgent();
            }
            catch (FaultException) { Dispose(); throw; }
            catch (CommunicationException) { _channel.Abort(); throw; }
            catch (TimeoutException) { _channel.Abort(); }
            return(result);
        }
Esempio n. 3
0
        public async Task <Agent> AuthenticateUserAsync(string username, string password, string licenseKey)
        {
            Agent agentFound = new Agent();

            try
            {
                AgentQOBD[] agentArray = await _channel.get_authenticated_userAsync(_companyName, username, password);

                agentFound = agentArray.ArrayTypeToAgent().FirstOrDefault();
            }
            catch (FaultException) { Dispose(); throw; }
            catch (CommunicationException) { _channel.Abort(); throw; }
            catch (TimeoutException) { _channel.Abort(); }
            return(agentFound);
        }
Esempio n. 4
0
        public async Task <List <Client> > InsertClientAsync(List <Client> clientList)
        {
            List <Client> result = new List <Client>();

            try
            {
                result = (await _channel.insert_data_clientAsync(_companyName, clientList.ClientTypeToArray())).ArrayTypeToClient();
            }
            catch (FaultException) { Dispose(); throw; }
            catch (CommunicationException) { _channel.Abort(); throw; }
            catch (TimeoutException) { _channel.Abort(); }
            return(result);
        }
Esempio n. 5
0
        public async Task <List <Statistic> > InsertStatisticAsync(List <Statistic> statisticList)
        {
            List <Statistic> result = new List <Statistic>();

            try
            {
                result = (await _channel.insert_data_statisticAsync(_companyName, statisticList.StatisticTypeToArray())).ArrayTypeToStatistic();
            }
            catch (FaultException) { Dispose(); throw; }
            catch (CommunicationException) { _channel.Abort(); throw; }
            catch (TimeoutException) { _channel.Abort(); }
            return(result);
        }
Esempio n. 6
0
        public async Task <List <Item> > InsertItemAsync(List <Item> itemList)
        {
            List <Item> result = new List <Item>();

            try
            {
                result = (await _channel.insert_data_itemAsync(_companyName, itemList.ItemTypeToArray())).ArrayTypeToItem();
            }
            catch (FaultException) { Dispose(); throw; }
            catch (CommunicationException) { _channel.Abort(); throw; }
            catch (TimeoutException) { _channel.Abort(); }
            return(result);
        }
Esempio n. 7
0
        public async Task <List <Info> > DeleteInfoAsync(List <Info> listInfos)
        {
            List <Info> result = new List <Info>();

            try
            {
                result = (await _channel.delete_data_infosAsync(_companyName, listInfos.InfosTypeToArray())).ArrayTypeToInfos();
            }
            catch (FaultException) { Dispose(); throw; }
            catch (CommunicationException) { _channel.Abort(); throw; }
            catch (TimeoutException) { _channel.Abort(); }
            return(result);
        }
Esempio n. 8
0
        // discussion
        #region [ Discussion ]
        public async Task <List <Discussion> > DeleteDiscussionAsync(List <Discussion> listDiscussion)
        {
            List <Discussion> result = new List <Discussion>();

            try
            {
                result = (await _channel.delete_data_discussionAsync(_companyName, listDiscussion.DiscussionTypeToArray())).ArrayTypeToDiscussion();
            }
            catch (FaultException) { Dispose(); throw; }
            catch (CommunicationException) { _channel.Abort(); throw; }
            catch (TimeoutException) { _channel.Abort(); }
            return(result);
        }
Esempio n. 9
0
        public async Task <List <Order> > InsertOrderAsync(List <Order> orderList)
        {
            List <Order> result = new List <Order>();

            try
            {
                result = (await _channel.insert_data_orderAsync(_companyName, orderList.OrderTypeToArray())).ArrayTypeToOrder();
            }
            catch (FaultException) { Dispose(); throw; }
            catch (CommunicationException) { _channel.Abort(); throw; }
            catch (TimeoutException) { _channel.Abort(); }
            return(result);
        }