Class FlexibleGuidAttribute
Overrides the global GuidStorageFormat for a single property. The serializer will still read all three formats (Standard, CSharpLegacy, String), but will write using the specified format.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
public sealed class FlexibleGuidAttribute : Attribute, IBsonMemberMapAttribute
- Inheritance
-
FlexibleGuidAttribute
- Implements
-
IBsonMemberMapAttribute
- Inherited Members
Constructors
FlexibleGuidAttribute(GuidStorageFormat)
public FlexibleGuidAttribute(GuidStorageFormat writeFormat = GuidStorageFormat.Standard)
Parameters
writeFormatGuidStorageFormat
Properties
WriteFormat
public GuidStorageFormat WriteFormat { get; }
Property Value
Methods
Apply(BsonMemberMap)
Applies the attribute to the member map.
public void Apply(BsonMemberMap memberMap)
Parameters
memberMapBsonMemberMapThe member map.