private void AddProviderType(string collectionName, string elementName, BsonValue elementValue, bool isKey = false) { Type providerType = ResolveProviderType(elementValue, isKey); var qualifiedName = GetQualifiedPropertyName(collectionName, elementName); if (providerType != null && !this.instanceMetadataCache.ProviderTypes.ContainsKey(qualifiedName)) { this.instanceMetadataCache.ProviderTypes.Add(qualifiedName, providerType); } }