private static MonitoringInfo Convert(MonitoringDocument doc) { return(new MonitoringInfo { Id = doc.Id, AuthenticationId = doc.AuthenticationId, Time = doc.Time, Method = doc.Method, Controller = doc.Controller, Content = doc.Content }); }
public Task <TResult> GetByMonthAsync <TResult>(DateTime month, Func <MonitoringInfo[], TResult> onSuccess) { return(MonitoringDocument.GetByMonthAsync(month, AzureContext.DataContext.AzureStorageRepository, (monitoringItems) => onSuccess(monitoringItems.Select(item => Convert(item)).ToArray()))); }