public static ICanConfigureCreatedObject <T> Register <T>(Func <IApplicationContext, T> objectCreation, string identifierName) { ICanContainConfiguration configurationParser = FluentStaticConfiguration.GetConfigurationParser(identifierName); if (configurationParser == null) { configurationParser = new ConstructorObjectDefinitionParser <T>(identifierName); } var objectBinder = new ConstructorObjectBinder <T>((ConstructorObjectDefinitionParser <T>)configurationParser); objectBinder.AddConstructorDelegate(objectCreation); FluentStaticConfiguration.RegisterObjectConfiguration(configurationParser); return(objectBinder); }
public ConstructorObjectBinder(ConstructorObjectDefinitionParser <T> configurationParser) { _configurationParser = configurationParser; }