These are chat archives for Ruhrpottpatriot/GW2.NET

26th
Sep 2015
Steven Liekens
@StevenLiekens
Sep 26 2015 08:19
I have a philosophical question about what we should do when a json string does not match one of the expected values
especially for enums
for example a dynamic event can have two flags: "group_event" or "map_wide" (or no flags at all)
right now if we get a string that does not match one of those values, we ignore it
but what is the right thing to do?
Steven Liekens
@StevenLiekens
Sep 26 2015 11:14
can we use C# 6? I need it
Robert Logiewa
@Ruhrpottpatriot
Sep 26 2015 14:00
We can use C# 6 later. For now I cannot use it (somehow VS2015 does install, but I cannot use C# 6 features for some reason). We have enough other work to do right now.
As for the JSON strings: We should make the user aware that the serialisation of a string failed. Custom JSON converter would give us the option
Steven Liekens
@StevenLiekens
Sep 26 2015 15:19
I'm working on something to reduce the amount of boilerplate code that surrounds IConverter
using reflection and T4 text templates
I mean... the boilerplate code won't disappear, but at least it will be generated automatically when you right click -> transform T4 template
instead of having to write it yourself
Steven Liekens
@StevenLiekens
Sep 26 2015 15:24
it's gonna be neat
Robert Logiewa
@Ruhrpottpatriot
Sep 26 2015 16:03
I'm currently looking into the JSON converter from JSON.NET. That would reduce the code even more. We would have to write the serialisation mostly by ourselves, but we would get full control over it. And setting them programmatically, is possible too, so we won't need attributes on the models.
@StevenLiekens Did you look at the code I sent you via private chat?
Steven Liekens
@StevenLiekens
Sep 26 2015 16:14
not yet
but I saw some things that should be in the core library instead of a separate lib
RichTextString and LinkElement sound like candidates for the core lib
Robert Logiewa
@Ruhrpottpatriot
Sep 26 2015 16:30
They will get there, when I move the thing to the main project
for now leave them there
@StevenLiekens @SamHurne I added you to a private team chat, if we ever need to discuss something not yet meant for the public.
Steven Liekens
@StevenLiekens
Sep 26 2015 16:36
ok thanks