public ServiceEndpointModel(int serviceId, string name, ResolvedEndpoint endpoint) { if (serviceId <= 0) { throw new ArgumentOutOfRangeException(nameof(serviceId)); } ServiceId = serviceId; Endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); Name = name ?? throw new ArgumentNullException(nameof(name)); }
/// <summary> /// Creates a new resolved service with the specified <see cref="Name"/> /// and <see cref="Endpoint"/> /// </summary> /// <param name="name">The service's subname.</param> /// <param name="endpoint">The service's endpoint.</param> public ResolvedService(string name, ResolvedEndpoint endpoint) { Name = name ?? throw new ArgumentNullException(nameof(name)); Endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); }