Lines Matching refs:name
24 name string member
31 name string member
39 name string member
70 func RegisterModuleType(name string, factory ModuleFactory) {
71 moduleTypes = append(moduleTypes, moduleType{name, factory})
74 func RegisterSingletonType(name string, factory SingletonFactory) {
75 singletons = append(singletons, singleton{name, SingletonFactoryAdaptor(factory)})
78 func RegisterPreSingletonType(name string, factory SingletonFactory) {
79 preSingletons = append(preSingletons, singleton{name, SingletonFactoryAdaptor(factory)})
94 ctx.RegisterPreSingletonType(t.name, t.factory)
98 ctx.RegisterModuleType(t.name, ModuleFactoryAdaptor(t.factory))
102 ctx.RegisterSingletonType(t.name, t.factory)
120 ret[t.name] = t.factory
130 RegisterModuleType(name string, factory ModuleFactory)
131 RegisterSingletonType(name string, factory SingletonFactory)
173 func (ctx *initRegistrationContext) RegisterModuleType(name string, factory ModuleFactory) {
174 if _, present := ctx.moduleTypes[name]; present {
175 panic(fmt.Sprintf("module type %q is already registered", name))
177 ctx.moduleTypes[name] = factory
178 RegisterModuleType(name, factory)
181 func (ctx *initRegistrationContext) RegisterSingletonType(name string, factory SingletonFactory) {
182 if _, present := ctx.singletonTypes[name]; present {
183 panic(fmt.Sprintf("singleton type %q is already registered", name))
185 ctx.singletonTypes[name] = factory
186 RegisterSingletonType(name, factory)