Show / Hide Table of Contents

Class Response

Basic response from GameJolt.

Inheritance
System.Object
Response
Response<T>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: GameJolt
Assembly: GameJolt.dll
Syntax
public class Response

Properties

| Improve this Doc View Source

Exception

If the request failed due to an exception, the exception can be retrieved here.

Declaration
public Exception Exception { get; }
Property Value
Type Description
System.Exception
| Improve this Doc View Source

Message

Message in case of error.

Declaration
public string Message { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Success

Whether the request has succeeded or not.

Declaration
public bool Success { get; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

Create<T>(T)

Creates a succeeded response providing the given data.

Declaration
public static Response<T> Create<T>(T data)
Parameters
Type Name Description
T data
Returns
Type Description
Response<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

Failure(Response)

Instantiates a new failed response based on the given response.

Declaration
public static Response Failure(Response response)
Parameters
Type Name Description
Response response

The original failed response.

Returns
Type Description
Response
| Improve this Doc View Source

Failure(Exception)

Instantiates a new failed response with the given exception. The Message field is set to the exceptions message.

Declaration
public static Response Failure(Exception exception)
Parameters
Type Name Description
System.Exception exception

The cause of the failed request.

Returns
Type Description
Response
| Improve this Doc View Source

Failure(String)

Instantiates a new failed response with the given message.

Declaration
public static Response Failure(string message)
Parameters
Type Name Description
System.String message

The error message.

Returns
Type Description
Response
| Improve this Doc View Source

Failure<T>(Response)

Instantiates a new failed response based on the given response.

Declaration
public static Response<T> Failure<T>(Response response)
Parameters
Type Name Description
Response response

The original failed response.

Returns
Type Description
Response<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

Failure<T>(Exception)

Instantiates a new failed response with the given exception. The Message field is set to the exceptions message.

Declaration
public static Response<T> Failure<T>(Exception exception)
Parameters
Type Name Description
System.Exception exception

The cause of the failed request.

Returns
Type Description
Response<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

Failure<T>(String)

Instantiates a new failed response with the given message.

Declaration
public static Response<T> Failure<T>(string message)
Parameters
Type Name Description
System.String message

The error message.

Returns
Type Description
Response<T>
Type Parameters
Name Description
T
  • Improve this Doc
  • View Source
Back to top Generated by DocFX