Esempio n. 1
0
 public GraphQLHttpResponse(GraphQLResponse <T> response, HttpResponseHeaders responseHeaders, HttpStatusCode statusCode)
 {
     Data            = response.Data;
     Errors          = response.Errors;
     ResponseHeaders = responseHeaders;
     StatusCode      = statusCode;
 }
Esempio n. 2
0
 /// <summary>
 /// Casts <paramref name="response"/> to <see cref="GraphQLHttpResponse{T}"/>. Throws if the cast fails.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="response"></param>
 /// <exception cref="InvalidCastException"><paramref name="response"/> is not a <see cref="GraphQLHttpResponse{T}"/></exception>
 /// <returns></returns>
 public static GraphQLHttpResponse <T> AsGraphQLHttpResponse <T>(this GraphQLResponse <T> response) => (GraphQLHttpResponse <T>)response;
Esempio n. 3
0
 public static GraphQLHttpResponse <T> ToGraphQLHttpResponse <T>(this GraphQLResponse <T> response, HttpResponseHeaders responseHeaders, HttpStatusCode statusCode) => new GraphQLHttpResponse <T>(response, responseHeaders, statusCode);