/// <summary> /// Adds an object with per call lifetime with inlined constructor parameters for the specified key /// </summary> /// <typeparam name="TSrc">The type that will be used as a key</typeparam> /// <param name="obj">Association container to which the addition is performed</param> /// <param name="objType">The type of the object that will be held by the PerCallInlinedParams lifetime container</param> public static void AddPerCallInlinedParams <TSrc>(this IPerCallInlinedParamsAssociationSupport <Type> obj, Type objType) { Contract.Requires(obj != null); Contract.Requires <ArgumentNullException>(objType != null); obj.AddPerCallInlinedParams(typeof(TSrc), objType); }
/// <summary> /// Adds an object with per call lifetime with inlined constructor parameters for the specified key /// </summary> /// <typeparam name="TSrc">The type that will be used as a key</typeparam> /// <param name="obj">Association container to which the addition is performed</param> /// <param name="objType">The type of the object that will be held by the PerCallInlinedParams lifetime container</param> public static void AddPerCallInlinedParams <TSrc>(this IPerCallInlinedParamsAssociationSupport <Type> obj, Type objType) { TurboContract.Requires(obj != null, conditionString: "obj != null"); TurboContract.Requires(objType != null, conditionString: "objType != null"); obj.AddPerCallInlinedParams(typeof(TSrc), objType); }
/// <summary> /// Adds an object with per call lifetime with inlined constructor parameters for the specified key /// </summary> /// <typeparam name="TSrc">The type that will be used as a key</typeparam> /// <typeparam name="TTarg">The type of the object that will be held by the PerCallInlinedParams lifetime container</typeparam> /// <param name="obj">Association container to which the addition is performed</param> public static void AddPerCallInlinedParams <TSrc, TTarg>(this IPerCallInlinedParamsAssociationSupport <Type> obj) { Contract.Requires(obj != null); obj.AddPerCallInlinedParams(typeof(TSrc), typeof(TTarg)); }