Skip to content

Releases: nemesissoft/Nemesis.TextParsers

Add support for parsing Stack<T>

26 Apr 22:40
Compare
Choose a tag to compare
v2.0.4

Make exploratory tests aware of special AB<> equivalence

Fix emptiness parsing for compound parsers. Add unit tests

21 Apr 14:39
Compare
Choose a tag to compare
v2.0.2

Fix emptiness parsing for compound parsers. Add unit tests

Support for settings and basic Dependency Injection capabilities

17 Apr 08:13
1e96830
Compare
Choose a tag to compare
  1. New features
  1. Introduce settings for handling:
  • dictionaries
  • lists/collections
  • arrays
  • value tuples
  • key-value pairs
  • deconstructables
  1. Transformer creators may obtain ITransformerStore instance via simple constructor injection

  2. Breaking changes:

  • SpanCollectionSerializer was removed - opt for using ITransformerStore.GetTransformer. Use any common collection/array/dictionary class or interface as generic parameter i.e. IList, IEnumerable, Dictionary<key, value>, SomeType[], OtherType[][]
  • ParsingPairSequence/ParsingSequence non generic ref structs were introduced in place of old ParsedSequence/ParsedPairSequence
  • several methods from SpanParserHelper were removed/moved to more appropriate places

Support for settings and basic Dependency Injection capabilities

15 Apr 15:44
1e96830
Compare
Choose a tag to compare

Introduce settings for handling:

  • dictionaries
  • lists/collections
  • arrays
  • value tuples
  • key-value pairs
  • deconstructables

Transformer creators may obtain ITransformerStore instance via simple constructor injection

Improve unit tests experience

29 Mar 22:08
Compare
Choose a tag to compare
v1.5.1

Update SourceLink

Deconstructables + simple parsers singletons + emptiness

28 Mar 22:20
Compare
Choose a tag to compare
  1. Simple type parsers are exposed via singletons (see i.e. DoubleParser.Instance)
  2. New type of parsing strategy - Deconstructables. It is enough for type to have constructor and matching Deconstruct - these members will be used to parse/format object automatically i.e. this structure
readonly struct Address
{
    public string City { get; }
    public int ZipCode { get; }

    public Address(string city, int zipCode)
    {
        City = city;
        ZipCode = zipCode;
    }

    public void Deconstruct(out string city, out int zipCode)
    {
        city = City;
        zipCode = ZipCode;
    }
}

will be automatically formatted to "(City;ZipCode)" format and parsed from same format

  1. New concept - emptiness vs null parsing. Now transformers can decide what it meas to them when "" string is parsed as opposed to null string

  2. TupleHelper - user can now create complex parser that parse tuple-like structures (records etc.) using common logic

  3. Transformables - types can register own transformers using TransformerAttribute. Such custom transformers can benefit from simple dependency injections (currently only TransformerStore object) via constructor

DEPRECATED:
One of next minor releases will be the last one where we support FromText(string) convention. It was only a bridge for consumers bound to targets < .NET Standard 2.1. Now we encourage upgrade to FromText(ReadOnlySpan) - especially since all simple type parsers are exposed via singletons (see i.e. DoubleParser.Instance)

Add support for deconstructable parsing

23 Mar 22:37
Compare
Choose a tag to compare
  1. Improve text syntax provider - take from text factory
  2. add support for automatic parsing of deconstructable objects i.e.
readonly struct Address
{
    public string City { get; }
    public int ZipCode { get; }

    public Address(string city, int zipCode)
    {
        City = city;
        ZipCode = zipCode;
    }

    [UsedImplicitly]
    public void Deconstruct(out string city, out int zipCode)
    {
        city = City;
        zipCode = ZipCode;
    }
}

Introduce TextTypeConverter

19 Mar 13:24
Compare
Choose a tag to compare
v1.3.2

Improve GetSyntax tests

Reorganize namespaces

16 Mar 09:51
Compare
Choose a tag to compare
v1.3.0

Reorganize namespaces

Move parsers to new namespace

15 Mar 22:49
Compare
Choose a tag to compare

Make parsers public and move them to Nemesis.TextParsers.Parsers namespace