/// <summary>
 /// Initializes a new instance of the <see cref="DocumentSelectionData" /> class
 /// with <see cref="SelectionMode" /> set to <see cref="DocumentSelectionMode.DocumentSet" />.
 /// </summary>
 /// <param name="documentSet">The selected <see cref="DocumentSet" />.</param>
 /// <exception cref="ArgumentNullException"><paramref name="documentSet" /> is null.</exception>
 public DocumentSelectionData(DocumentSet documentSet)
     : this(DocumentSelectionMode.DocumentSet, null, documentSet, null)
 {
     if (documentSet == null)
     {
         throw new ArgumentNullException(nameof(documentSet));
     }
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="DocumentSelectionData"/> class
        /// with the specified <see cref="DocumentSelectionMode" /> and components.
        /// </summary>
        /// <param name="mode">The <see cref="DocumentSelectionMode" /> to use.</param>
        /// <param name="selectedDocuments">The collection of <see cref="Document" /> selections, or null.</param>
        /// <param name="documentSet">The selected <see cref="DocumentSet" />, or null.</param>
        /// <param name="documentQuery">The specified <see cref="DocumentQuery" />.</param>
        public DocumentSelectionData(DocumentSelectionMode mode, IEnumerable <Document> selectedDocuments, DocumentSet documentSet, DocumentQuery documentQuery)
        {
            _selectionMode = mode;

            if (selectedDocuments != null)
            {
                _selectedDocuments = new DocumentIdCollection(selectedDocuments);
            }
            else
            {
                _selectedDocuments = new DocumentIdCollection();
            }

            if (documentSet != null)
            {
                _documentSetName = documentSet.Name;
            }

            if (documentQuery != null)
            {
                _documentQuery = documentQuery;
            }
            else
            {
                _documentQuery = new DocumentQuery();
            }
        }