/** * Generates an XML string representing state of the system. */ public string GetState() { SocialState state = new SocialState(); state.Certificate = _local_cert_b64; state.LocalUser = _local_user; state.Friends = new SocialUser[_friends.Count]; _friends.Values.CopyTo(state.Friends, 0); return(SocialUtils.ObjectToXml <SocialState>(state)); }
/** * Generates an XML string representing state of the system. * @return a string represential the state. */ public string GetState(bool write_to_file) { SocialState state = new SocialState(); state.Certificate = _local_cert_b64; state.LocalUser = _local_user; state.Status = _snp.Status; state.Friends = new SocialUser[_friends.Count]; _friends.Values.CopyTo(state.Friends, 0); if(write_to_file) { Utils.WriteConfig(STATEPATH, state); } return SocialUtils.ObjectToXml<SocialState>(state); }
/** * Generates an XML string representing state of the system. */ public string GetState() { SocialState state = new SocialState(); state.Certificate = _local_cert_b64; state.LocalUser = _local_user; state.Friends = new SocialUser[_friends.Count]; _friends.Values.CopyTo(state.Friends, 0); return SocialUtils.ObjectToXml<SocialState>(state); }