Ошибка при попытке сохранить ордера и сделки с помощью SettingsStorage

Ошибка при попытке сохранить ордера и сделки с помощью SettingsStorage
Atom
6/24/2014


Нужно сохранять ордера и сделки для среднесрочной стратегии
Пробую делать вот так:

Code

            storage = new SettingsStorage();
            
            var orderDictionary = new Dictionary<Order, IEnumerable<MyTrade>>();
            foreach (var order in Orders)
            {
                orderDictionary.Add(order, order.GetTrades());
            }
            if (storage.ContainsKey("Orders"))
                storage["Orders"] = orderDictionary;
            else
                storage.Add("Orders", orderDictionary);

            var xmlSerializer = new XmlSerializer<SettingsStorage>();
            xmlSerializer.Serialize(storage, Name + "_settings.xml");


xmlSerializer.Serialize выбрасывает Exception

Code
"Resolution of the dependency failed, type = \"Ecng.Serialization.IStorage\", name = \"(none)\".\r\n
Exception occurred while: while resolving.\r\n
Exception is: InvalidOperationException - The current type, Ecng.Serialization.IStorage, is an interface and cannot be constructed. Are you missing a type mapping?\r\n
-----------------------------------------------\r\n
At the time of the exception, the container was:\r\n
\r\n
Resolving Ecng.Serialization.IStorage,(none)\r\n"


Exeption snaphsot: http://i.imgur.com/cIwbBMA.png

Данный способ подсмотрел вот тут: http://stocksharp.com/posts/m/26336/

Подскажите, пожалуйста, как с этим справиться?

Tags:


Thanks:




Attach files by dragging & dropping, , or pasting from the clipboard.

loading
clippy