/// <summary> /// Adds the services related to serialization to the provided service collection. /// </summary> /// <param name="services">The service collection to add serialization services to.</param> public static void AddSerializers(this ServiceCollection services) { var conceptConverter = new ConceptConverter(); var settings = new JsonSerializerSettings { Converters = new[] { conceptConverter } }; services.AddSingleton <ISerializer>(new Serializer(settings)); services.AddSingleton(settings); services.AddSingleton(conceptConverter); }
public a_concept_converter() { converter = new ConceptConverter(); }