1 /** 2 * Copyright: (c) 2015-2017, Milofon Project. 3 * License: Subject to the terms of the BSD license, as written in the included LICENSE.txt file. 4 * Author: <m.galanin@milofon.org> Maksim Galanin 5 * Date: 2018-01-28 6 */ 7 8 module dango.service.serializer; 9 10 public 11 { 12 import dango.service.serializer.core : Serializer, UniNode, 13 marshalObject, unmarshalObject; 14 } 15 16 private 17 { 18 import poodinis : DependencyContainer, ApplicationContext; 19 import dango.system.container : registerByName; 20 21 import dango.service.serializer.json : JsonSerializer; 22 import dango.service.serializer.msgpack : MsgPackSerializer; 23 } 24 25 26 class SerializerContext : ApplicationContext 27 { 28 override void registerDependencies(shared(DependencyContainer) container) 29 { 30 container.registerByName!(Serializer, JsonSerializer)("json"); 31 container.registerByName!(Serializer, MsgPackSerializer)("msgpack"); 32 } 33 }