예제 #1
0
        public RouteRegistration(Route route, RouteRegistrationOptions registrationOptions)
        {
            if (!registrationOptions.IsValid())
            {
                throw new ArgumentException("Invalid enum valid.", nameof(registrationOptions));
            }

            Route = route;
            RegistrationOptions = registrationOptions;
        }
예제 #2
0
        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;
        }