Beispiel #1
0
 public SchemaRegistryFactory(
     JsonSerializerSettings jsonSerializerSettings,
     SchemaRegistrySettings schemaRegistrySettings)
 {
     _jsonSerializerSettings = jsonSerializerSettings;
     _schemaRegistrySettings = schemaRegistrySettings;
 }
Beispiel #2
0
 public SchemaRegistry(
     JsonSerializerSettings jsonSerializerSettings,
     SchemaRegistrySettings settings = null)
 {
     _jsonSerializerSettings = jsonSerializerSettings;
     _jsonContractResolver = _jsonSerializerSettings.ContractResolver ?? new DefaultContractResolver();
     _settings = settings ?? new SchemaRegistrySettings();
     _schemaIdManager = new SchemaIdManager(_settings.SchemaIdSelector);
     Definitions = new Dictionary<string, Schema>();
 }
Beispiel #3
0
        private SchemaRegistry Subject(Action <SchemaRegistrySettings> configure = null)
        {
            var settings = new SchemaRegistrySettings();

            if (configure != null)
            {
                configure(settings);
            }

            return(new SchemaRegistry(new JsonSerializerSettings(), settings));
        }