Михаил Сухов:
vk37:
Специально код для тестирования не составлял.
ЖдуСтаканы из хранилища не поднимаются вообще: System.OutOfMemoryException. Маркет данные прилагаю к посту.
at System.Collections.Generic.Dictionary`2.Resize(Int32 newSize, Boolean forceNewHashCodes)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector)
at StockSharp.Algo.TraderHelper.AddDelta(IEnumerable`1 fromQuotes, IEnumerable`1 deltaQuotes, Boolean isBids)
at StockSharp.Algo.TraderHelper.AddDelta(QuoteChangeMessage from, QuoteChangeMessage delta)
at #=qg_pNPqyCfZ23Tsz5texp8IXAe20oTShauQEzqbSZdOLMzskfDFEjN5YOe1TAca2E.#=qTfrirbxZYSVL1_aNwCbGng==(#=qS9YsZNAzZplF7inzo2AHNQIY6nN53R0u8selb3ok2zM= #=qbAvmi_8MHDD719jHz0_5Ag==)
at #=q7E10EcbcImBPppdVAfcBTQvXlTgE5vwOEWPu1BUQ3zrBWNFtZaSgoDx1pVa8BkOxnkHykysoo4EjbPJoTm7TGQ==.#=qS9YsZNAzZplF7inzo2AHNQIY6nN53R0u8selb3ok2zM=.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at StorageLoadDemo.Program.Main(String[] args) in d:\1\StorageLoadDemo\Program.cs:line 20
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
using System.Linq;
using StockSharp.Algo.Storages;
using StockSharp.BusinessEntities;
using System;
using System.IO;
class Program
{
static void Main(string[] args)
{
var storageRegistry = new StorageRegistry();
var defaultDrive = (LocalMarketDataDrive)storageRegistry.DefaultDrive;
defaultDrive.Path = Path.GetFullPath(@"D:\AlgoTrading\MarketData\Storage\PlazaForts");
var security = new Security() {Id = "RIU4@FORTS"};
var marketDepthStorage = storageRegistry.GetMarketDepthStorage(security, defaultDrive);
var date = new DateTime(2014, 7, 10);
var start = DateTime.Now;
marketDepthStorage.Load(date).ToArray();
Console.WriteLine("Время на исполнение: {0}", DateTime.Now - start);
}
}