These are chat archives for Ruhrpottpatriot/GW2.NET

29th
Sep 2016
Steven Liekens
@StevenLiekens
Sep 29 2016 06:23
I tried an early preview but I haven't really looked at what's new
Biggest thing seems to be that VS 15 can open directories without requiring a solution or a project file?
Which is good but not earthshaking
Anyway about the API
Steven Liekens
@StevenLiekens
Sep 29 2016 06:33
Don't forget to kiss
Our own DSL would be overkill
Steven Liekens
@StevenLiekens
Sep 29 2016 06:59
We're here to make it easier to use the API, not harder ;)
Robert Logiewa
@Ruhrpottpatriot
Sep 29 2016 13:27
yeah, I quickly saw that too. Writing a DSL would be too tailored for an HTTP connector. So I switched to a (simple) expression tree under the hood. This does not mean however, that a user who's just using the library will ever see them. The front end is a simple fluid interface, that does the work under the hood.
And if you want to write your own connector, you should be able to at least grasp the basics of expressions trees, since they are a big part in LINQ providers.
This message was deleted
This message was deleted
This message was deleted
This message was deleted
This message was deleted
This message was deleted
This message was deleted

I'm not aiming for an IQueryableimplementation, so the interface will be simple enough. As it stands, you can write Queries like this:

var builder = new QueryBuilder();
builder.AtLocation(() => this.Location).WithParameter(() => this.Parameter);

Then you'll get an expression tree which is converted into the proper request. You can also chain them as you like.