Esempio n. 1
0
        public Entities(IDbClientConnection connection, ISerializer serializer, IEntityReflector entityReflector)
            : base(connection)
        {
            Ensure.That(serializer, "serializer").IsNotNull();
            Ensure.That(entityReflector, "entityReflector").IsNotNull();

            Serializer               = serializer;
            Reflector                = entityReflector;
            EntityResponseFactory    = new EntityResponseFactory(serializer, Reflector);
            GetHttpRequestFactory    = new GetEntityHttpRequestFactory();
            PostHttpRequestFactory   = new PostEntityHttpRequestFactory(Serializer);
            PutHttpRequestFactory    = new PutEntityHttpRequestFactory(Reflector, Serializer);
            DeleteHttpRequestFactory = new DeleteEntityHttpRequestFactory(Reflector);
        }
Esempio n. 2
0
        public Entities(IDbConnection connection, ISerializer serializer, IEntityReflector entityReflector)
            : base(connection)
        {
            Ensure.Any.IsNotNull(serializer, nameof(serializer));
            Ensure.Any.IsNotNull(entityReflector, nameof(entityReflector));

            Serializer               = serializer;
            Reflector                = entityReflector;
            EntityResponseFactory    = new EntityResponseFactory(serializer, Reflector);
            GetHttpRequestFactory    = new GetEntityHttpRequestFactory();
            PostHttpRequestFactory   = new PostEntityHttpRequestFactory(Serializer);
            PutHttpRequestFactory    = new PutEntityHttpRequestFactory(Reflector, Serializer);
            DeleteHttpRequestFactory = new DeleteEntityHttpRequestFactory(Reflector);
            PurgeHttpRequestFactory  = new PurgeEntityHttpRequestFactory(Reflector, Serializer);
            PurgeResponseFactory     = new PurgeResponseFactory(Serializer);
        }
Esempio n. 3
0
 protected virtual HttpRequest CreateHttpRequest <T>(DeleteEntityRequest <T> request) where T : class
 {
     return(DeleteEntityHttpRequestFactory.Create(request));
 }