예제 #1
0
 private string GetSessionFileName(GarminSessionHeader sessionHeader)
 {
     return Path.Combine(CacheDirectory, sessionHeader.Key + ".bin");
 }
예제 #2
0
 public GarminSession GetSessionFromCache(GarminSessionHeader sessionHeader)
 {
     if (!cachedSessionHeaders.ContainsKey(sessionHeader.Key)) return null;
       try
       {
     return CommonUtil.DeserializeFromFile<GarminSession>(GetSessionFileName(sessionHeader));
       }
       catch (Exception)
       {
     return null;
       }
 }