internal static bool BindItemHelper(IOptionItem item, string virtualPropertyName, IOptionGroup group, ISelectionProvider <T> selectionProvider, string prefix, bool addToOptionHandler)
        {
            bool retval = false;
            IOptionItemFilter <T> filter = item.Lookup <IOptionItemFilter <T> >();
            string finalName             = DefaultOptionBuilderContext <object> .CreatePrefix(prefix, virtualPropertyName);

            OptionItemValidities validities;

            if (filter == null)
            {
                validities = CheckValidity(new DefaultOptionItemFilter <T>(finalName), selectionProvider);
            }
            else
            {
                validities = CheckValidity(new DefaultOptionItemFilter <T>(finalName), selectionProvider)
                             & CheckValidity(filter, selectionProvider);
            }
            if (validities != OptionItemValidities.Invalid)
            {
                CompositeHandler <T> .Create(selectionProvider, finalName, item);

                if (addToOptionHandler)
                {
                    group.Items.Add(item);
                }
                retval = true;
                if (validities != OptionItemValidities.ReadWrite)
                {
                    item.Enabled = false;
                }
            }
            return(retval);
        }
 public virtual IPropertyItem AddEntry(string virtualPropertyName, IValueGetter getter, IValueSetter setter,
                                       IEqualityComparer comparer)
 {
     return(map.AddEntry(DefaultOptionBuilderContext <object> .CreatePrefix(this.prefix, virtualPropertyName), getter, setter, comparer));
 }
 public IPropertyBuildContext <TChild> CreateChildContext <TChild>(string name, GetInstanceDelegate <TChild> getHandler,
                                                                   SetInstanceDelegate <TChild> setHandler,
                                                                   AssignmentPolicy policy) where TChild : class
 {
     return(new DecoratedBuildContext <TChild>(innerLookup, contextLookup, DefaultOptionBuilderContext <object> .CreatePrefix(this.prefix, name), map, getHandler, setHandler, policy));
 }