private ObjectConfigurationInfo CreateObjectConfiguration(ConfigureDelegate configMethod) { ObjectConfigurationInfo config = new ObjectConfigurationInfo(); config.ConfigureDelegate = configMethod; return(config); }
public void ConfigureObject <T>(object item) { if (state.TypedObjectConfigurations.ContainsKey(typeof(T))) { ObjectConfigurationInfo config = state.TypedObjectConfigurations[typeof(T)]; config.ConfigureDelegate(item); ConfigureObjectWithTemplates(item); return; } throw ExceptionHelper.TypedConfigurationNotFoundException(typeof(T)); }
public void ConfigureObject <T>(string configId, T item) { if (state.NamedObjectConfigurations.ContainsKey(configId)) { ObjectConfigurationInfo config = state.NamedObjectConfigurations[configId]; config.ConfigureDelegate(item); ConfigureObjectWithTemplates(item); return; } throw ExceptionHelper.NamedConfigurationNotFoundException(configId); }
private void RegisterObjectTemplateConfigurationMethod(Type configType, ConfigureDelegate configMethod) { ObjectConfigurationInfo config = CreateObjectConfiguration(configMethod); state.ApplyToAllObjectConfigurations.Add(configType, config); }
public void RegisterObjectConfigurationMethod(string configId, ConfigureDelegate configMethod) { ObjectConfigurationInfo config = CreateObjectConfiguration(configMethod); state.NamedObjectConfigurations.Add(configId, config); }