18 using System.Collections.Generic;
19 using System.Runtime.CompilerServices;
28 private static readonly Dictionary<SecurityIdentifier, FundamentalInstanceProvider> _cache =
new();
30 private readonly FundamentalTimeProvider _timeProvider;
51 _cache.TryGetValue(symbol.
ID, out result);
62 _cache[symbol.
ID] = result;
74 _timeProvider =
new();
75 _financialStatements =
new(_timeProvider, symbol.
ID);
76 _operationRatios =
new(_timeProvider, symbol.
ID);
77 _securityReference =
new(_timeProvider, symbol.
ID);
78 _companyReference =
new(_timeProvider, symbol.
ID);
79 _companyProfile =
new(_timeProvider, symbol.
ID);
80 _assetClassification =
new(_timeProvider, symbol.
ID);
81 _valuationRatios =
new(_timeProvider, symbol.
ID);
82 _earningRatios =
new(_timeProvider, symbol.
ID);
83 _earningReports =
new(_timeProvider, symbol.
ID);
89 [MethodImpl(MethodImplOptions.AggressiveInlining)]
92 _timeProvider.Time = time;
93 return _valuationRatios;
99 [MethodImpl(MethodImplOptions.AggressiveInlining)]
102 _timeProvider.Time = time;
103 return _earningRatios;
109 [MethodImpl(MethodImplOptions.AggressiveInlining)]
112 _timeProvider.Time = time;
113 return _earningReports;
119 [MethodImpl(MethodImplOptions.AggressiveInlining)]
122 _timeProvider.Time = time;
123 return _operationRatios;
129 [MethodImpl(MethodImplOptions.AggressiveInlining)]
132 _timeProvider.Time = time;
133 return _financialStatements;
139 [MethodImpl(MethodImplOptions.AggressiveInlining)]
142 _timeProvider.Time = time;
143 return _securityReference;
149 [MethodImpl(MethodImplOptions.AggressiveInlining)]
152 _timeProvider.Time = time;
153 return _companyReference;
159 [MethodImpl(MethodImplOptions.AggressiveInlining)]
162 _timeProvider.Time = time;
163 return _companyProfile;
169 [MethodImpl(MethodImplOptions.AggressiveInlining)]
172 _timeProvider.Time = time;
173 return _assetClassification;
178 public DateTime
Time;
180 [MethodImpl(MethodImplOptions.AggressiveInlining)]
181 public DateTime GetUtcNow() =>
Time;