Lines Matching refs:factory

53 	factory ModuleFactory  member
57 ctx.RegisterModuleType(t.name, ModuleFactoryAdaptor(t.factory))
68 factory SingletonFactory member
71 func newSingleton(name string, factory SingletonFactory) singleton {
72 return singleton{false, name, factory}
75 func newPreSingleton(name string, factory SingletonFactory) singleton {
76 return singleton{true, name, factory}
84 adaptor := SingletonFactoryAdaptor(ctx, s.factory)
110 func ModuleFactoryAdaptor(factory ModuleFactory) blueprint.ModuleFactory {
112 module := factory()
121 func SingletonFactoryAdaptor(ctx *Context, factory SingletonFactory) blueprint.SingletonFactory {
123 singleton := factory()
131 func RegisterModuleType(name string, factory ModuleFactory) {
132 moduleTypes = append(moduleTypes, moduleType{name, factory})
133 RegisterModuleTypeForDocs(name, reflect.ValueOf(factory))
141 func RegisterModuleTypeForDocs(name string, factory reflect.Value) {
142 moduleTypesForDocs[name] = factory
145 func RegisterSingletonType(name string, factory SingletonFactory) {
146 singletons = append(singletons, newSingleton(name, factory))
149 func RegisterPreSingletonType(name string, factory SingletonFactory) {
150 preSingletons = append(preSingletons, newPreSingleton(name, factory))
233 ret[t.name] = t.factory
247 RegisterModuleType(name string, factory ModuleFactory)
248 RegisterSingletonModuleType(name string, factory SingletonModuleFactory)
249 RegisterPreSingletonType(name string, factory SingletonFactory)
250 RegisterSingletonType(name string, factory SingletonFactory)
295 func (ctx *initRegistrationContext) RegisterModuleType(name string, factory ModuleFactory) {
299 ctx.moduleTypes[name] = factory
300 RegisterModuleType(name, factory)
301 RegisterModuleTypeForDocs(name, reflect.ValueOf(factory))
304 func (ctx *initRegistrationContext) RegisterSingletonModuleType(name string, factory SingletonModul…
305 s, m := SingletonModuleFactoryAdaptor(name, factory)
311 RegisterModuleTypeForDocs(name, reflect.ValueOf(factory))
314 func (ctx *initRegistrationContext) RegisterSingletonType(name string, factory SingletonFactory) {
318 ctx.singletonTypes[name] = factory
319 RegisterSingletonType(name, factory)
322 func (ctx *initRegistrationContext) RegisterPreSingletonType(name string, factory SingletonFactory)…
326 ctx.preSingletonTypes[name] = factory
327 RegisterPreSingletonType(name, factory)