Last active
March 12, 2018 08:49
-
-
Save jonathanantoine/80483d7205523d6d13e7d673fa22029c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static DateTimeOffset? LastSeenPackageDate | |
{ | |
get | |
{ | |
if (ApplicationData.Current.LocalSettings.Values | |
.TryGetValue(nameof(LastSeenPackageDate), out object lastSeenDateStored) | |
&& lastSeenDateStored != null) | |
{ | |
return DateTimeOffset.Parse(lastSeenDateStored.ToString()); | |
}; | |
return null; | |
} | |
set | |
{ | |
ApplicationData.Current.LocalSettings | |
.Values[nameof(LastSeenPackageDate)] = value?.ToString(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment