//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.18052
//
//     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 4.0.30319.18052.
// 
#pragma warning disable 1591

namespace ParserIO_WSBenchmark.ParserIO_local {
    using System;
    using System.Web.Services;
    using System.Diagnostics;
    using System.Web.Services.Protocols;
    using System.Xml.Serialization;
    using System.ComponentModel;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="ParserIO_WSSoap", Namespace="http://www.Phast.fr/RLIO/CIOdm")]
    public partial class ParserIO_WS : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback ParseOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public ParserIO_WS() {
            this.Url = global::ParserIO_WSBenchmark.Properties.Settings.Default.CIOdm_ParserIO_WSBenchmark_CIOdm_ParserIO_local_CIOdm_ParserIO;
            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 ParseCompletedEventHandler ParseCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.Phast.fr/RLIO/CIOdm/Parse", RequestNamespace="http://www.Phast.fr/RLIO/CIOdm", ResponseNamespace="http://www.Phast.fr/RLIO/CIOdm", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public int Parse(
                    string Barcode, 
                    out string ACL, 
                    out string ADDITIONALID, 
                    out string BESTBEFORE, 
                    out string CIP, 
                    out string Company, 
                    out bool ProductId, 
                    out string CONTENT, 
                    out string COUNT, 
                    out string Expiry, 
                    out string Family, 
                    out string GTIN, 
                    out string LIC, 
                    out string Lot, 
                    out string LPP, 
                    out string NaS7, 
                    out string NormalizedBESTBEFORE, 
                    out string NormalizedExpiry, 
                    out string NormalizedPRODDATE, 
                    out string PCN, 
                    out string PRODDATE, 
                    out string Product, 
                    out string Quantity, 
                    out string Reference, 
                    out string Serial, 
                    out string SSCC, 
                    out string SubType, 
                    out string Type, 
                    out string UoM, 
                    out string VARCOUNT, 
                    out string VARIANT, 
                    out string Erreurs) {
            object[] results = this.Invoke("Parse", new object[] {
                        Barcode});
            ACL = ((string)(results[1]));
            ADDITIONALID = ((string)(results[2]));
            BESTBEFORE = ((string)(results[3]));
            CIP = ((string)(results[4]));
            Company = ((string)(results[5]));
            ProductId = ((bool)(results[6]));
            CONTENT = ((string)(results[7]));
            COUNT = ((string)(results[8]));
            Expiry = ((string)(results[9]));
            Family = ((string)(results[10]));
            GTIN = ((string)(results[11]));
            LIC = ((string)(results[12]));
            Lot = ((string)(results[13]));
            LPP = ((string)(results[14]));
            NaS7 = ((string)(results[15]));
            NormalizedBESTBEFORE = ((string)(results[16]));
            NormalizedExpiry = ((string)(results[17]));
            NormalizedPRODDATE = ((string)(results[18]));
            PCN = ((string)(results[19]));
            PRODDATE = ((string)(results[20]));
            Product = ((string)(results[21]));
            Quantity = ((string)(results[22]));
            Reference = ((string)(results[23]));
            Serial = ((string)(results[24]));
            SSCC = ((string)(results[25]));
            SubType = ((string)(results[26]));
            Type = ((string)(results[27]));
            UoM = ((string)(results[28]));
            VARCOUNT = ((string)(results[29]));
            VARIANT = ((string)(results[30]));
            Erreurs = ((string)(results[31]));
            return ((int)(results[0]));
        }
        
        /// <remarks/>
        public void ParseAsync(string Barcode) {
            this.ParseAsync(Barcode, null);
        }
        
        /// <remarks/>
        public void ParseAsync(string Barcode, object userState) {
            if ((this.ParseOperationCompleted == null)) {
                this.ParseOperationCompleted = new System.Threading.SendOrPostCallback(this.OnParseOperationCompleted);
            }
            this.InvokeAsync("Parse", new object[] {
                        Barcode}, this.ParseOperationCompleted, userState);
        }
        
        private void OnParseOperationCompleted(object arg) {
            if ((this.ParseCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.ParseCompleted(this, new ParseCompletedEventArgs(invokeArgs.Results, 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", "4.0.30319.17929")]
    public delegate void ParseCompletedEventHandler(object sender, ParseCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class ParseCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal ParseCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public int Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((int)(this.results[0]));
            }
        }
        
        /// <remarks/>
        public string ACL {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[1]));
            }
        }
        
        /// <remarks/>
        public string ADDITIONALID {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[2]));
            }
        }
        
        /// <remarks/>
        public string BESTBEFORE {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[3]));
            }
        }
        
        /// <remarks/>
        public string CIP {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[4]));
            }
        }
        
        /// <remarks/>
        public string Company {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[5]));
            }
        }
        
        /// <remarks/>
        public bool ProductId {
            get {
                this.RaiseExceptionIfNecessary();
                return ((bool)(this.results[6]));
            }
        }
        
        /// <remarks/>
        public string CONTENT {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[7]));
            }
        }
        
        /// <remarks/>
        public string COUNT {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[8]));
            }
        }
        
        /// <remarks/>
        public string Expiry {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[9]));
            }
        }
        
        /// <remarks/>
        public string Family {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[10]));
            }
        }
        
        /// <remarks/>
        public string GTIN {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[11]));
            }
        }
        
        /// <remarks/>
        public string LIC {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[12]));
            }
        }
        
        /// <remarks/>
        public string Lot {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[13]));
            }
        }
        
        /// <remarks/>
        public string LPP {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[14]));
            }
        }
        
        /// <remarks/>
        public string NaS7 {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[15]));
            }
        }
        
        /// <remarks/>
        public string NormalizedBESTBEFORE {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[16]));
            }
        }
        
        /// <remarks/>
        public string NormalizedExpiry {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[17]));
            }
        }
        
        /// <remarks/>
        public string NormalizedPRODDATE {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[18]));
            }
        }
        
        /// <remarks/>
        public string PCN {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[19]));
            }
        }
        
        /// <remarks/>
        public string PRODDATE {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[20]));
            }
        }
        
        /// <remarks/>
        public string Product {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[21]));
            }
        }
        
        /// <remarks/>
        public string Quantity {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[22]));
            }
        }
        
        /// <remarks/>
        public string Reference {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[23]));
            }
        }
        
        /// <remarks/>
        public string Serial {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[24]));
            }
        }
        
        /// <remarks/>
        public string SSCC {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[25]));
            }
        }
        
        /// <remarks/>
        public string SubType {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[26]));
            }
        }
        
        /// <remarks/>
        public string Type {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[27]));
            }
        }
        
        /// <remarks/>
        public string UoM {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[28]));
            }
        }
        
        /// <remarks/>
        public string VARCOUNT {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[29]));
            }
        }
        
        /// <remarks/>
        public string VARIANT {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[30]));
            }
        }
        
        /// <remarks/>
        public string Erreurs {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[31]));
            }
        }
    }
}

#pragma warning restore 1591