public void Save(ISecretStore store) { store.ValidateRequired("store"); lock (m_lock) { string xml = this.ToXml(); store.PutSecret(StateKeyName, xml); } }
public void Reset(ISecretStore store) { store.ValidateRequired("store"); lock (m_lock) { Clear(); store.RemoveSecret(StateKeyName); } }
public static ClientState Load(ISecretStore store) { store.ValidateRequired("store"); string xml = store.GetSecret(StateKeyName); if (String.IsNullOrEmpty(xml)) { return(new ClientState()); } return(HealthVaultClient.Serializer.FromXml <ClientState>(xml)); }
public void Reset(ISecretStore store) { store.ValidateRequired("store"); lock (m_lock) { Clear(); store.RemoveSecret(StateKeyName); } }
public static ClientState Load(ISecretStore store) { store.ValidateRequired("store"); string xml = store.GetSecret(StateKeyName); if (String.IsNullOrEmpty(xml)) { return new ClientState(); } return HealthVaultClient.Serializer.FromXml<ClientState>(xml); }
public void Save(ISecretStore store) { store.ValidateRequired("store"); lock (m_lock) { string xml = this.ToXml(); store.PutSecret(StateKeyName, xml); } }