/// <summary> /// Initializes new instance of <see cref="SchemaRegistryAvroSerializer"/>. /// </summary> public SchemaRegistryAvroSerializer(SchemaRegistryClient client, string groupName, SchemaRegistryAvroSerializerOptions options = null) { _client = client ?? throw new ArgumentNullException(nameof(client)); _groupName = groupName ?? throw new ArgumentNullException(nameof(groupName)); _options = options; }
/// <summary> /// Initializes a new instance of the <see cref="SchemaRegistryAvroSerializer"/>. This constructor can be used to create an instance /// that will work for both serialization and deserialization. /// </summary> /// <param name="client">The <see cref="SchemaRegistryClient"/> instance to use for looking up schemas.</param> /// <param name="groupName">The Schema Registry group name that contains the schemas that will be used to serialize.</param> /// <param name="options">The set of options to customize the <see cref="SchemaRegistryAvroSerializer"/>.</param> /// <exception cref="ArgumentNullException"></exception> public SchemaRegistryAvroSerializer(SchemaRegistryClient client, string groupName, SchemaRegistryAvroSerializerOptions options) { _client = client ?? throw new ArgumentNullException(nameof(client)); _groupName = groupName; _options = options?.Clone() ?? new SchemaRegistryAvroSerializerOptions(); }