static void Test(IJsonProvider provider, object obj) { string json = ""; object newObj = null; CodeTimer.TimeLine(provider.GetType().Name + " - Serialize", 10 * 10000, i => json = provider.Serialize(obj)); CodeTimer.TimeLine(provider.GetType().Name + " - Deserialize", 10 * 10000, i => newObj = provider.Deserialize(json, obj.GetType())); }
public void WriteCurrentHoldings(IList <TransactionData> currentHoldings) { var json = _jsonProvider.Serialize(currentHoldings); _ioWrapper.Write(_appSettingProvider.Get(Constants.HoldingsJsonFilePath), json); }