public HeaderArquivo(Controle controle) : base(controle) { AddSubCampos(Cnab_4, Empresa, NomeBanco, Cnab_15, Arquivo, ReservadoBanco, ReservadoEmpresa, Cnab_24, IdentificacaoVans, ControleVans, Servico, Ocorrencias); }
public override void Read(StreamReader reader) { while (!reader.EndOfStream) { var controle = new Controle(); controle.Read(reader); var registro = Registro.New(controle); this._registros.Add(registro); } }
public override async Task ReadAsync(StreamReader reader) { while (!reader.EndOfStream) { var controle = new Controle(); await controle.ReadAsync(reader); var registro = Registro.New(controle); this._registros.Add(registro); } }
public static Registro New(Controle controle) { switch (controle.Registro.Value) { case TipoRegistro.HeaderArquivo: return new HeaderArquivo(controle); case TipoRegistro.HeaderLote: return new HeaderLote(controle); case TipoRegistro.Detalhe: return new Detalhe(controle); case TipoRegistro.TrailerLote: return new TrailerLote(controle); case TipoRegistro.TrailerArquivo: return new TrailerArquivo(controle); default: throw new LeituraException("Tipo de registro não reconhecido"); } }
public Registro(Controle controle) { this.Controle = controle; }
public TrailerArquivo(Controle controle) : base(controle) { AddSubCampos(Cnab_4, Totais, QuantidadeContasConciliadas, Cnab_8); }
public TrailerLote(Controle controle) : base(controle) { AddSubCampos(Cnab_4, Empresa, Cnab_14, SaldoFinal, Totais, Cnab_24); }
public Detalhe(Controle controle) : base(controle) { AddSubCampos(Servico, Cnab_6, Empresa, Cnab_16, Lancamento, Cnab_24); }
public HeaderLote(Controle controle) : base(controle) { AddSubCampos(Servico, Cnab_8, Empresa, Informacao1, SaldoInicial); }