Example #1
0
        /// <summary>
        /// Asynchronously calls the FindDnsServices service.
        /// </summary>
        public virtual IAsyncResult BeginFindDnsServices(FindDnsServicesMessage message, AsyncCallback callback, object callbackData)
        {
            try
            {
                // check for bad data.
                if (message == null) throw new ArgumentNullException("message");

                // set the request context.
                SetRequestContext(RequestEncoding.Xml);

                // create handler.
                ProcessRequestAsyncResult result = new ProcessRequestAsyncResult(this, callback, callbackData, 0);
                return result.BeginProcessRequest(SecureChannelContext.Current, message.FindDnsServicesRequest);
            }
            catch (Exception e)
            {
                throw CreateSoapFault(message.FindDnsServicesRequest, e);
            }
        }
Example #2
0
 /// <summary>
 /// The operation contract for the FindDnsServices service.
 /// </summary>
 public virtual FindDnsServicesResponseMessage FindDnsServices(FindDnsServicesMessage request)
 {
     try
     {
         SetRequestContext(RequestEncoding.Xml);
         FindDnsServicesResponse response = (FindDnsServicesResponse)FindDnsServices(request.FindDnsServicesRequest);
         return new FindDnsServicesResponseMessage(response);
     }
     catch (Exception e)
     {
         throw CreateSoapFault(request.FindDnsServicesRequest, e);
     }
 }