コード例 #1
0
 /// <summary>
 /// Create a new personal profile.
 /// </summary>
 /// <param name="MakePrivate">If true, a private profile will be created.</param>
 public PasswordProfile(bool MakePrivate) {
     if (MakePrivate) {
         _Private = new PasswordProfilePrivate();
         }
     }
コード例 #2
0
		/// <summary>
        /// Construct an instance from the specified tagged JSONReader stream.
        /// </summary>
        /// <param name="JSONReader">Input stream</param>
        /// <param name="Out">The created object</param>
        public static void Deserialize(JSONReader JSONReader, out JSONObject Out) {
	
			JSONReader.StartObject ();
            if (JSONReader.EOR) {
                Out = null;
                return;
                }

			string token = JSONReader.ReadToken ();
			Out = null;

			switch (token) {

				case "PasswordProfile" : {
					var Result = new PasswordProfile ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "PasswordProfilePrivate" : {
					var Result = new PasswordProfilePrivate ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "PasswordEntry" : {
					var Result = new PasswordEntry ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}

				default : {
					throw new Exception ("Not supported");
					}
				}	
			JSONReader.EndObject ();
            }
コード例 #3
0
        private void GetPasswordProfile () {

            PasswordEntry = SignedPersonalProfile.Signed.GetApplicationEntryPassword(
                null);
            PasswordRegistration = Machine.Get(PasswordEntry);

            SignedApplicationWeb = PasswordRegistration.Profile;
            PasswordProfile = SignedApplicationWeb.Signed as PasswordProfile;
            PasswordProfile.Link (SignedPersonalProfile.Signed, PasswordEntry);
            PasswordProfilePrivate = PasswordProfile.Private;

            return;
            }
コード例 #4
0
        /// <summary>
        /// Deserialize a tagged stream
        /// </summary>
        /// <param name="JSONReader">The input stream</param>
        /// <returns>The created object.</returns>		
        public static new PasswordProfilePrivate  FromTagged (JSONReader JSONReader) {
			PasswordProfilePrivate Out = null;

			JSONReader.StartObject ();
            if (JSONReader.EOR) {
                return null;
                }

			string token = JSONReader.ReadToken ();

			switch (token) {

				case "PasswordProfilePrivate" : {
					var Result = new PasswordProfilePrivate ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}

				default : {
					//Ignore the unknown data
                    //throw new Exception ("Not supported");
                    break;
					}
				}
			JSONReader.EndObject ();

			return Out;
			}