Ejemplo n.º 1
0
		void onLoginSuccess(CML data)
		{
			fetched_info = data.GetFirstNodeOfType(LOGINConstant).Copy();
			fetched_info.Remove("success");
			logged_in = true;
			user_gravatar = null;

			if (email != string.Empty)
				FetchProfileImage(__SetProfileImage, gravatar_type);
		}
Ejemplo n.º 2
0
		//returns a duplicate of this cmlData object
		virtual public cmlData Copy(CMLCopyMode mode = CMLCopyMode.no_id, string id_value="-1") {
			cmlData result = new cmlData();
			result.data_type = this.data_type;
			foreach (var data in this.defined) {
				if (data.Key != "id") {
					result.Set(data.Key, data.Value);
				} else {
					switch (mode) {
						//keep the original id....
					case CMLCopyMode.old_id:
						result.Set("id", data.Value);
						break;
						
					case CMLCopyMode.new_id : 
						result.Set("id", id_value);
						break;
						
					case CMLCopyMode.no_id :
						result.Remove("id");
						break;
					}
				}
			}			
			foreach (string s in this.data)
				result.data.Add(s);
			
			return result;
		}