Class Response
Basic response from GameJolt.
Inheritance
System.Object
Response
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()
Assembly: GameJolt.dll
Syntax
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 Parameters
|
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
|
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
|
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
|
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 Parameters
|
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 Parameters
|
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 Parameters