Mongo.Context.MongoMetadata.ResolveProviderType C# (CSharp) Method

ResolveProviderType() private static method

private static ResolveProviderType ( BsonValue elementValue, bool isKey ) : Type
elementValue BsonValue
isKey bool
return System.Type
        private static Type ResolveProviderType(BsonValue elementValue, bool isKey)
        {
            if (elementValue.GetType() == typeof(BsonArray) || elementValue.GetType() == typeof(BsonDocument))
            {
                return elementValue.GetType();
            }
            else if (BsonTypeMapper.MapToDotNetValue(elementValue) != null)
            {
                return GetRawValueType(elementValue, isKey);
            }
            else
            {
                return null;
            }
        }