コード例 #1
0
        public RegistryEntryRepo GetRegistryEntryRepo(string partitionKey)
        {
            var storageAccount = CloudStorageAccount.Parse(
                CloudConfigurationManager.GetSetting("StorageConnectionString"));

            var repo = new RegistryEntryRepo(storageAccount, partitionKey);

            return(repo);
        }
コード例 #2
0
        private RegistryEntryRepo GetRegistryEntryRepo()
        {
            var storageAccount = CloudStorageAccount.Parse(
                CloudConfigurationManager.GetSetting("StorageConnectionString"));

            var repo = new RegistryEntryRepo(storageAccount);

            return(repo);
        }
コード例 #3
0
        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);
        }