mthamil / fluentfiles Goto Github PK
View Code? Open in Web Editor NEWThis project forked from forcewake/flatfile
FluentFiles is a .NET library for working with flat files.
License: MIT License
This project forked from forcewake/flatfile
FluentFiles is a .NET library for working with flat files.
License: MIT License
When using MultiRecordFlatFileEngine, the record type selector Func is given two arguments - the current line, and a parameter called lineNumber. Because lineNumber isn't incremented unless the selector returns a layout and parses the line, lineNumber ends up being the number of lines successfully parsed rather than the line number in the file. Is lineNumber intended to have this meaning, and if it is, would it be possible to introduce a way to get at the actual line number in the file? I have some ideas for how to do this, but I'm not sure if this was intended or not.
Relevant code is between lines 117 and 125 in MultiRecordFlatFileEngine.cs.
Thanks
Would it appear that there is a memory leak?
Before creation:79360 After creation:139296 Object is null True After null:139352 Before creation:125224 After creation:139976 Object is null True After null:139720 Before creation:125592 After creation:140056 Object is null True After null:139800
Could it be possible to add Ignore() for fluent write
See forcewake#80:
if I have multiple empty field at the end of a row I get the separator as value:
Explained better here:
https://stackoverflow.com/questions/52017242/flatfile-library-delimited-layout-wrong-parsing-when-multiple-fields-are-emptyI don't know if I miss some attribute configurations...
I download the code, in debug it seems to be a problem in class DelimitedLineParser, when check:
if (line.Length > linePosition + delimiterSize)
at first glance could be a solution the next line???
if (line.Length >= linePosition + delimiterSize)
Are you using anything in 2.1 that would prevent you from targeting 2.0? The boat i'm in requires 2.0 because i still need to support full framework. You'd have a larger potential install-base if you can open that up a bit.
See forcewake#67
Lets say I have a fixed width document with 7000 columns and I want to skip random sections say 750-950, 1000-4000.... Is there a better way to skip these sections than to create a single
string Ignored { get; }
property and basically skip these sections via known length offsets?
and forcewake#41
I have the following configuration for an object.
WithMember(_ => _.Type, _ => _.StartsAt(0).WithLength(3))
.WithMember(_ => _.UpdateCode, _ => _.StartsAt(3).WithLength(1))
.WithMember(_ => _.CompanyIdForPayrollAdministration, _ => _.StartsAt(4).WithLength(7))
.WithMember(_ => _.PayrollAdministrationNumber, _ => _.StartsAt(11).WithLength(20).WithRightPadding(' '))
.WithMember(_ => _.DateOfPrestation, _ => _.StartsAt(31).WithLength(10).WithConverter(new DateTimeFormatter()))
.Ignore(2)
.WithMember(_ => _.PrestationCode, _ => _.WithLength(6).WithRightPadding(' '));
Currently the StartsAt is completely ignored. And when I try to use ignore to skip a certain width I get the following error: Cannot use a fixed width layout with an ignored section for writing.
This is for the case when you are writing a file. Any workarounds or ways I can fix this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.