WpfDataUi.DataUiGrid.ApplyDisplayPropertyToInstanceMember C# (CSharp) Method

ApplyDisplayPropertyToInstanceMember() private method

private ApplyDisplayPropertyToInstanceMember ( InstanceMemberDisplayProperties displayProperties, InstanceMember member, WpfDataUi.DataTypes.MemberCategory category ) : void
displayProperties WpfDataUi.DataTypes.InstanceMemberDisplayProperties
member WpfDataUi.DataTypes.InstanceMember
category WpfDataUi.DataTypes.MemberCategory
return void
        private void ApplyDisplayPropertyToInstanceMember(InstanceMemberDisplayProperties displayProperties, InstanceMember member, MemberCategory category)
        {
            if (displayProperties.IsHiddenDelegate != null && mMembersWithOptionalVisibility.ContainsKey(member) == false)
            {
                mMembersWithOptionalVisibility.Add(member, displayProperties.IsHiddenDelegate);
            }

            //if (displayProperties.GetEffectiveIsHidden(member.Instance))
            // let's instead just use the hidden property - we will apply functions after
            if (displayProperties.IsHidden)
            {
                category.Members.Remove(member);
            }
            else
            {
                // Put an if-statement for debugging
                if (member.PreferredDisplayer != displayProperties.PreferredDisplayer)
                {
                    member.PreferredDisplayer = displayProperties.PreferredDisplayer;
                }
                member.DisplayName = displayProperties.DisplayName;
                if (!string.IsNullOrEmpty(displayProperties.Category) && category.Name != displayProperties.Category)
                {
                    category.Members.Remove(member);

                    MemberCategory newCategory = GetOrInstantiateAndAddMemberCategory(displayProperties.Category);
                    member.Category = newCategory;
                    newCategory.Members.Add(member);
                }

            }
        }