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); }
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); }
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)); }