Пример #1
0
 public async Task <ResultCommandNetworkStatus> ConnectToNetwork(RequestNetworkInformationModel networkInformationModel)
 {
     return(new ResultCommandNetworkStatus()
     {
         IsSuccess = true, Status = "Connected"
     });
 }
        public async Task <ResultCommandNetworkStatus> ConnectToNetwork(RequestNetworkInformationModel networkInformationModel)
        {
            try
            {
                var request     = PrepareRequest("/ConnectToNetwork", Method.POST, networkInformationModel);
                var queryResult = await client.ExecutePostTaskAsync <ResultCommandNetworkStatus>(request);

                if (queryResult.IsSuccessful)
                {
                    return(queryResult.Data);
                }

                return(null);
            }
            catch (Exception e)
            {
                logger.Log(e);
                return(null);
            }
        }