コード例 #1
0
        public void ShouldSetValues()
        {
            var property  = typeof(TestClass).GetProperty("StaticValue");
            var reference = new ValueInjection(property, "test");

            injector.Inject(new[] { reference });

            Assert.AreEqual("test", TestClass.StaticValue);
        }
コード例 #2
0
 void IInjector.Inject(ValueInjection injection)
 {
     injection.Property.SetValue(this, injection.Value, null);
 }