System Library Common Framework
Search Results for

    *.Benchmark*,*.Tests*,*.ApiTests*,*.BaseTest*,DelegateJsonConverter,CalleeCancelledRequestException,ClientResponse,ContentType,OutputCachePolicy
    Show / Hide Table of Contents Show / Hide Table of Contents
    NamespaceSystemLibrary.Common.Framework.App SystemLibrary.Common.Framework.Client.dll

    The response that all Client methods returns

    Note that a response statuscode might be 200 OK, but the IsSuccess might be false in scenarios where no response were returned

    ClientResponse<T>

    public class ClientResponse<T> : ClientResponse, IDisposable

    Inheritance
    object
    ClientResponse<T>
    Implements
    IDisposable
    Inherited Members
    ClientResponse.Response
    ClientResponse.IsSuccess
    Type Parameters
    Name Description
    T

    T can be a string that you later can convert to json, or it can be a class, or a list of a class that will automatically be converted from json, assuming json response

    Examples
    Arguments
    X
    Generic types
    Name Description
    T

    T can be a string that you later can convert to json, or it can be a class, or a list of a class that will automatically be converted from json, assuming json response

    Constructors

    Pass in a custom status code of your own choice

    public ClientResponse(HttpStatusCode statusCode)

    X
    Methods arguments
    Type Name Description
    HttpStatusCode statusCode

    Optional: pass in a default data with response status code of 500

    Useful if you want to give some custom messages/data upwards to the callee

    public ClientResponse(T defaultData = default)

    X
    Methods arguments
    Type Name Description
    T defaultData

    Pass in a default data with response status code

    Useful if you want to give some custom messages/data and custom status code upwards to the callee

    public ClientResponse(T defaultData, HttpStatusCode statusCode)

    X
    Methods arguments
    Type Name Description
    T defaultData
    HttpStatusCode statusCode

    Properties

    The response that all Client methods returns

    Note that a response statuscode might be 200 OK, but the IsSuccess might be false in scenarios where no response were returned

    public T Data { get; }

    X
    Property Value
    Type Description
    T

    The response that all Client methods returns

    Note that a response statuscode might be 200 OK, but the IsSuccess might be false in scenarios where no response were returned

    public string Message { get; }

    X
    Property Value
    Type Description
    string

    The response that all Client methods returns

    Note that a response statuscode might be 200 OK, but the IsSuccess might be false in scenarios where no response were returned

    public HttpStatusCode StatusCode { get; }

    X
    Property Value
    Type Description
    HttpStatusCode

    Methods

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    public void Dispose()

    X

    Implements

    IDisposable

    Extension Methods

    ObjectExtensions.Json(object, bool)
    ObjectExtensions.Json(object, JsonSerializerOptions, bool, params JsonConverter[])
    ObjectExtensions.Json(object, params JsonConverter[])
    ObjectExtensions.Xml(object)

    }

    In This Article
    Package: nuget
    Source: github
    Website: System Library Common Framework