public SatIntegradorMFe(SatConfig config, string pathDll, Encoding encoding) { ModeloStr = "SatIntegradorMFe"; PathDll = pathDll; Encoding = encoding; Config = config; }
protected SatLibrary(SatConfig config, string pathDll, Encoding encoding) { PathDll = pathDll; Encoding = encoding; Config = config; handle = IntPtr.Zero; }
protected override void OnInitialize() { Configuracoes = new SatConfig(); Arquivos = new CfgArquivos(); Encoding = Encoding.UTF8; PathDll = @"C:\SAT\SAT.dll"; CodigoAtivacao = "123456"; signAC = string.Empty; }
public static ISatLibrary GetLibrary(ModeloSat modelo, SatConfig config, string pathDll, Encoding encoding) { switch (modelo) { case ModeloSat.Cdecl: return(new SatCdecl(config, pathDll, encoding)); case ModeloSat.StdCall: return(new SatStdCall(config, pathDll, encoding)); default: throw new NotImplementedException("Modelo não impementado !"); } }
public SatIntegradorMFe(SatConfig config, string pathDll, Encoding encoding) : base(config, pathDll, encoding) { ModeloStr = "SatIntegradorMFe"; if (!Directory.Exists(Path.Combine(Config.MFePathEnvio, "Enviados"))) { Directory.CreateDirectory(Path.Combine(Config.MFePathEnvio, "Enviados")); } if (!Directory.Exists(Path.Combine(Config.MFePathResposta, "Processados"))) { Directory.CreateDirectory(Path.Combine(Config.MFePathResposta, "Processados")); } }
public SatCdecl(SatConfig config, string pathDll, Encoding encoding) : base(config, pathDll, encoding) { ModeloStr = "SatCdeclSatLibrary"; AddMethod <Delegates.AssociarAssinatura>("AssociarAssinatura"); AddMethod <Delegates.AtivarSAT>("AtivarSAT"); AddMethod <Delegates.AtualizarSoftwareSAT>("AtualizarSoftwareSAT"); AddMethod <Delegates.BloquearSAT>("BloquearSAT"); AddMethod <Delegates.CancelarUltimaVenda>("CancelarUltimaVenda"); AddMethod <Delegates.ComunicarCertificadoICPBRASIL>("ComunicarCertificadoICPBRASIL"); AddMethod <Delegates.ConfigurarInterfaceDeRede>("ConfigurarInterfaceDeRede"); AddMethod <Delegates.ConsultarNumeroSessao>("ConsultarNumeroSessao"); AddMethod <Delegates.ConsultarSAT>("ConsultarSAT"); AddMethod <Delegates.ConsultarStatusOperacional>("ConsultarStatusOperacional"); AddMethod <Delegates.DesbloquearSAT>("DesbloquearSAT"); AddMethod <Delegates.EnviarDadosVenda>("EnviarDadosVenda"); AddMethod <Delegates.ExtrairLogs>("ExtrairLogs"); AddMethod <Delegates.TesteFimAFim>("TesteFimAFim"); AddMethod <Delegates.TrocarCodigoDeAtivacao>("TrocarCodigoDeAtivacao"); }
protected SatLibrary(SatConfig config, string pathDll, Encoding encoding) : base(pathDll) { PathDll = pathDll; Encoding = encoding; Config = config; }
public SatStdCall(SatConfig config, string pathDll, Encoding encoding) : base(config, pathDll, encoding) { ModeloStr = "StdCallSatLibrary"; handle = NativeMethods.LoadLibrary(PathDll); Guard.Against <ACBrException>(handle == IntPtr.Zero, "Não foi possivel carregar a biblioteca Sat"); }