public AssemblyExplorerAppSettingsPage(DocumentTreeViewSettingsImpl documentTreeViewSettings)
        {
            if (documentTreeViewSettings == null)
            {
                throw new ArgumentNullException(nameof(documentTreeViewSettings));
            }
            this.documentTreeViewSettings = documentTreeViewSettings;

            ShowToken                          = documentTreeViewSettings.ShowToken;
            ShowAssemblyVersion                = documentTreeViewSettings.ShowAssemblyVersion;
            ShowAssemblyPublicKeyToken         = documentTreeViewSettings.ShowAssemblyPublicKeyToken;
            SingleClickExpandsTreeViewChildren = documentTreeViewSettings.SingleClickExpandsTreeViewChildren;
            SyntaxHighlight                    = documentTreeViewSettings.SyntaxHighlight;

            var defObjs = typeof(MemberKind).GetEnumValues().Cast <MemberKind>().ToArray();

            this.memberKindVMs = new MemberKindVM[defObjs.Length];
            for (int i = 0; i < defObjs.Length; i++)
            {
                this.memberKindVMs[i] = new MemberKindVM(defObjs[i], ToString(defObjs[i]));
            }
            this.memberKindVMs2 = this.memberKindVMs.ToArray();

            this.MemberKind0 = this.memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind0);
            this.MemberKind1 = this.memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind1);
            this.MemberKind2 = this.memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind2);
            this.MemberKind3 = this.memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind3);
            this.MemberKind4 = this.memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind4);
        }
        void SetMemberKind(int index, MemberKindVM newValue)
        {
            Debug.Assert(newValue != null);
            if (newValue == null)
            {
                throw new ArgumentNullException(nameof(newValue));
            }
            if (memberKindVMs[index] == newValue)
            {
                return;
            }

            int otherIndex = Array.IndexOf(memberKindVMs, newValue);

            Debug.Assert(otherIndex >= 0);
            if (otherIndex >= 0)
            {
                memberKindVMs[otherIndex] = memberKindVMs[index];
                memberKindVMs[index]      = newValue;

                OnPropertyChanged(string.Format("MemberKind{0}", otherIndex));
            }
            OnPropertyChanged(string.Format("MemberKind{0}", index));
        }
		public AssemblyExplorerAppSettingsPage(DocumentTreeViewSettingsImpl documentTreeViewSettings) {
			if (documentTreeViewSettings == null)
				throw new ArgumentNullException(nameof(documentTreeViewSettings));
			this.documentTreeViewSettings = documentTreeViewSettings;

			ShowToken = documentTreeViewSettings.ShowToken;
			ShowAssemblyVersion = documentTreeViewSettings.ShowAssemblyVersion;
			ShowAssemblyPublicKeyToken = documentTreeViewSettings.ShowAssemblyPublicKeyToken;
			SingleClickExpandsTreeViewChildren = documentTreeViewSettings.SingleClickExpandsTreeViewChildren;
			SyntaxHighlight = documentTreeViewSettings.SyntaxHighlight;

			var filterObjs = typeof(DocumentFilterType).GetEnumValues().Cast<DocumentFilterType>().ToArray();
			DocumentFilterTypes = new DocumentFilterTypeVM[filterObjs.Length];
			for (int i = 0; i < filterObjs.Length; i++)
				DocumentFilterTypes[i] = new DocumentFilterTypeVM(filterObjs[i], ToString(filterObjs[i]));

			FilterDraggedItems = DocumentFilterTypes.First(a => a.FilterType == documentTreeViewSettings.FilterDraggedItems);

			var defObjs = typeof(MemberKind).GetEnumValues().Cast<MemberKind>().ToArray();
			memberKindVMs = new MemberKindVM[defObjs.Length];
			for (int i = 0; i < defObjs.Length; i++)
				memberKindVMs[i] = new MemberKindVM(defObjs[i], ToString(defObjs[i]));
			memberKindVMs2 = memberKindVMs.ToArray();

			MemberKind0 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind0);
			MemberKind1 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind1);
			MemberKind2 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind2);
			MemberKind3 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind3);
			MemberKind4 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind4);
		}
		void SetMemberKind(int index, MemberKindVM newValue) {
			Debug.Assert(newValue != null);
			if (newValue == null)
				throw new ArgumentNullException(nameof(newValue));
			if (memberKindVMs[index] == newValue)
				return;

			int otherIndex = Array.IndexOf(memberKindVMs, newValue);
			Debug.Assert(otherIndex >= 0);
			if (otherIndex >= 0) {
				memberKindVMs[otherIndex] = memberKindVMs[index];
				memberKindVMs[index] = newValue;

				OnPropertyChanged(string.Format("MemberKind{0}", otherIndex));
			}
			OnPropertyChanged(string.Format("MemberKind{0}", index));
		}