Advertisement
Seishura

Untitled

Mar 15th, 2021
741
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 6.58 KB | None | 0 0
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. //     This code was generated by a tool.
  4. //     Runtime Version:4.0.30319.42000
  5. //
  6. //     Changes to this file may cause incorrect behavior and will be lost if
  7. //     the code is regenerated.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10.  
  11. //
  12. // This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.42000.
  13. //
  14. #pragma warning disable 1591
  15.  
  16. namespace ConsultaNFe.NFeDistribuicaoDFe {
  17.     using System;
  18.     using System.Web.Services;
  19.     using System.Diagnostics;
  20.     using System.Web.Services.Protocols;
  21.     using System.Xml.Serialization;
  22.     using System.ComponentModel;
  23.    
  24.    
  25.     /// <remarks/>
  26.     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
  27.     [System.Diagnostics.DebuggerStepThroughAttribute()]
  28.     [System.ComponentModel.DesignerCategoryAttribute("code")]
  29.     [System.Web.Services.WebServiceBindingAttribute(Name="NFeDistribuicaoDFeSoap", Namespace="http://www.portalfiscal.inf.br/nfe/wsdl/NFeDistribuicaoDFe")]
  30.     public partial class NFeDistribuicaoDFe : System.Web.Services.Protocols.SoapHttpClientProtocol {
  31.        
  32.         private System.Threading.SendOrPostCallback nfeDistDFeInteresseOperationCompleted;
  33.        
  34.         private bool useDefaultCredentialsSetExplicitly;
  35.        
  36.         /// <remarks/>
  37.         public NFeDistribuicaoDFe() {
  38.             this.Url = global::ConsultaNFe.Properties.Settings.Default.ConsultaNFe_NFeDistribuicaoDFe_NFeDistribuicaoDFe;
  39.             if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
  40.                 this.UseDefaultCredentials = true;
  41.                 this.useDefaultCredentialsSetExplicitly = false;
  42.             }
  43.             else {
  44.                 this.useDefaultCredentialsSetExplicitly = true;
  45.             }
  46.         }
  47.        
  48.         public new string Url {
  49.             get {
  50.                 return base.Url;
  51.             }
  52.             set {
  53.                 if ((((this.IsLocalFileSystemWebService(base.Url) == true)
  54.                             && (this.useDefaultCredentialsSetExplicitly == false))
  55.                             && (this.IsLocalFileSystemWebService(value) == false))) {
  56.                     base.UseDefaultCredentials = false;
  57.                 }
  58.                 base.Url = value;
  59.             }
  60.         }
  61.        
  62.         public new bool UseDefaultCredentials {
  63.             get {
  64.                 return base.UseDefaultCredentials;
  65.             }
  66.             set {
  67.                 base.UseDefaultCredentials = value;
  68.                 this.useDefaultCredentialsSetExplicitly = true;
  69.             }
  70.         }
  71.        
  72.         /// <remarks/>
  73.         public event nfeDistDFeInteresseCompletedEventHandler nfeDistDFeInteresseCompleted;
  74.        
  75.         /// <remarks/>
  76.         [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.portalfiscal.inf.br/nfe/wsdl/NFeDistribuicaoDFe/nfeDistDFeInteresse", RequestNamespace="http://www.portalfiscal.inf.br/nfe/wsdl/NFeDistribuicaoDFe", ResponseNamespace="http://www.portalfiscal.inf.br/nfe/wsdl/NFeDistribuicaoDFe", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
  77.         public System.Xml.XmlNode nfeDistDFeInteresse(System.Xml.XmlNode nfeDadosMsg) {
  78.             object[] results = this.Invoke("nfeDistDFeInteresse", new object[] {
  79.                         nfeDadosMsg});
  80.             return ((System.Xml.XmlNode)(results[0]));
  81.         }
  82.        
  83.         /// <remarks/>
  84.         public void nfeDistDFeInteresseAsync(System.Xml.XmlNode nfeDadosMsg) {
  85.             this.nfeDistDFeInteresseAsync(nfeDadosMsg, null);
  86.         }
  87.        
  88.         /// <remarks/>
  89.         public void nfeDistDFeInteresseAsync(System.Xml.XmlNode nfeDadosMsg, object userState) {
  90.             if ((this.nfeDistDFeInteresseOperationCompleted == null)) {
  91.                 this.nfeDistDFeInteresseOperationCompleted = new System.Threading.SendOrPostCallback(this.OnnfeDistDFeInteresseOperationCompleted);
  92.             }
  93.             this.InvokeAsync("nfeDistDFeInteresse", new object[] {
  94.                         nfeDadosMsg}, this.nfeDistDFeInteresseOperationCompleted, userState);
  95.         }
  96.        
  97.         private void OnnfeDistDFeInteresseOperationCompleted(object arg) {
  98.             if ((this.nfeDistDFeInteresseCompleted != null)) {
  99.                 System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
  100.                 this.nfeDistDFeInteresseCompleted(this, new nfeDistDFeInteresseCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
  101.             }
  102.         }
  103.        
  104.         /// <remarks/>
  105.         public new void CancelAsync(object userState) {
  106.             base.CancelAsync(userState);
  107.         }
  108.        
  109.         private bool IsLocalFileSystemWebService(string url) {
  110.             if (((url == null)
  111.                         || (url == string.Empty))) {
  112.                 return false;
  113.             }
  114.             System.Uri wsUri = new System.Uri(url);
  115.             if (((wsUri.Port >= 1024)
  116.                         && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
  117.                 return true;
  118.             }
  119.             return false;
  120.         }
  121.     }
  122.    
  123.     /// <remarks/>
  124.     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
  125.     public delegate void nfeDistDFeInteresseCompletedEventHandler(object sender, nfeDistDFeInteresseCompletedEventArgs e);
  126.    
  127.     /// <remarks/>
  128.     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
  129.     [System.Diagnostics.DebuggerStepThroughAttribute()]
  130.     [System.ComponentModel.DesignerCategoryAttribute("code")]
  131.     public partial class nfeDistDFeInteresseCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
  132.        
  133.         private object[] results;
  134.        
  135.         internal nfeDistDFeInteresseCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
  136.                 base(exception, cancelled, userState) {
  137.             this.results = results;
  138.         }
  139.        
  140.         /// <remarks/>
  141.         public System.Xml.XmlNode Result {
  142.             get {
  143.                 this.RaiseExceptionIfNecessary();
  144.                 return ((System.Xml.XmlNode)(this.results[0]));
  145.             }
  146.         }
  147.     }
  148. }
  149.  
  150. #pragma warning restore 1591
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement