Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was 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

Description

@pranavkm

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions