/// <summary>
        /// Creates a deserializer builder.
        /// </summary>
        /// <param name="registryClient">
        /// The client to use for Schema Registry operations. (The client will not be disposed.)
        /// </param>
        /// <param name="deserializerBuilder">
        /// The deserializer builder to use to to generate deserialization functions for C# types.
        /// If none is provided, the default deserializer builder will be used.
        /// </param>
        /// <param name="schemaReader">
        /// The JSON schema reader to use to convert schemas received from the registry into abstract
        /// representations. If none is provided, the default schema reader will be used.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// Thrown when the registry client is null.
        /// </exception>
        public SchemaRegistryDeserializerBuilder(
            ISchemaRegistryClient registryClient,
            Serialization.IBinaryDeserializerBuilder deserializerBuilder = null,
            IJsonSchemaReader schemaReader = null
            )
        {
            _disposeRegistryClient = false;

            DeserializerBuilder = deserializerBuilder ?? new Serialization.BinaryDeserializerBuilder();
            RegistryClient      = registryClient ?? throw new ArgumentNullException(nameof(registryClient));
            SchemaReader        = schemaReader ?? new JsonSchemaReader();
        }
 /// <summary>
 /// Creates a deserializer builder.
 /// </summary>
 /// <param name="registryConfiguration">
 /// Schema Registry configuration. Using the <see cref="SchemaRegistryConfig" /> class is
 /// highly recommended.
 /// </param>
 /// <param name="deserializerBuilder">
 /// The deserializer builder to use to to generate deserialization functions for C# types.
 /// If none is provided, the default deserializer builder will be used.
 /// </param>
 /// <param name="schemaReader">
 /// The JSON schema reader to use to convert schemas received from the registry into abstract
 /// representations. If none is provided, the default schema reader will be used.
 /// </param>
 public SchemaRegistryDeserializerBuilder(
     IEnumerable <KeyValuePair <string, string> > registryConfiguration,
     Serialization.IBinaryDeserializerBuilder deserializerBuilder = null,
     IJsonSchemaReader schemaReader = null
     ) : this(
         new CachedSchemaRegistryClient(registryConfiguration),
         deserializerBuilder,
         schemaReader
         )
 {
     _disposeRegistryClient = true;
 }