attributing a type with DataContractAttribute to signal that only type members explicitly attributed with DataMemberAttribute should be included for serialization
attributing an interface with InterfaceDataContractAttribute to signal that only type members explicitly attributed with DataMemberAttribute should be included for serialization. DataContractAttribute cannot be applied to interfaces, but serializing a concrete instance of a type that implements an interface by using the interface is a valid use case.
This PR adds support for
DataContractAttribute
to signal that only type members explicitly attributed withDataMemberAttribute
should be included for serializationInterfaceDataContractAttribute
to signal that only type members explicitly attributed withDataMemberAttribute
should be included for serialization.DataContractAttribute
cannot be applied to interfaces, but serializing a concrete instance of a type that implements an interface by using the interface is a valid use case.