public override void ApplyAttribute(IBsonSerializer serializer, Attribute attribute) { EnsureNotFrozen(); var message = string.Format("A serialization options attribute of type {0} cannot be applied to serialization options of type {1}.", BsonUtils.GetFriendlyTypeName(attribute.GetType()), BsonUtils.GetFriendlyTypeName(GetType())); throw new NotSupportedException(message); }