void NormalizeDate(ContentValues values) { // normalize the date value if (values.ContainsKey(WeatherContract.Weather.ColumnDate)) { long dateValue = values.GetAsLong(WeatherContract.Weather.ColumnDate); values.Put(WeatherContract.Weather.ColumnDate, WeatherContract.NormalizeDate(dateValue)); } }
private void PersistDateTime(string name, ContentValues values) { if (values == null) { throw new InvalidOperationException(" values is null!!!"); } String kDatetime = values.GetAsString(PREF_KEY); long vDateTimeTicks = values.GetAsLong(PREF_VALUE); GetDPreference(name).SetPrefLong(kDatetime, vDateTimeTicks); }
private void PersistLong(String name, ContentValues values) { if (values == null) { throw new InvalidOperationException(" values is null!!!"); } String kLong = values.GetAsString(PREF_KEY); long vLong = values.GetAsLong(PREF_VALUE); GetDPreference(name).SetPrefLong(kLong, vLong); }