public override void ConfigureDataHandler(Configuration.SitecoreProperty scProperty)
        {
            var attr = scProperty.Attribute as SitecoreItemAttribute;

            if (attr.Id.IsNullOrEmpty())
            {
                Path = attr.Path;
            }
            else
            {
                Guid id = Guid.Empty;
                if (attr.Id.GuidTryParse(out id))
                {
                    Id = id;
                }
                else
                {
                    throw new MapperException("Id is not a Guid on SitecoreItemAttribute\n\rClass: {0}\n\rMember:{1}".Formatted(scProperty.Property.ReflectedType.FullName, scProperty.Property.Name));
                }
            }

            this.IsLazy   = attr.IsLazy;
            this.Property = scProperty;
            base.ConfigureDataHandler(scProperty);
        }
        public override bool WillHandle(Configuration.SitecoreProperty property, IEnumerable <AbstractSitecoreDataHandler> datas, Dictionary <Type, Configuration.SitecoreClassConfig> classes)
        {
            if (!(property.Attribute is SitecoreFieldAttribute))
            {
                return(false);
            }
            var type = property.Property.PropertyType;

            if (!type.IsGenericType)
            {
                return(false);
            }
            var baseType = type.GetGenericTypeDefinition();

            if (baseType == typeof(RuleList <>))
            {
                return(true);
            }
            return(false);
        }
 public override bool WillHandle(Configuration.SitecoreProperty property, IEnumerable <AbstractSitecoreDataHandler> datas, Dictionary <Type, Configuration.SitecoreClassConfig> classes)
 {
     return(property.Attribute is SitecoreItemAttribute && classes.ContainsKey(property.Property.PropertyType));
 }