Example #1
0
		protected override object Inject(ref InjectionContext context)
		{
			var value = context.Container.Resolver.Resolve(context);
			wrapper.Set(ref context.Instance, value);

			return value;
		}
Example #2
0
        public void SetValue(object instance)
        {
            if (instance == null)
            {
                return;
            }

            wrapper.Set(ref instance, value);
        }
Example #3
0
        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);
            }
        }
Example #4
0
 public override void Initialize(object instance, object value)
 {
     wrapper.Set(ref instance, value);
 }