/// <summary> /// Gets a list of employees with their data. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <Employee> > ApiEmployeesGetAsync(this IExternalSourceClientClient operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ApiEmployeesGetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of employees with their data. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IList <Employee> ApiEmployeesGet(this IExternalSourceClientClient operations) { return(Task.Factory.StartNew(s => ((IExternalSourceClientClient)s).ApiEmployeesGetAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public EmployeeRepository(IExternalSourceClientClient externalSourceClientClient) { _apiClient = externalSourceClientClient; }