Exemple #1
0
        /// <summary>
        /// Register a new system collection that can be used in query for input/output data
        /// Collection name must starts with $
        /// </summary>
        internal void RegisterSystemCollection(SystemCollection systemCollection)
        {
            if (systemCollection == null)
            {
                throw new ArgumentNullException(nameof(systemCollection));
            }

            _systemCollections[systemCollection.Name] = systemCollection;
        }
Exemple #2
0
        /// <summary>
        /// Register a new system collection that can be used in query for input data
        /// Collection name must starts with $
        /// </summary>
        internal void RegisterSystemCollection(string collectionName, Func <IEnumerable <BsonDocument> > factory)
        {
            if (collectionName.IsNullOrWhiteSpace())
            {
                throw new ArgumentNullException(nameof(collectionName));
            }
            if (factory == null)
            {
                throw new ArgumentNullException(nameof(factory));
            }

            _systemCollections[collectionName] = new SystemCollection(collectionName, factory);
        }