public void Register <T1, T2>(CycleTimeOptions CycleTimeOption) { if (IoCDictionary.ContainsKey(typeof(T1))) { throw new Exception(string.Format("Type {0} already registered.", typeof(T1).FullName)); } ResolvedTypeWithCycleTimeOptions targetType = new ResolvedTypeWithCycleTimeOptions(typeof(T2), CycleTimeOption); IoCDictionary.Add(typeof(T1), targetType); }
public ResolvedTypeWithCycleTimeOptions(Type resolvedType, CycleTimeOptions CycleTimeOption) { ResolvedType = resolvedType; this.CycleTimeOption = CycleTimeOption; InstanceValue = null; }