SoftTraderBackend/MarketDataRequest/SymbolLookupRequest.cs

18 lines
408 B
C#

namespace Backend.MarketDataRequest
{
public sealed class SymbolLookupRequest
{
public int RequestId { get; init; }
public string Pattern { get; init; } = string.Empty;
public void Validate()
{
if (RequestId <= 0)
throw new ArgumentException("RequestId must be greater than 0.");
if (string.IsNullOrWhiteSpace(Pattern))
throw new ArgumentException("Pattern is required.");
}
}
}