public static Timeseries GetMonthlyAverages(string registerId) { var storageAccount = CloudStorageAccount.Parse( CloudConfigurationManager.GetSetting("StorageConnectionString")); var repo = new RegistryEntryRepo(storageAccount); var sortedTvqs = repo.GetRegistryEntries().OrderBy(x => x.Time); var tsWithRegisterEntries = new Timeseries(); tsWithRegisterEntries.AddRange(sortedTvqs.ToList()); var periodizer = new Periodizer(); var monthlyRegisterEntries = periodizer.MonthlyAverage(tsWithRegisterEntries); var deltaOperator = new DeltaTsOperator(); var monthlyAverages = deltaOperator.Apply(monthlyRegisterEntries); return monthlyAverages; }
private RegistryEntryRepo GetRegistryEntryRepo() { var storageAccount = CloudStorageAccount.Parse( CloudConfigurationManager.GetSetting("StorageConnectionString")); var repo = new RegistryEntryRepo(storageAccount); return repo; }