Files
zszq-trs/YLErpUnitTest/Helpers/InnerUnderlyingPriceProvider.cs
T
2024-05-09 14:06:26 +08:00

26 lines
633 B
C#

using YLErp.Abstract.DataProviders;
namespace YLErp.Helpers
{
class InnerUnderlyingPriceProvider : IPriceProvider
{
public double GetPrice(string instrumentCode)
{
return TryGetPrice(instrumentCode, out var price) ? price : 0;
}
public bool TryGetPrice(string instrumentCode, out double price)
{
switch (instrumentCode)
{
case "RBTest00":
price = 3330;
return true;
default:
price = 0;
return false;
}
}
}
}