public override void ApplyAttribute(IBsonSerializer serializer, Attribute attribute) { EnsureNotFrozen(); var representationAttribute = attribute as BsonRepresentationAttribute; if (representationAttribute != null) { _representation = representationAttribute.Representation; } }