← Zurück

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?

War dieses Thema hilfreich?

Thema teilen

Kommentare (0)

Anmelden oder Konto erstellen, Melden Sie sich an oder registrieren Sie sich, um einen Kommentar zu hinterlassen

Noch keine Kommentare. Seien Sie der Erste!