using System; using System.Collections.Generic; namespace Capnp { /// /// ListDeserializer specialization for empty lists. /// public class EmptyListDeserializer : ListDeserializer { /// /// Always ListKind.ListOfEmpty (despite the fact the empty list != List(Void) /// public override ListKind Kind => ListKind.ListOfEmpty; /// /// Returns am empty . /// /// Element ype /// Ignored public override IReadOnlyList Cast(Func cons) => new EmptyList(); /// /// Returns an empty ]]>/>. /// public override IReadOnlyList CastBool() => new EmptyList(); /// /// Returns an empty ]]>/>. /// public override IReadOnlyList CastByte() => new EmptyList(); /// /// Returns an empty ]]>/>. /// public override IReadOnlyList CastDouble() => new EmptyList(); /// /// Returns an empty ]]>. /// public override IReadOnlyList CastFloat() => new EmptyList(); /// /// Returns an empty ]]>. /// public override IReadOnlyList CastInt() => new EmptyList(); /// /// Returns an empty ]]>. /// public override IReadOnlyList CastList() => new EmptyList(); /// /// Returns an empty ]]>/>. /// public override IReadOnlyList CastLong() => new EmptyList(); /// /// Returns an empty ]]>. /// public override IReadOnlyList CastSByte() => new EmptyList(); /// /// Returns an empty ]]>. /// public override IReadOnlyList CastShort() => new EmptyList(); /// /// Returns an empty string. /// public override string? CastText() => null; /// /// Returns an empty ]]>. /// public override IReadOnlyList CastUInt() => new EmptyList(); /// /// Returns an empty ]]>. /// public override IReadOnlyList CastULong() => new EmptyList(); /// /// Returns an empty ]]>. /// public override IReadOnlyList CastUShort() => new EmptyList(); } }