Unity Static Property Injection
问题 I have two classes, one which sets up the container by registering types and one which contains a static property which I want to inject into. My issue is the property is never set by injection so when I call a method on it, the property is always null. public class ClassOne { public void Method() { Container.RegisterType<IClass, ClassImplOne>("ImplOne"); Container.RegisterType<IClass, ClassImplTwo>("ImplTwo"); } } public static class ClassTwo { [Dependency] public static IClass SomeProperty