コード例 #1
0
 public async Task <IEnumerable <DimMuscle> > GetMusclesAsync(WebApiCredentials credentials, CancellationToken ct)
 {
     ct.ThrowIfCancellationRequested();
     return(await new ODataClient(credentials.ToSettings().WithUrl(_apiUrl))
            .For <DimMuscle>()
            .FindEntriesAsync(ct));
 }
コード例 #2
0
 public async Task <ApplicationSettings> GetSettingsAsync(WebApiCredentials credentials, string userId, CancellationToken ct)
 {
     ct.ThrowIfCancellationRequested();
     return(await new ODataClient(credentials.ToSettings().WithUrl(_apiUrl))
            .For <ApplicationSettings>()
            .Filter(e => e.ApplicationId == credentials.ApplicationId && e.UserId == userId)
            .FindEntryAsync(ct));
 }
コード例 #3
0
 public async Task <DimPatient> GetPatientAsync(WebApiCredentials credentials, int id, CancellationToken ct)
 {
     ct.ThrowIfCancellationRequested();
     return(await new ODataClient(credentials.ToSettings().WithUrl(_apiUrl))
            .For <DimPatient>()
            .Key(id)
            .FindEntryAsync(ct));
 }
コード例 #4
0
        public virtual async Task <AgeBounds> GetAgeBoundsAsync(WebApiCredentials credentials, CancellationToken ct)
        {
            var result = await new ODataClient(credentials.ToSettings().WithUrl(_apiUrl))
                         .Unbound <D>()
                         .Function("GetAgeBounds")
                         .ExecuteAsSingleAsync(ct);

            return(result.GetAgeBounds);
        }