Example #1
0
 private static async Task <Res> Execute(SoapClient client, string endpoint, Req request)
 {
     if (string.IsNullOrEmpty(endpoint))
     {
         throw new ArgumentException("The provided endpoint is empty. Please specify a valid endpoint name to execute the operation.", "endpoint");
     }
     if (client == null)
     {
         throw new ArgumentException("The provided client reference is null. Please specify a client reference to execute the operation.", "client");
     }
     if (request == null)
     {
         throw new ArgumentException("The provided request is null. Please provide a valid request reference to execute the operation.", "request");
     }
     // execute the request as the checks before should ensure all parameters are at least set.
     return(await client.RequestAsync <Res, Req>(endpoint, request));
 }
Example #2
0
 /// <summary>
 /// executes the <see cref="SoapOperation{Req, Res, Self}"/> using the <see cref="Req"/> reference provided as a parameter using the given <see cref="SoapClient"/>
 /// </summary>
 /// <param name="client">The soap client the operation is executed on.</param>
 /// <param name="request">The <see cref="Req"/> used for this operations execution.</param>
 /// <returns>The <see cref="Res"/> instance received from the web services' response.</returns>
 public static async Task <Res> Execute(SoapClient client, Req request)
 {
     return(await Execute(client, Instance.Endpoint, request));
 }
Example #3
0
        /// <summary>
        /// executes the <see cref="SoapOperation{Req, Res, Self}"/> using the <see cref="Req"/> reference set by the property using the given <see cref="SoapClient"/>
        /// </summary>
        /// <param name="client">The soap client the operation is executed on.</param>
        /// <returns>The <see cref="Res"/> instance received from the web services' response.</returns>
        public async Task <Res> Execute(SoapClient client)
        {
            this.Response = await Execute(client, this.Endpoint, this.Request);

            return(this.Response);
        }