← 返回

Exception in Ecng.Reflection.dll

Hi me again, I encountered exception in Ecng.Reflection.dll here is the sample code:

        
static void Main(string[] args)
{
            var path = @"C:\blabla\Storage";
            var storageRegistry = new StorageRegistry
            {
                DefaultDrive = new LocalMarketDataDrive(path),
            };
            var security = new Security
            {
                Id = "APPL@ALL",
            };

            var timeFrame = TimeSpan.FromMinutes(1);
            var series = new CandleSeries(typeof(TimeFrameCandle), security, timeFrame);
            var storage = storageRegistry.GetCandleStorage(series);
            var candles = storage.Load(new DateTime(2021, 1, 4));
}

this snippet works well in .netcoreapp but failed in .net framework4.72 It throws exception when I call GetCandleStorage() the exception message reports " Type 'System.Lazy1[Ecng.Collections.CachedSynchronizedOrderedDictionary2[System.DateTime,System.DateTime]]' has '0' members with name '_state' "

For using legacy dll so I must stay in .net framework, so I wonder is this fixable?

本主题对您有帮助吗?

分享主题

评论 (0)

登录创建账户, 登录或注册以发表评论

暂无评论,成为第一个评论者!