예제 #1
0
        /// <summary>
        /// Creates a lifetime container by object type and lifetime factory
        /// </summary>
        /// <param name="key">The key that will be used to store lifetime container inside the current AssociationContainer</param>
        /// <param name="objType">The type of the object that will be held by the lifetime container</param>
        /// <param name="val">Factory to create a lifetime container for the sepcified 'objType'</param>
        /// <returns>Created lifetime container</returns>
        protected override Lifetime.LifetimeBase ProduceResolveInfo(Type key, Type objType, Lifetime.Factories.LifetimeFactory val)
        {
            TurboContract.Requires(key != null, conditionString: "key != null");
            TurboContract.Requires(objType != null, conditionString: "objType != null");
            TurboContract.Requires(val != null, conditionString: "val != null");

            return(val.Create(objType, this, null));
        }
예제 #2
0
 /// <summary>
 /// Creates a lifetime container by object type and lifetime factory
 /// </summary>
 /// <param name="key">The key that will be used to store lifetime container inside the current AssociationContainer</param>
 /// <param name="objType">The type of the object that will be held by the lifetime container</param>
 /// <param name="val">Factory to create a lifetime container for the sepcified 'objType'</param>
 /// <returns>Created lifetime container</returns>
 protected override Lifetime.LifetimeBase ProduceResolveInfo(Type key, Type objType, Lifetime.Factories.LifetimeFactory val)
 {
     return(val.Create(objType, _resolver, null));
 }