Beispiel #1
0
        public override IConfigurationLoader[] GetGlassLoaders(Context context)
        {
            var loaders1 = GlassMapperScCustom.GlassLoaders();
            var loaders2 = base.GetGlassLoaders(context);

            return(loaders1.Concat(loaders2).ToArray());
        }
Beispiel #2
0
        public override IDependencyResolver CreateResolver()
        {
            var resolver = GlassMapperScCustom.CreateResolver();

            base.CreateResolver(resolver);
            return(resolver);
        }
Beispiel #3
0
        public override void LoadConfigurationMaps(IDependencyResolver resolver, Glass.Mapper.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);

            base.LoadConfigurationMaps(resolver, context);
        }
Beispiel #4
0
 public override void PostLoad(IDependencyResolver dependencyResolver)
 {
     GlassMapperScCustom.PostLoad();
     base.PostLoad(dependencyResolver);
 }