Permalink
Browse files

fixed config issue

  • Loading branch information...
mikeedwards83 committed Jan 1, 2013
1 parent e172442 commit 3fa0f0952507600aa253946a19fb1a8934ad0cca
Showing with 18 additions and 1 deletion.
  1. +18 −1 Source/Glass.Mapper.Sc/GlassConfig.cs
@@ -16,13 +16,17 @@
using Glass.Mapper.Pipelines.TypeResolver;
using Glass.Mapper.Pipelines.TypeResolver.Tasks.StandardResolver;
using Glass.Mapper.Sc.DataMappers;
+using Glass.Mapper.Sc.DataMappers.SitecoreQueryParameters;
namespace Glass.Mapper.Sc.Integration
{
public class GlassConfig : GlassCastleConfigBase
{
public override void Configure(WindsorContainer container, string contextName)
{
+
+ //****** Data Mappers ******//
+ // Used to convert data to and from Sitecore
container.Register(
Component.For<AbstractDataMapper>().ImplementedBy<SitecoreChildrenMapper>().LifestyleTransient(),
Component.For<AbstractDataMapper>().ImplementedBy<SitecoreFieldBooleanMapper>().LifestyleTransient(),
@@ -54,7 +58,20 @@ public override void Configure(WindsorContainer container, string contextName)
Component.For<AbstractDataMapper>().ImplementedBy<SitecoreItemMapper>().LifestyleTransient(),
Component.For<AbstractDataMapper>().ImplementedBy<SitecoreLinkedMapper>().LifestyleTransient(),
Component.For<AbstractDataMapper>().ImplementedBy<SitecoreParentMapper>().LifestyleTransient(),
- Component.For<AbstractDataMapper>().ImplementedBy<SitecoreQueryMapper>().LifestyleTransient(),
+ Component.For<AbstractDataMapper>().ImplementedBy<SitecoreQueryMapper>()
+ .DynamicParameters((k, d) =>
+ {
+ d["parameters"] = k.ResolveAll<ISitecoreQueryParameter>();
+ })
+ .LifestyleTransient(),
+
+ //****** SitecoreQueryMapper parameters ******//
+ // Used by the SitecoreQueryMapper to replace placeholders in queries
+ Component.For<ISitecoreQueryParameter>().ImplementedBy<ItemDateNowParameter>().LifestyleTransient(),
+ Component.For<ISitecoreQueryParameter>().ImplementedBy<ItemEscapedPathParameter>().LifestyleTransient(),
+ Component.For<ISitecoreQueryParameter>().ImplementedBy<ItemIdNoBracketsParameter>().LifestyleTransient(),
+ Component.For<ISitecoreQueryParameter>().ImplementedBy<ItemIdParameter>().LifestyleTransient(),
+ Component.For<ISitecoreQueryParameter>().ImplementedBy<ItemPathParameter>().LifestyleTransient(),
//****** Data Mapper Resolver Tasks ******//

0 comments on commit 3fa0f09

Please sign in to comment.