Exemple #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);
        }
Exemple #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);
        }
Exemple #3
0
 protected virtual HttpRequest CreateHttpRequest <T>(PutEntityRequest <T> request) where T : class
 {
     return(PutEntityHttpRequestFactory.Create(request));
 }