Class Service
Base class for all GameJolt services.
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.Services
Assembly: GameJolt.dll
Syntax
public abstract class Service
Constructors
| Improve this Doc View SourceService(GameJoltApi)
Constructs a new service by using the provided API instance.
Declaration
protected Service(GameJoltApi api)
Parameters
Type | Name | Description |
---|---|---|
GameJoltApi | api | The API instance which shall be used for the http requests. |
Properties
| Improve this Doc View SourceApi
API instance which is used to perform http requests.
Declaration
protected GameJoltApi Api { get; }
Property Value
Type | Description |
---|---|
GameJoltApi |
Methods
| Improve this Doc View SourceWrap(Task<Response>, Action<Response>)
Utility function used to provide callback APIs by internally using the async API. When the provided tasks finishes, the provided callback will be called.
Declaration
protected void Wrap(Task<Response> task, Action<Response> callback)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.Tasks.Task<Response> | task | The async task which should be wrapped. |
System.Action<Response> | callback | The callback which shall be called when the task finishes. |
Wrap<T>(Task<Response<T>>, Action<Response<T>>)
Utility function used to provide callback APIs by internally using the async API. When the provided tasks finishes, the provided callback will be called.
Declaration
protected void Wrap<T>(Task<Response<T>> task, Action<Response<T>> callback)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.Tasks.Task<Response<T>> | task | The async task which should be wrapped. |
System.Action<Response<T>> | callback | The callback which shall be called when the task finishes. |
Type Parameters
Name | Description |
---|---|
T |