These are chat archives for Ruhrpottpatriot/GW2.NET

4th
Mar 2016
Steven Liekens
@StevenLiekens
Mar 04 2016 11:43
:+1:
yeah idk about having one dll for every endpoint
it made sense at the time
now I'm not sure
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:08
Yeah, me too. It blows the number of DLLs out of proportion. Thus I'm proposing to make a DLL for each category... In fact I'm doing that now. Should speed up compilation as well
Btw: @StevenLiekens I'm not really good with T4 templates, so before release you mught have to look over the converter templates and change them so they fit the new system (i.e. replace IResponse with ApiMetadata where fitting)
Steven Liekens
@StevenLiekens
Mar 04 2016 15:10
if you want then you can delete the templates
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:10
how come?
Steven Liekens
@StevenLiekens
Mar 04 2016 15:11
run them one more time to generate up-to-date converters
because they are only meant to speed up development for new types
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:11
ah
Steven Liekens
@StevenLiekens
Mar 04 2016 15:11
there were a lot of missing entity types between 1.3 and 1.4
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:12
ah, makes sense
I thought about making the converter more generic. But this'll be a change for 2.x
Steven Liekens
@StevenLiekens
Mar 04 2016 15:12
(Build -> Transform All T4 Templates)
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:13
Ok I'll remove the templates then
Steven Liekens
@StevenLiekens
Mar 04 2016 15:14
between T4 templates, automapper or manually writing converters, which one is worse?
or what other choice do we have?
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:14
Probably not much
Steven Liekens
@StevenLiekens
Mar 04 2016 15:15
I wish razor templates were a thing outside MVC
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:15
I'd like to have something like I did with the repositories: Have one basic converter and then just inject the conversion logic for an object
it's similar to what we do now
but maybe we can optimize that a bit
Steven Liekens
@StevenLiekens
Mar 04 2016 15:26
oh jeez
found this gem in one of our projects at work
if // ...
else if // ..
else if // ..
else
{
    ApplicationLog.WriteErrorWithStackTrace("Logical error - should not get here!");
}
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:27
dafuq
ever heard of switch?
Steven Liekens
@StevenLiekens
Mar 04 2016 15:28
yeah
but besides that, they should check for "impossible" state in the validation of the method
not at the very end -.-
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:29
apart from that
Steven Liekens
@StevenLiekens
Mar 04 2016 15:44
I wonder when nuget 3.4 will be ready
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:45
what're the canges?
Steven Liekens
@StevenLiekens
Mar 04 2016 15:45
most importantly? netstandard framework monikers
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:45
yay
Steven Liekens
@StevenLiekens
Mar 04 2016 15:46
which means compatibility between .net core nuget packages and PCL packages
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 15:46
great!
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 16:06
Which files from the T4 templates can I delete?
Steven Liekens
@StevenLiekens
Mar 04 2016 16:17
keep the generated files but delete the source .tt files
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 16:17
how about the t4 file?
Steven Liekens
@StevenLiekens
Mar 04 2016 16:17
mmh...
I don't remember
basically delete everything except the output *.cs files
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 16:20
ok
I think I'll try to rewrite the converter hirarchy I currently don't understand how you did it
Steven Liekens
@StevenLiekens
Mar 04 2016 16:28
there's one converter for each type in the hierarchy
say class Consumable has a derived type Nourishment then there is a ConsumableConverter that maps the json fields that are common to all consumables and a NourishmentConverter that maps the json fields for nourishments only
the ConsumableConverter uses the type json field to decided which specific converter to hand the current object to
does that make any sense?
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 16:31
yeah
what purpose does the Merge method serve?
Steven Liekens
@StevenLiekens
Mar 04 2016 16:32
it's for specific mappings that can't be abstracted into a template
it's mostly used in the Consumable hierarchy
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 16:32
ah
Steven Liekens
@StevenLiekens
Mar 04 2016 16:33
I'm leaving work now
can't chat
Robert Logiewa
@Ruhrpottpatriot
Mar 04 2016 16:33
ok