MongoDB.Bson.Serialization.Options.DocumentSerializationOptions.ApplyAttribute C# (CSharp) Метод

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

Apply an attribute to these serialization options and modify the options accordingly.
public ApplyAttribute ( IBsonSerializer serializer, Attribute attribute ) : void
serializer IBsonSerializer The serializer that these serialization options are for.
attribute System.Attribute The serialization options attribute.
Результат void
        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);
        }