예제 #1
0
 public static void Update(Context context, AccessToken token)
 {
     BaseShared.Instance(context, Tag).SetString(KeyAccessToken, token.access_token);
     BaseShared.Instance(context, Tag).SetString(KeyTokenType, token.token_type);
     BaseShared.Instance(context, Tag).SetInt(KeyExpiresIn, token.expires_in);
     BaseShared.Instance(context, Tag).SetBool(KeyIsIdentityUser, token.IsIdentityUser);
     BaseShared.Instance(context, Tag).SetDateTime(KeyRefreshTime, token.RefreshTime);
 }
예제 #2
0
 public static AccessToken GetAccessToken(Context context)
 {
     return(new AccessToken()
     {
         access_token = BaseShared.Instance(context, Tag).GetString(KeyAccessToken, ""),
         token_type = BaseShared.Instance(context, Tag).GetString(KeyTokenType, ""),
         expires_in = BaseShared.Instance(context, Tag).GetInt(KeyExpiresIn, 0),
         IsIdentityUser = BaseShared.Instance(context, Tag).GetBool(KeyIsIdentityUser, false),
         RefreshTime = BaseShared.Instance(context, Tag).GetDateTime(KeyRefreshTime),
     });
 }
예제 #3
0
 public static bool GetWiFi(Context context)
 {
     return(BaseShared.Instance(context, Tag).GetBool(KeyWiFi, false));
 }
예제 #4
0
 public static void SetWiFi(Context context, bool wifi)
 {
     BaseShared.Instance(context, Tag).SetBool(KeyWiFi, wifi);
 }