Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Activate activates non-public Controller properties, but [From*] do not #2278

Closed
pranavkm opened this issue Mar 27, 2015 · 4 comments
Closed
Assignees
Milestone

Comments

@pranavkm
Copy link
Contributor

We have a mismatch between what we'd be willing to activate using [ActivateAttribute] as opposed to [From*] attributes. Consider

public class TestController
{
    [Activate]
    protected HttpContext HttpContext2 { get; set; }

    [FromServices]
    protected IMyService SomeService { get; set; }
}

We'll activate the HttpContext2 property, but not model bind the SomeService property. We should consider changing activation to only look at public properties although this might have impact on other things that also get activated.

@pranavkm pranavkm added the bug label Mar 27, 2015
@danroth27 danroth27 added this to the 6.0.0-beta5 milestone Mar 27, 2015
@danroth27
Copy link
Member

@rynowak Reconcile as part of #2151.

@danroth27
Copy link
Member

@rynowak Can this issue be closed now that #2151 is done?

@rynowak
Copy link
Member

rynowak commented May 27, 2015

No, we didn't change this behavior as part of #2151. It does exactly what it did before with the new attributes like [ActionContext]

@rynowak rynowak modified the milestones: 6.0.0-beta6, 6.0.0-beta5 May 28, 2015
rynowak added a commit that referenced this issue Jun 4, 2015
@rynowak rynowak closed this as completed in a452b10 Jun 8, 2015
@rynowak rynowak added 3 - Done and removed 1 - Ready labels Jun 8, 2015
@rynowak
Copy link
Member

rynowak commented Jun 8, 2015

a452b10

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

No branches or pull requests

3 participants