//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.42
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.42.
// 
#pragma warning disable 1591

namespace edu.jhu.pha.skyservice {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="ImgCutoutSoap", Namespace="http://localhost/")]
    public partial class ImgCutout : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback RevisionsOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetJpegOperationCompleted;
        
        private System.Threading.SendOrPostCallback DimeJpegOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public ImgCutout() {
            this.Url = "http://skyservice.pha.jhu.edu/dr1/ImgCutout/ImgCutout.asmx";
            if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
                this.UseDefaultCredentials = true;
                this.useDefaultCredentialsSetExplicitly = false;
            }
            else {
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        public new string Url {
            get {
                return base.Url;
            }
            set {
                if ((((this.IsLocalFileSystemWebService(base.Url) == true) 
                            && (this.useDefaultCredentialsSetExplicitly == false)) 
                            && (this.IsLocalFileSystemWebService(value) == false))) {
                    base.UseDefaultCredentials = false;
                }
                base.Url = value;
            }
        }
        
        public new bool UseDefaultCredentials {
            get {
                return base.UseDefaultCredentials;
            }
            set {
                base.UseDefaultCredentials = value;
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        /// <remarks/>
        public event RevisionsCompletedEventHandler RevisionsCompleted;
        
        /// <remarks/>
        public event GetJpegCompletedEventHandler GetJpegCompleted;
        
        /// <remarks/>
        public event DimeJpegCompletedEventHandler DimeJpegCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost/Revisions", RequestNamespace="http://localhost/", ResponseNamespace="http://localhost/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string[] Revisions() {
            object[] results = this.Invoke("Revisions", new object[0]);
            return ((string[])(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginRevisions(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("Revisions", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public string[] EndRevisions(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string[])(results[0]));
        }
        
        /// <remarks/>
        public void RevisionsAsync() {
            this.RevisionsAsync(null);
        }
        
        /// <remarks/>
        public void RevisionsAsync(object userState) {
            if ((this.RevisionsOperationCompleted == null)) {
                this.RevisionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRevisionsOperationCompleted);
            }
            this.InvokeAsync("Revisions", new object[0], this.RevisionsOperationCompleted, userState);
        }
        
        private void OnRevisionsOperationCompleted(object arg) {
            if ((this.RevisionsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.RevisionsCompleted(this, new RevisionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost/GetJpeg", RequestNamespace="http://localhost/", ResponseNamespace="http://localhost/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
        public byte[] GetJpeg(double ra_, double dec_, double scale_, int width_, int height_, string opt_) {
            object[] results = this.Invoke("GetJpeg", new object[] {
                        ra_,
                        dec_,
                        scale_,
                        width_,
                        height_,
                        opt_});
            return ((byte[])(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginGetJpeg(double ra_, double dec_, double scale_, int width_, int height_, string opt_, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("GetJpeg", new object[] {
                        ra_,
                        dec_,
                        scale_,
                        width_,
                        height_,
                        opt_}, callback, asyncState);
        }
        
        /// <remarks/>
        public byte[] EndGetJpeg(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((byte[])(results[0]));
        }
        
        /// <remarks/>
        public void GetJpegAsync(double ra_, double dec_, double scale_, int width_, int height_, string opt_) {
            this.GetJpegAsync(ra_, dec_, scale_, width_, height_, opt_, null);
        }
        
        /// <remarks/>
        public void GetJpegAsync(double ra_, double dec_, double scale_, int width_, int height_, string opt_, object userState) {
            if ((this.GetJpegOperationCompleted == null)) {
                this.GetJpegOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetJpegOperationCompleted);
            }
            this.InvokeAsync("GetJpeg", new object[] {
                        ra_,
                        dec_,
                        scale_,
                        width_,
                        height_,
                        opt_}, this.GetJpegOperationCompleted, userState);
        }
        
        private void OnGetJpegOperationCompleted(object arg) {
            if ((this.GetJpegCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetJpegCompleted(this, new GetJpegCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost/DimeJpeg", RequestNamespace="http://localhost/", ResponseNamespace="http://localhost/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void DimeJpeg(double ra_, double dec_, double scale_, int width_, int height_, string opt_) {
            this.Invoke("DimeJpeg", new object[] {
                        ra_,
                        dec_,
                        scale_,
                        width_,
                        height_,
                        opt_});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginDimeJpeg(double ra_, double dec_, double scale_, int width_, int height_, string opt_, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("DimeJpeg", new object[] {
                        ra_,
                        dec_,
                        scale_,
                        width_,
                        height_,
                        opt_}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndDimeJpeg(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        public void DimeJpegAsync(double ra_, double dec_, double scale_, int width_, int height_, string opt_) {
            this.DimeJpegAsync(ra_, dec_, scale_, width_, height_, opt_, null);
        }
        
        /// <remarks/>
        public void DimeJpegAsync(double ra_, double dec_, double scale_, int width_, int height_, string opt_, object userState) {
            if ((this.DimeJpegOperationCompleted == null)) {
                this.DimeJpegOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDimeJpegOperationCompleted);
            }
            this.InvokeAsync("DimeJpeg", new object[] {
                        ra_,
                        dec_,
                        scale_,
                        width_,
                        height_,
                        opt_}, this.DimeJpegOperationCompleted, userState);
        }
        
        private void OnDimeJpegOperationCompleted(object arg) {
            if ((this.DimeJpegCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.DimeJpegCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        public new void CancelAsync(object userState) {
            base.CancelAsync(userState);
        }
        
        private bool IsLocalFileSystemWebService(string url) {
            if (((url == null) 
                        || (url == string.Empty))) {
                return false;
            }
            System.Uri wsUri = new System.Uri(url);
            if (((wsUri.Port >= 1024) 
                        && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
                return true;
            }
            return false;
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void RevisionsCompletedEventHandler(object sender, RevisionsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class RevisionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal RevisionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public string[] Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string[])(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void GetJpegCompletedEventHandler(object sender, GetJpegCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetJpegCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetJpegCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public byte[] Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((byte[])(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
    public delegate void DimeJpegCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
}

#pragma warning restore 1591