Цитата:System.Reflection.TargetInvocationException не обработано пользовательским кодом
Message=Адресат вызова создал исключение.
Source=mscorlib
StackTrace:
в System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)
в System.RuntimeMethodHandle.InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct signature, RuntimeType declaringType)
в System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
в System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
в System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
в System.Activator.CreateInstance(Type type, Object[] args)
в Ecng.Common.TypeHelper.CreateInstanceArgs[T](Type type, Object[] args)
в Ecng.Serialization.ReflectionFieldFactoryAttribute.CreateFactory(Field field)
в Ecng.Serialization.TypeSchemaFactory.<>c__DisplayClass11.<CreateSchema>b__d(FieldFactoryAttribute a)
в System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
в System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
в System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
в Ecng.Serialization.TypeSchemaFactory.CreateSchema(Type entityType)
в Ecng.Serialization.SchemaManager.<>c__DisplayClass5.<GetSchema>b__4(Type key)
в Ecng.Collections.CollectionHelper.SafeAdd[TKey,TValue](IDictionary`2 dictionary, TKey key, Func`2 handler, Boolean& isNew)
в Ecng.Collections.CollectionHelper.SafeAdd[TKey,TValue](IDictionary`2 dictionary, TKey key, Func`2 handler)
в Ecng.Serialization.SchemaManager.GetSchema(Type entityType, SchemaFactory factory)
в Ecng.Serialization.SchemaManager.GetSchema(Type entityType)
в Ecng.Serialization.SchemaManager.GetSchema[TEntity]()
в Ecng.Serialization.Serializer`1.get_Schema()
в Ecng.Serialization.Serializer`1.GetFields()
в Ecng.Serialization.Serializer`1.Serialize(T graph, SerializationItemCollection source)
в Ecng.Serialization.Serializer`1.Ecng.Serialization.ISerializer.Serialize(Object graph, SerializationItemCollection source)
в Ecng.Serialization.InnerSchemaFieldFactory`1.OnCreateSource(ISerializer serializer, TEntity instance)
в Ecng.Serialization.FieldFactory`2.OnCreateSource(ISerializer serializer, Object instance)
в Ecng.Serialization.DynamicFieldFactory.OnCreateSource(ISerializer serializer, Object instance)
в Ecng.Serialization.FieldFactory`2.OnCreateSource(ISerializer serializer, Object instance)
в Ecng.Serialization.FieldFactory.CreateSource(ISerializer serializer, Object instance)
в Ecng.Serialization.Serializer`1.Serialize(T graph, FieldList fields, SerializationItemCollection source)
в Ecng.Serialization.Serializer`1.Serialize(T graph, SerializationItemCollection source)
в Ecng.Serialization.RealCollectionFieldFactory`2.OnCreateSource(ISerializer serializer, TCollection instance)
в Ecng.Serialization.FieldFactory`2.OnCreateSource(ISerializer serializer, Object instance)
в Ecng.Serialization.FieldFactory.CreateSource(ISerializer serializer, Object instance)
в Ecng.Serialization.Serializer`1.Serialize(T graph, FieldList fields, SerializationItemCollection source)
в Ecng.Serialization.Serializer`1.Serialize(T graph, FieldList fields, Stream stream)
в Ecng.Serialization.Serializer`1.Serialize(T graph, Stream stream)
в Ecng.Serialization.Serializer`1.Serialize(T graph)
в Ecng.Serialization.Serializer`1.Serialize(T graph, String fileName)
в TradeStrategy.TresureStrategy.Save(SettingsStorage settings) в C:\Trade\TradeStrategy\TradeStrategy\TresureStrategy.cs:строка 2004
в TradeStrategy.TresureStrategy.OnStopped() в C:\Trade\TradeStrategy\TradeStrategy\TresureStrategy.cs:строка 367
в StockSharp.Algo.Strategies.Strategy.#=q9ZjYAh_tjTRiPKXRpMmVPaf8lHMr7XpjKfF8P_SBSxY=(ProcessStates #=qK93m3AC1JAhKyhuxNljMUw==)
InnerException: Microsoft.Practices.ServiceLocation.ActivationException
Message=Activation error occured while trying to get instance of type IStorage, key ""
Source=Microsoft.Practices.ServiceLocation
StackTrace:
в Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
в Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService]()
в Ecng.Configuration.ConfigManager.GetService[T]()
в Ecng.Serialization.RelationFieldFactory`2..ctor(Field field, Int32 order)
в Ecng.Serialization.RelationSingleFieldFactory`2..ctor(Field field, Int32 order)
InnerException: Microsoft.Practices.Unity.ResolutionFailedException
Message=Resolution of the dependency failed, type = "Ecng.Serialization.IStorage", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Ecng.Serialization.IStorage, is an interface and cannot be constructed. Are you missing a type mapping?
-----------------------------------------------
At the time of the exception, the container was:
Resolving Ecng.Serialization.IStorage,(none)
Source=Microsoft.Practices.Unity
TypeRequested=IStorage
StackTrace:
в Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
в Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, String name, IEnumerable`1 resolverOverrides)
в Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides)
в Microsoft.Practices.Unity.UnityServiceLocator.DoGetInstance(Type serviceType, String key)
в Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
InnerException: System.InvalidOperationException
Message=The current type, Ecng.Serialization.IStorage, is an interface and cannot be constructed. Are you missing a type mapping?
Source=Microsoft.Practices.Unity
StackTrace:
в Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForAttemptingToConstructInterface(IBuilderContext context)
в BuildUp_Ecng.Serialization.IStorage(IBuilderContext )
в Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
в Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
в Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
в Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
InnerException:
Исключение выходит только в случае сохранения параметров типа Unit