コード例 #1
0
ファイル: WeatherDB.cs プロジェクト: shwars/WeatherMonitor
        public static async Task <bool> RecordSuccess(ReadingType t, WeatherInfoSource src, double x)
        {
            var rd = new WeatherRecord(CurrentDateTime, x, src, t);
            await Table.ExecuteAsync(TableOperation.Insert(rd));

            return(true);
        }
コード例 #2
0
 public WeatherRecord(DateTime When, double Reading, WeatherInfoSource src, ReadingType type)
 {
     this.Reading           = Reading;
     this.WeatherInfoSource = src;
     this.When        = When;
     this.ReadingType = type;
     PartitionKey     = string.Format("{0}.{1}", When.Year, When.Month);
     RowKey           = string.Format("{0}-{1}:{2}.{3}.{4},{5}:{6}", src, type, When.Year, When.Month, When.Day, When.Hour, When.Minute);
 }
コード例 #3
0
ファイル: WeatherDB.cs プロジェクト: shwars/WeatherMonitor
 public static async void Record(ReadingType t, WeatherInfoSource src, double x)
 {
     var rd = new WeatherRecord(CurrentDateTime, x, src, t);
     await Table.ExecuteAsync(TableOperation.Insert(rd));
 }