コード例 #1
0
ファイル: SchemaRegistryFactory.cs プロジェクト: yazici/Ahoy
 public SchemaRegistryFactory(
     JsonSerializerSettings jsonSerializerSettings,
     SchemaRegistrySettings schemaRegistrySettings)
 {
     _jsonSerializerSettings = jsonSerializerSettings;
     _schemaRegistrySettings = schemaRegistrySettings;
 }
コード例 #2
0
ファイル: SchemaRegistry.cs プロジェクト: yazici/Ahoy
 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>();
 }
コード例 #3
0
ファイル: SchemaRegistryTests.cs プロジェクト: yazici/Ahoy
        private SchemaRegistry Subject(Action <SchemaRegistrySettings> configure = null)
        {
            var settings = new SchemaRegistrySettings();

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

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