internal InjectionModel InjectSingleton(object formattedObject, Type referencedType) { var type = formattedObject.GetType(); var injectionModel = new InjectionModel(type, formattedObject, referencedType); InjectionModels.Add(injectionModel); return(injectionModel); }
internal InjectionModel InjectType(Type type) { var injectionModel = new InjectionModel( type: type, injectionMode: SpeckType.PerRequest); InjectionModels.Add(injectionModel); return(injectionModel); }
internal InjectionModel InjectSingleton(Type type) { var injectionModel = new InjectionModel( type: type, referencedType: type); InjectionModels.Add(injectionModel); return(injectionModel); }
internal InjectionModel InjectSingleton(Type type, Type referencedType, object[] instances) { InjectionModel injectionModel = instances.Any() ? new InjectionModel( type: type, referencedType: referencedType, parameters: instances) : new InjectionModel( type: type, referencedType: referencedType); InjectionModels.Add(injectionModel); return(injectionModel); }