udawtr / libcsv Goto Github PK
View Code? Open in Web Editor NEWCSV Library for .NET Framework
Home Page: http://nuget.org/packages/LibCSV/
CSV Library for .NET Framework
Home Page: http://nuget.org/packages/LibCSV/
Static ToList Method は FXCop的にはNGらしいです。
習得が難しいという理由のようです。悩みどころです。
ToListは便利な機能なので、代替案としてIEnumerable を実装してみました。
IEnumerableを実装すると foreachも使えるし、using System.Linq すれば ToList() も使えます。
using System.Linq;
....
var source = new CSVSource<T>(...);
var list = source.ToList();
... or ...
foreach(var line int source) {
Console.WriteLine(line.Col1);
}
参考:http://msdn.microsoft.com/ja-jp/library/ms182139.aspx
CA1000: ジェネリック型の静的メンバーを宣言しません
Now encoding is fixed with '932', but I want to change it.
Container Class:
class Sample
{
public string Col1;
public string Col2;
public string Col3;
}
Input Text:
Col1,Col2,Col3
A,B,
Test Code:
var obj = csvSource.ReadNext();
Assert.AreEqual("", obj.Col3); // this line is failed, because returned null
CSVヘッダの型を認識して自動的にキャストする機能が欲しい。
When a header starts with spaces, it should be removed.
Fail in formating exception message
Cannot determine underlay type
like this:
[CSVHeader(Index = 1)]
public String FirstName;
[CSVHeader(Index = 2)]
public String LastName;
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.