You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a quirky helper utility to convert IEnumerable<ISeries> (quotes and results lists) to a fixed width, CSV, or JSON string. Mostly, I'm thinking this is helpful anyone debugging or wanting to output something to Console for quick visual inspections or general development sharing. Default is OutType.FixedWidth, since I mostly had Console output and .NET Fiddle use in mind.
properties with [JsonIgnore] attribute are excluded
include optional formatting args
All fields can have named formatting preferences in args, for example:
Dictionary<string,string>args new()={{"Open","N2"},{"High","N2"},{"Low","N2"},{"Close","N2"},{"Volume","N0"},// No decimal places{"Date","yyyy-MM-dd HH:mm"}// Include milliseconds};
args can also target specific primitive types, but also allow overrides based on sequencing in the args list (last format wins)
Dictionary<string,string>args new()={{"decimal","N2"},{"Volume","N0"},// override decimal places{"Date","yyyy-MM-dd HH:mm"}// Include milliseconds};
when args or individual properties aren't covered, do not apply formatting
include overloads
.ToStringOut(Dictionary<object,string> args? = null) is the standard
.ToStringOut(int limitQty, Dictionary<object,string> args? = null) limits to the first X
.ToStringOut(int startIndex, int endIndex, Dictionary<object,string> args? = null) between a range
The text was updated successfully, but these errors were encountered:
the problem
This is a quirky helper utility to convert
IEnumerable<ISeries>
(quotes and results lists) to a fixed width, CSV, or JSON string. Mostly, I'm thinking this is helpful anyone debugging or wanting to output something to Console for quick visual inspections or general development sharing. Default isOutType.FixedWidth
, since I mostly had Console output and .NET Fiddle use in mind.Must do
properties with
[JsonIgnore]
attribute are excludedinclude optional formatting
args
All fields can have named formatting preferences in
args
, for example:args
can also target specific primitive types, but also allow overrides based on sequencing in the args list (last format wins)when args or individual properties aren't covered, do not apply formatting
include overloads
.ToStringOut(Dictionary<object,string> args? = null)
is the standard.ToStringOut(int limitQty, Dictionary<object,string> args? = null)
limits to the first X.ToStringOut(int startIndex, int endIndex, Dictionary<object,string> args? = null)
between a rangeThe text was updated successfully, but these errors were encountered: