public static IServiceCollection AddBacklight(this IServiceCollection services, Action <IServiceOptions> setupAction = null)
        {
            var options = new ServiceOptions();

            if (setupAction != null)
            {
                setupAction(options);
            }
            var entitySerializer = new JsonEntitySerializer();

            return(services.AddSingleton(new BacklightService(options, entitySerializer))
                   .AddSingleton <StreamSerializer>(new MemoryStreamSerializer())
                   .AddSingleton <ApiRunner>()
                   .AddSingleton <OpenApiGenerator>());
        }
Ejemplo n.º 2
0
 protected BaseConnector()
 {
     Serializer = new JsonEntitySerializer();
 }
Ejemplo n.º 3
0
 public void SetUp()
 {
     serializer = new JsonEntitySerializer();
 }
Ejemplo n.º 4
0
        public Func <string, string> FixResponseContent; //Needed for fixing irregular json responses //TODO: rename to adapt deserialization //pre-deserialization

        public AdaptableSerializer()
        {
            serializer = new JsonEntitySerializer();
        }