A GenericObjectDefinition that provides attribute driven propulation of properties like LazyInit, Scope or Qualifier
Inheritance: Spring.Objects.Factory.Support.GenericObjectDefinition
 /// <summary>
 /// Registers the defintions for types.
 /// </summary>
 /// <param name="registry">The registry.</param>
 /// <param name="typesToRegister">The types to register.</param>
 private void RegisterDefinitionsForTypes(IObjectDefinitionRegistry registry, IEnumerable <Type> typesToRegister)
 {
     foreach (Type type in typesToRegister)
     {
         var    definition = new ScannedGenericObjectDefinition(type, Defaults);
         string objectName = ObjectNameGenerator.GenerateObjectName(definition, registry);
         registry.RegisterObjectDefinition(objectName, definition);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Registers the defintions for types.
        /// </summary>
        /// <param name="registry">The registry.</param>
        /// <param name="typesToRegister">The types to register.</param>
        private void RegisterDefinitionsForTypes(IObjectDefinitionRegistry registry, IEnumerable <Type> typesToRegister)
        {
            foreach (Type type in typesToRegister)
            {
                var    definition = new ScannedGenericObjectDefinition(type, Defaults);
                string objectName = ObjectNameGenerator.GenerateObjectName(definition, registry);
                string fullname   = type.FullName;

                Logger.Debug(m => m("Register Type: {0} with object name '{1}'", fullname, objectName));
                registry.RegisterObjectDefinition(objectName, definition);
            }
        }
        /// <summary>
        /// Registers the defintions for types.
        /// </summary>
        /// <param name="registry">The registry.</param>
        /// <param name="typesToRegister">The types to register.</param>
        private void RegisterDefinitionsForTypes(IObjectDefinitionRegistry registry, IEnumerable<Type> typesToRegister)
        {
            foreach (Type type in typesToRegister)
            {
                var definition = new ScannedGenericObjectDefinition(type, Defaults);
                string objectName = ObjectNameGenerator.GenerateObjectName(definition, registry);
                string fullname = type.FullName;

                Logger.Debug(m => m("Register Type: {0} with object name '{1}'", fullname, objectName));
                registry.RegisterObjectDefinition(objectName, definition);
            }
        }
 /// <summary>
 /// Registers the defintions for types.
 /// </summary>
 /// <param name="registry">The registry.</param>
 /// <param name="typesToRegister">The types to register.</param>
 private void RegisterDefinitionsForTypes(IObjectDefinitionRegistry registry, IEnumerable<Type> typesToRegister)
 {
     foreach (Type type in typesToRegister)
     {
         var definition = new ScannedGenericObjectDefinition(type, Defaults);
         string objectName = ObjectNameGenerator.GenerateObjectName(definition, registry);
         registry.RegisterObjectDefinition(objectName, definition);
     }
 }