Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing using directive and extension method for converting ubiquitous series to a strongly typed collection #60

Merged
merged 5 commits into from
Oct 2, 2017

Conversation

joakimhew
Copy link
Contributor

No description provided.

@joakimhew joakimhew changed the title Add missing using directive for DEBUG configuration in RequestClientBase Add missing using directive and extension method for converting ubiquitous series to a strongly typed collection Sep 29, 2017

foreach (var serie in series)
{
var properties = t.GetProperties(BindingFlags.Instance | BindingFlags.Public).ToList();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly add some reflection caching for faster converting.

@tihomir-kit
Copy link
Owner

Hey man, thanks a lot for the PR. I'll try to test it out over the weekend and then deploy it to nuget. Cheers!

@joakimhew
Copy link
Contributor Author

Hey man. Just glad if I can help. I forgot to check if it's compatible with both target frameworks. I know some reflection is different in .NET Standard 2.0 so if you haven't already checked it I'll go through it in a bit.

@tihomir-kit
Copy link
Owner

Haven't looked at it yet. If you have the time and will, go for it. :)

@joakimhew
Copy link
Contributor Author

@pootzko All good 👍

@tihomir-kit tihomir-kit merged commit 03b34f9 into tihomir-kit:develop Oct 2, 2017
@tihomir-kit
Copy link
Owner

Also great stuff, thanks!

Type t = typeof(T);

foreach (var serie in series)
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pootzko One thing worth noting is that even though it iterates through all series the extensions expects each serie to match the structure of the type provided in 'T'. I'll see if I can come up with a solution to support different structured series. Cheers

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's fine. The end-user should take care of this in my opinion. The only situation where it could get a bit mess is if someone is using the MultiQuery to fetch different series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants