/// <summary>
        /// Initializes a new instance of the <see cref="EntryDataItemViewModel"/> class.
        /// </summary>
        /// <param name="parent">The parent VM.</param>
        internal EntryDataItemViewModel(EntryViewModel parent)
        {
            Parent = parent;

            IsEnabled = true;
            Source = new EntryDataItem();
        }
        private AddressBook CompileAddressBookFromViewModel()
        {
            AddressBook addressBook = new AddressBook();

            foreach (EntryViewModel evm in this.Entries)
            {
                AddressBookEntry abe = new AddressBookEntry();
                abe.FirstName = evm.FirstName;
                abe.LastName = evm.LastName;

                foreach (EntryDataItemViewModel edivm in evm.DataItems)
                {
                    EntryDataItem edi = new EntryDataItem();
                    // Decide which value to use
                    if (edivm.Editor != null)
                    {
                        edi.IsEnabled = edivm.IsEnabled;
                        edi.Identifier = CustomDataEditors.CustomDataEditorCache.GetTypeEditorIdentifier(edivm.Editor.GetType());
                        edi.Data = edivm.Editor.Value;

                        // If there is no data available, skip this entry.
                        if (edi.Data == null)
                        {
                            continue;
                        }
                    }
                    else
                    {
                        if (edivm.Source != null)
                        {
                            edi = edivm.Source;
                        }

                        // TODO: What happens if there is no editor, AND no value?
                        continue;
                    }

                    abe.Data.Add(edi);
                }

                addressBook.Entries.Add(abe);
            }

            return addressBook;
        }