void AddPropertyHiddenDelegate(string property, Func<InstanceMember, bool> hiddenDelegate, TypeMemberDisplayProperties allProperties)
        {
            InstanceMemberDisplayProperties imdp = new InstanceMemberDisplayProperties();
            imdp.Name = property;
            imdp.IsHiddenDelegate = hiddenDelegate;

            allProperties.DisplayProperties.Add(imdp);
        }
        public TypeMemberDisplayProperties Clone()
        {
            TypeMemberDisplayProperties toReturn = new TypeMemberDisplayProperties();

            foreach (var item in this.DisplayProperties)
            {
                toReturn.DisplayProperties.Add(item.Clone());
            }

            return toReturn;
        }
Пример #3
0
        public TypeMemberDisplayProperties Clone()
        {
            TypeMemberDisplayProperties toReturn = new TypeMemberDisplayProperties();

            foreach (var item in this.DisplayProperties)
            {
                toReturn.DisplayProperties.Add(item.Clone());
            }

            return(toReturn);
        }
        public TypeMemberDisplayProperties GetTypedMemberDisplayProperties()
        {
            TypeMemberDisplayProperties toReturn = new TypeMemberDisplayProperties();

            AddPropertyHiddenDelegate("IsFileRequirement", IsHiddenDelegate, toReturn);

            AddPropertyHiddenDelegate("RequiredExtension", IsFilePropertyHidden, toReturn);
            AddPropertyHiddenDelegate("LoadedOnlyWhenReferenced", IsFilePropertyHidden, toReturn);


            toReturn.AddIgnore("UiDisplayName");


            return toReturn;
        }
Пример #5
0
        public void Apply(TypeMemberDisplayProperties properties)
        {
            foreach (var property in properties.DisplayProperties)
            {
                // does this member exist?
                InstanceMember member;
                MemberCategory category;

                bool found = TryGetInstanceMember(property.Name, out member, out category);

                if (member != null)
                {
                    ApplyDisplayPropertyToInstanceMember(property, member, category);

                }
            }

            RefreshDelegateBasedElementVisibility();
        }