예제 #1
0
		public static Session Instance ()
		{
			if (uniqueInstance == null) {
				uniqueInstance = new Session();
			}
			return uniqueInstance;
		}
예제 #2
0
		/// <summary>
		/// Restore the session object.
		/// </summary>
		public bool load()
		{
			var prefs = Application.Context.GetSharedPreferences ("CompetitieApp2", FileCreationMode.Private);
			string sessionString = prefs.GetString("Session", null);
			if (sessionString != null && sessionString.Length > 1) 
			{
				uniqueInstance = Serialization.DeserializeObject<Session>(sessionString);
				return true;
			}
			return false;
		}