AdapterBase
Common functionality when creating adapters
Assembly: ServiceStack.Common.dll
View Source
Declaration
public abstract class AdapterBase
Properties
Log
View Source
Declaration
protected abstract ILog Log { get; }
Methods
Execute<T>(Func<T>)
Executes the specified expression.
View Source
Declaration
protected T Execute<T>(Func<T> action)
Returns
<T>
Parameters
Type | Name |
---|---|
System.Func<<T>> | action |
Type Parameters
T
ExecuteAsync<T>(Func<Task<T>>)
Executes the specified expression.
View Source
Declaration
protected async Task<T> ExecuteAsync<T>(Func<Task<T>> action)
Returns
System.Threading.Tasks.Task<<T>>
Parameters
Type | Name |
---|---|
System.Func<System.Threading.Tasks.Task<<T>>> | action |
Type Parameters
T
ExecuteAsync<T>(Func<CancellationToken, Task<T>>, CancellationToken)
Executes the specified expression.
View Source
Declaration
protected async Task<T> ExecuteAsync<T>(Func<CancellationToken, Task<T>> action, CancellationToken token)
Returns
System.Threading.Tasks.Task<<T>>
Parameters
Type | Name |
---|---|
System.Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<<T>>> | action |
System.Threading.CancellationToken | token |
Type Parameters
T
Execute(Action)
Executes the specified action (for void methods).
View Source
Declaration
protected void Execute(Action action)
Parameters
Type | Name |
---|---|
System.Action | action |
ExecuteAsync(Func<Task>)
Executes the specified action (for void methods).
View Source
Declaration
protected async Task ExecuteAsync(Func<Task> action)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.Func<System.Threading.Tasks.Task> | action |
ExecuteAsync(Func<CancellationToken, Task>, CancellationToken)
Executes the specified action (for void methods).
View Source
Declaration
protected async Task ExecuteAsync(Func<CancellationToken, Task> action, CancellationToken token)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.Func<System.Threading.CancellationToken,System.Threading.Tasks.Task> | action |
System.Threading.CancellationToken | token |