Ejemplo n.º 1
0
        /// <summary>
        /// Persists the statistics to local storage.
        /// </summary>
        public void Persist()
        {
            try
            {
                var json = JsonMapper.ToJson(this.SignatureFrequency);
                _persistenceLayer.SetString(ConduitSignatureFrequencyKey, json);

                json = JsonMapper.ToJson(this.IncompatibleSignatureFrequency);
                _persistenceLayer.SetString(ConduitIncompatibleSignatureFrequencyKey, json);

                _persistenceLayer.SetInt(ConduitSuccessfulGenerationsKey, SuccessfulGenerations);
            }
            catch (Exception e)
            {
                Debug.Log($"Failed to persist Conduit statistics. {e}");
            }
        }