public RouteRegistration(Route route, RouteRegistrationOptions registrationOptions) { if (!registrationOptions.IsValid()) { throw new ArgumentException("Invalid enum valid.", nameof(registrationOptions)); } Route = route; RegistrationOptions = registrationOptions; }
public RouteTarget(EndPointAddress endPoint, RouteRegistrationOptions registrationOptions) { if (endPoint == default) { this = default; return; } if (!registrationOptions.IsValid()) { throw new ArgumentException("Invalid enum valid.", nameof(registrationOptions)); } EndPoint = endPoint; RegistrationOptions = registrationOptions; }