-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: criar uma instancia para cada instancia do SoapUtils , nunca uti…
…lizar a mesma
- Loading branch information
Showing
2 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
namespace DFe.Wsdl.Common | ||
using System; | ||
|
||
namespace DFe.Wsdl.Common | ||
{ | ||
public static class ConfiguracaoServicoWSDL | ||
{ | ||
public static bool ValidarCertificadoDoServidorNetCore { get; set; } | ||
public static IRequestSefaz RequestSefaz { get; set; } | ||
private static Func<IRequestSefaz> _requestSefazFactory; | ||
|
||
public static void SetRequestSefazFactory(Func<IRequestSefaz> factory) | ||
{ | ||
_requestSefazFactory = factory; | ||
} | ||
|
||
public static IRequestSefaz GetRequestSefaz() | ||
{ | ||
return _requestSefazFactory(); | ||
} | ||
|
||
static ConfiguracaoServicoWSDL() | ||
{ | ||
ValidarCertificadoDoServidorNetCore = true; | ||
RequestSefaz = new RequestSefazDefault(); | ||
SetRequestSefazFactory(() => new RequestSefazDefault()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters