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