Ejemplo n.º 1
0
 public SpotifyClient(IAccessTokenProvider accessTokenProvider, IQueryParameterBuilder queryParameterBuilder, HttpClient httpClient, JsonSerializer serializer, ILogger logger)
 {
     _accessTokenProvider   = accessTokenProvider;
     _queryParameterBuilder = queryParameterBuilder;
     _httpClient            = httpClient;
     _serializer            = serializer;
     _logger = logger;
 }
        public ContextualizedQueryParameterBuilder(IQueryDispatcher queryDispatcher, IQueryParameterBuilder queryParameterBuilder, IEntityContext entityContext)
        {
            if (queryDispatcher == null)
            {
                throw new ArgumentNullException(nameof(queryDispatcher));
            }

            if (queryParameterBuilder == null)
            {
                throw new ArgumentNullException(nameof(queryParameterBuilder));
            }

            if (entityContext == null)
            {
                throw new ArgumentNullException(nameof(entityContext));
            }

            this.queryDispatcher       = queryDispatcher;
            this.queryParameterBuilder = queryParameterBuilder;
            this.entityContext         = entityContext;
        }
 private static IQueryParameterBuilder SetParameterInternal <T>(this IQueryParameterBuilder instance, String name, T value)
 {
     return(value == null
                         ? instance.SetParameter(new NpgsqlParameter(name, DBNull.Value))
                         : instance.SetParameter(new NpgsqlParameter(name, value)));
 }
 public static IQueryParameterBuilder SetParameter(this IQueryParameterBuilder instance, String name, Boolean?value)
 {
     return(instance.SetParameterInternal(name, value));
 }