<PackageReference Include="System.ClientModel" Version="1.3.0" />

IPersistableModel<T>

public interface IPersistableModel<T>
Allows an object to control its own writing and reading. The format is determined by the implementer.
using System.Runtime.CompilerServices; namespace System.ClientModel.Primitives { [System.Runtime.CompilerServices.NullableContext(1)] public interface IPersistableModel<[System.Runtime.CompilerServices.Nullable(2)] out T> { BinaryData Write(ModelReaderWriterOptions options); T Create(BinaryData data, ModelReaderWriterOptions options); string GetFormatFromOptions(ModelReaderWriterOptions options); } }