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

Added non-generic versions of EnableImplicitTypingFrom* methods #494

Merged
merged 2 commits into from
Dec 10, 2020

Conversation

onetocny
Copy link
Contributor

@onetocny onetocny commented Dec 9, 2020

Current implementation of EnableImplicitTypingFromPublic allows to pass type as a generic parameter only. I have created non-generic variant that takes Type as ordinary parameter instead of generic.

@AppVeyorBot
Copy link

Build ExtendedXmlSerializer 3.5.0.1-kdcgnutf completed (commit fb0f329858 by @netaques)

Install it by running the following command in Package Manager Console:

Install-Package ExtendedXmlSerializer -Version 3.5.0.1-kdcgnutf -Source https://ci.appveyor.com/nuget/extendedxmlserializer-preview

Problems with the above command? You may be running into this known issue here:
NuGet/Home#7189

@Mike-E-angelo Mike-E-angelo added the enhancement (cc: feat) New feature or request label Dec 10, 2020
@Mike-E-angelo
Copy link
Member

Cool! Thank you for your contribution @netaques. It appears that this cannot be automatically rebased. Are you able to rebase to master on your end and cherry-pick this commit? I am unclear on how to do this on my end without having to create a new PR.

@AppVeyorBot
Copy link

Build ExtendedXmlSerializer 3.5.0.1-qlvykcgm completed (commit fde651d441 by @netaques)

Install it by running the following command in Package Manager Console:

Install-Package ExtendedXmlSerializer -Version 3.5.0.1-qlvykcgm -Source https://ci.appveyor.com/nuget/extendedxmlserializer-preview

Problems with the above command? You may be running into this known issue here:
NuGet/Home#7189

@onetocny
Copy link
Contributor Author

@Mike-E-angelo my fork should be rebased now, let me know if there are any other issues please.

@Mike-E-angelo
Copy link
Member

Mike-E-angelo commented Dec 10, 2020

Ok great... now that that has been resolved. 😁 The reward for diligent work is more diligent work. 😁 Since you've ripped the wrapping off the one method, would you be interested in rounding out the others? I think it would make sense to have the equivalents for the other methods as well:

  • ExtensionMethodsForImplicitTyping.EnableImplicitTypingFromPublic
  • ExtensionMethodsForImplicitTyping.EnableImplicitTypingFromAll
  • ExtensionMethodsForImplicitTyping.EnableImplicitTypingFromNamespace
  • ExtensionMethodsForImplicitTyping.EnableImplicitTypingFromNamespacePublic
  • ExtensionMethodsForImplicitTyping.EnableImplicitTypingFromNested
  • ExtensionMethodsForImplicitTyping.EnableImplicitTypingFromPublicNested

No worries if not, but thought I would ask before I went and did it myself. :)

@onetocny
Copy link
Contributor Author

Sure, that sounds reasonable. I can handle that.

@AppVeyorBot
Copy link

Build ExtendedXmlSerializer 3.5.0.1-iedmwdyl completed (commit 1f4925ab88 by @netaques)

Install it by running the following command in Package Manager Console:

Install-Package ExtendedXmlSerializer -Version 3.5.0.1-iedmwdyl -Source https://ci.appveyor.com/nuget/extendedxmlserializer-preview

Problems with the above command? You may be running into this known issue here:
NuGet/Home#7189

@onetocny
Copy link
Contributor Author

onetocny commented Dec 10, 2020

I was also thinking about adding another method that would return all public property types of the given type. For example calling this suggested method on type Outer from example below would return Outer, Inner, InnerInner. I have already written this for my purposes and I think that it might be useful also for others.

public class Outer
{
    public Inner Inner { get; set; } 
}

public class Inner
{
    public InnerInner InnerInner { get; set; }
}

public class InnerInner
{
}

Would you agree with something like that, probably in separate PR?

@Mike-E-angelo Mike-E-angelo changed the title Adding non-generic version of EnableImplicitTypingFromPublic extension method Added non-generic versions of EnableImplicitTypingFrom* methods Dec 10, 2020
@Mike-E-angelo Mike-E-angelo merged commit cd3a8c5 into ExtendedXmlSerializer:master Dec 10, 2020
@Mike-E-angelo
Copy link
Member

Would you agree with something like that, probably in separate PR?

That's a fantastic idea! I can't believe I didn't think of it. 😆 Yes let's start a new PR for that and we can take it from there. Thanks again for your contribution! We'll get this out next Tuesday. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement (cc: feat) New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants