26 lines
633 B
C#
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;
|
|
}
|
|
}
|
|
}
|
|
}
|