Code Monkey home page Code Monkey logo

filehelpers's People

Contributors

akoeplinger avatar b-stil avatar danielcrenna avatar dependabot-support avatar dibbdob avatar eveneveneven avatar gameiro avatar giovax avatar greybird avatar guillaumejay avatar jboyer2012 avatar jbparker avatar jformacek avatar khalidsalomao avatar luckylilly avatar marc-lopez avatar marcosmeli avatar markosimulak avatar mattvonvielen avatar mcavigelli avatar mikefoden avatar mstaessen avatar nescafe2002 avatar perrich avatar regisbsb avatar robertcoltheart avatar rohancragg avatar rondefreitas avatar s-moon avatar spaccabit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filehelpers's Issues

Docs: Some Small Changes

Here are a list of small pending changes in different pages:

✅ Unify some docs in Must Read page
✅ Add some tips about how to use the library
✅ Add info about Mono support
✅ Review the changelog to add links and more items
◽ Add new attributes
◽ Add small description to attributes

Docs: New Attributes Page

Quick summary of the current attributes indicating when can be used (Read or Write) and for what kind of record types (FixedLength, Delimited)

What is new in 3.x?

As a long time user of 2.x - is there a 'conversion' document for

  • What has been removed/changed
  • Migration guide
  • New features, etc?

Add more interfaces to make FileHelpers mockeable

I have little background on working with advance mocking, mostly for mocking IO ops

So we need your help to identify the key points to make FileHelpers main classes mockeable

That addition must avoid breaking changes, in the worst case we can add some overloads but not change the way users work now with the library

Allow the creation of engine when the record type don't have a parameter less constructor

Today we throw BadUsageException in the engine creation but maybe the user only want to write records, so there is no problem if there is no constructor.

Throw the BadUsageException only when trying to read objects

That will also speed up a bit the initial setup process because don't need to use reflection to take the constructor pointer on engine creation, that will be delayed to first read :)

Roslyn Quick Fixes and Analyzer

Create a Roslyn Analizer to evaluate library usage and suggest best practices

Deploy it to Nuget and recommend user to install it

ETL Framework

Something like a DataLink replacement but much more pluggable and that left to the user the core actions of assign fields and transform info, basicaly solve the Extract and Load operations and let the user to full the Transform part.

Integrated with the TPL DataFlow library

is it possible to push out a new version of 2.9.9 to nuget?

Currently there are a fair number of fixes that are available on github but not from the NuGet versions. It's possible to work around by cloning from github and building there and using the result, but especially for use cases like LINQPad scripts (where LINQPad has built-in NuGet integration), it would be far nicer to have a recent version on NuGet.

Making it available as a pre-release version of 3.0.0 would be an option, if there are already breaking changes and what's currently checked in can't/shouldn't be released without the major version change.

Thanks!

Allow sub class converter (with a recursive Recordinfo)

For Example:

[DelimiterRecords(";")] 
class internalClass 
{ 
string A; 
string B; 
[FieldConverter(ConverterKind.Date, "dd.MM.yy")] 
DateTime C; 

[FieldIgnored]
string D; 
[FieldIgnored]
int whatEver; 
... 
} 

[DelimiterRecords(";")] 
class MyClass 
{ 
string someOtherInfo; 
string maybeAnotherThing; 

[FieldAsClassConverter] 
[FieldArrayLength(10)] 
internalClass [] internalInfo; 
}

Allow using a Type without any RecordAttribute

Sometimes you can't edit an existing type to add the necessary attributes (DelimitedRecordAttribute or FixedLengthRecordAttribute) and this information could be specified through parameters.
If the type doesn't have any attribute, you could use a default value, if this information is not specified through a parameter.

I've been annoyed when I wanted to proceed to a quick dump of data to a csv file without wanting to create a new object & copy data in order to be able to use the API.

I tried all possible engines and all of them seem to require those attributes.
Even when it doesn't seem logical : CommonEngine.RecordsToDataTable() only works when the record type has those attributes. It's not logical because I don't think it need those attributes here.

It would also allow the use of anonymous types with the engines, like :

var itemList = data.GroupBy(item => new { item.NomApporteur }).Select(g => new { g.Key.NomApporteur, Somme = g.Sum(o => o.Montant) });
if (itemList.Count() > 0)
{
    var engine = new DelimitedFileEngine(itemList.First().GetType());
    engine.Options.Delimiter = ";";
    engine.WriteFile("", itemList);
}

Today, it seems that I have to write my own RecordsToDataTable() in order to bypass this limitation.

Wizard: Better type display

Don't use standard framework names like System.String, etc
Use the language specific ones: like string, int, long

Bug Report about IgnoreFirstLine

Reported in the old issue tracker

Error Converting 'HEADERTEXT' to type: 'Int32'.   at FileHelpers.ConvertHelpers+Int32Converter.ParseString (System.String from) [0x00000] in <filename unknown>:0 
  at FileHelpers.ConvertHelpers+CultureConverter.StringToField (System.String from) [0x00000] in <filename unknown>:0 
  at FileHelpers.FieldBase.AssignFromString (ExtractedInfo fieldString, FileHelpers.LineInfo line) [0x00000] in <filename unknown>:0

when using with

    [DelimitedRecord(";"), IgnoreFirst]
    public class DataClass


    var engine = new FileHelperEngine<T>();

    if (!File.Exists(file.FullName))
    {
        throw new NotSupportedException("file doesn't exist");
    }
    return engine.ReadFile(file.FullName);

Multiple entries in single column

Hallo there!
II would like to suggest a new feature.
Assumed there are a csv File with the semicolon as a delimiter. But some of the fields includes multiple values delimited with other signs. Example:

  • Alex;Kovalsky;19.02.2015;50.1
  • john;Smith;04.04.2015:13.02.2014;50.1:16.3
  • Max;Mustermann;;

I would expect such file to be parsed into

first_name:       Alex
last_name:       Kovalsky
Checkout Date: 19.02.2015
Checkout Sum: 50.1
first_name:       john
last_name:       Smith
Checkout Date: 04.04.2015
Checkout Sum: 50.1
first_name:       john
last_name:       Smith
Checkout Date: 13.02.2014
Checkout Sum: 16.3
first_name:       Max
last_name:       Mustermann
Checkout Date: null
Checkout Sum: 0.0

Or with arrays:

first_name:       Alex
last_name:       Kovalsky
Checkout Date[]: {19.02.2015}
Checkout Sum[]: {50.1}
first_name:       john
last_name:       Smith
Checkout Date[]: {04.04.2015, 13.02.2014}
Checkout Sum[]: {50.1, 16.3}
first_name:       Max
last_name:       Mustermann
Checkout Date[]: {}
Checkout Sum[]: {}

Docs: Create a little example walkthrough wizard

For example with 3 Combos with the values

I want to:

  • Read
  • Write
  • Transform
  • Sort
  • Compare

a:

  • File
  • String
  • Stream

with

  • Delimited
  • Fixed Length
  • Dynamic

records

You change the combos and you get the right example

Update Credits Page

After Matthias creates it, add the list of people that help us a ton all these years

Disable Forums

Because are full of spam, I just disabled the Forums, we will review interesting posts and add them to the FAQ and Docs

Is the "sealed" really necessary?

I would love to extend attributes like FieldAlignAttribute to match my current requirements and to avoid repeating [FieldAlign(AlignMode.Right, '0')].

I could imagine the reason for using sealed is about performance, but are there really any significant gains, to justify the removal of extensibility?

If there are other reasons I haven't thought of, please enlighten me :)

Engine Options - Isolation and Tests

Currently the engine.Options is partial working, we must to provide an isolation between engines, ie, if we create 2 engines with the same Type and change the options of one engine the other don't get changed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.