示例#1
0
 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()));
 }
示例#2
0
        public void WriteCurrentHoldings(IList <TransactionData> currentHoldings)
        {
            var json = _jsonProvider.Serialize(currentHoldings);

            _ioWrapper.Write(_appSettingProvider.Get(Constants.HoldingsJsonFilePath), json);
        }
示例#3
0
        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()));
        }