protected override object Inject(ref InjectionContext context) { var value = context.Container.Resolver.Resolve(context); wrapper.Set(ref context.Instance, value); return value; }
public void SetValue(object instance) { if (instance == null) { return; } wrapper.Set(ref instance, value); }
public void Initialize(ref object instance, HashSet <object> toIgnore) { if (isPure) { field.Set(ref instance, referenceValue); return; } var instanceValue = field.Get(ref instance); if (GetType(instanceValue) != type) { field.Set(ref instance, referenceValue); } else if (isValue || toIgnore.Add(instanceValue)) { for (int i = 0; i < operations.Length; i++) { operations[i].Initialize(ref instanceValue, toIgnore); } field.Set(ref instance, instanceValue); } }
public override void Initialize(object instance, object value) { wrapper.Set(ref instance, value); }