Ejemplo n.º 1
0
        /// <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();
            }
        }