Use a custom atribute to inject component

I would like to know if there is a way to kind of “inject” a GetComponent.

Something like this:

[GetComponent]
private CharacterController playerController;

what this attribute will do underneath is the following:

playerController = GetComponent<CharacterController>();

Is this possible? It would be great if this could also add dinamically a “RequireComponent” but my guess is that this is not possible.

Thanks in advance

StrangeIoC is a inversion of control framework similar to robotlegs.