Пример #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;
		}