internal bool TryGetCollectionContext(string collectionName, out IMongoDbCollectionContext collectionContext) { if (collectionName == null) { throw new ArgumentNullException(nameof(collectionName)); } if (!collectionNames.TryGetValue(collectionName.ToLower(), out int index)) { collectionContext = null; return(false); } collectionContext = collections[index]; return(true); }
internal bool TryGetCollectionContext(Type documentType, out IMongoDbCollectionContext collectionContext) { if (documentType == null) { throw new ArgumentNullException(nameof(documentType)); } if (!collectionDocumentTypes.TryGetValue(documentType, out int index)) { collectionContext = null; return(false); } collectionContext = collections[index]; return(true); }