MongoDB.Bson.Serialization.BsonClassMapSerializationProvider.GetSerializer C# (CSharp) Метод

GetSerializer() публичный Метод

Gets the serializer for a type.
public GetSerializer ( Type type ) : IBsonSerializer
type System.Type The type.
Результат IBsonSerializer
        public IBsonSerializer GetSerializer(Type type)
        {
            if ((type.IsClass || (type.IsValueType && !type.IsPrimitive)) &&
                !typeof(Array).IsAssignableFrom(type) &&
                !typeof(Enum).IsAssignableFrom(type))
            {
                var classMap = BsonClassMap.LookupClassMap(type);
                return new BsonClassMapSerializer(classMap);
            }

            return null;
        }
    }
BsonClassMapSerializationProvider