public static void LoadConfigurationMaps(IDependencyResolver resolver, GM.Context context) { var dependencyResolver = resolver as DependencyResolver; if (dependencyResolver == null) { return; } if (dependencyResolver.ConfigurationMapFactory is ConfigurationMapConfigFactory) { GlassMapperScCustom.AddMaps(dependencyResolver.ConfigurationMapFactory); } IConfigurationMap configurationMap = new ConfigurationMap(dependencyResolver); SitecoreFluentConfigurationLoader configurationLoader = configurationMap.GetConfigurationLoader <SitecoreFluentConfigurationLoader>(); context.Load(configurationLoader); }
public static void Start() { //install the custom services var resolver = GlassMapperScCustom.CreateResolver(); //create a context var context = GM.Context.Create(resolver); GlassMapperScCustom.RegisterCustomDataHandlers(resolver); LoadConfigurationMaps(resolver, context); context.Load( GlassMapperScCustom.GlassLoaders() ); GlassMapperScCustom.PostLoad(); //EditFrameBuilder.EditFrameItemPrefix = "Glass-"; }