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

Pass build type to injection attributes #159

Merged
merged 1 commit into from
Oct 26, 2018

Conversation

arodus
Copy link
Contributor

@arodus arodus commented Oct 23, 2018

No description provided.

@@ -22,6 +23,13 @@ namespace Nuke.Common.Execution
public abstract class InjectionAttributeBase : Attribute
{
[CanBeNull]
public abstract object GetValue(string memberName, Type memberType);
[Obsolete("Use GetValue(string memberName, Type memberType, MemberInfo memberInfo) instead.", error: true)]
Copy link
Member

Choose a reason for hiding this comment

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

It's probably not called from user code, so won't have any effect. Imo, just remove.

@@ -17,6 +17,7 @@ public static void InjectValues(NukeBuild build)
var injectionMembers = build.GetInjectionMembers()
.OrderByDescending(x => x.GetCustomAttribute<ParameterAttribute>() != null);

var buildType = build.GetType();
Copy link
Member

Choose a reason for hiding this comment

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

Would prefer inlining.

@matkoch matkoch added this to the v0.12.0 milestone Oct 23, 2018
@arodus arodus force-pushed the feature/attribute-injection-improvement branch from a27015a to ffe0007 Compare October 24, 2018 07:01
@matkoch matkoch changed the title Type of build class is now also passed to InjectionAttribute Pass build type to injection attributes Oct 26, 2018
@matkoch matkoch merged commit 4994b7a into develop Oct 26, 2018
@matkoch matkoch deleted the feature/attribute-injection-improvement branch October 30, 2018 20:04
@lock
Copy link

lock bot commented Nov 20, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants