public void StoreToMemory(CalculatorData calculatorData)
 {
     CacheUtility.SaveToCache(new CacheData()
     {
         InstanceId = calculatorData.InstanceId,
         Value      = calculatorData.Value
     });
 }
 public void ClearTotal(CalculatorData calculatorData)
 {
     StorageAccessor.ClearStorageData(new StorageData()
     {
         InstanceId = calculatorData.InstanceId,
         Value      = calculatorData.Value
     });
 }
        public void ClearMemory(CalculatorData calculatorData)
        {
            var cacheData = new CacheData()
            {
                InstanceId = calculatorData.InstanceId,
                Value      = calculatorData.Value
            };

            CacheUtility.ClearCache(cacheData);
        }
 public CalculatorData LoadTotal(CalculatorData calculatorData)
 {
     return(new CalculatorData()
     {
         InstanceId = calculatorData.InstanceId,
         Value = StorageAccessor.LoadStorageData(new StorageData()
         {
             InstanceId = calculatorData.InstanceId,
             Value = calculatorData.Value
         }).Value
     });
 }
        public CalculatorData RetrieveFromMemory(CalculatorData calculatorData)
        {
            var cacheData = new CacheData()
            {
                InstanceId = calculatorData.InstanceId,
                Value      = calculatorData.Value
            };

            return(new CalculatorData()
            {
                InstanceId = calculatorData.InstanceId,
                Value = CacheUtility.RetrieveFromCache(cacheData).Value
            });
        }