public ConnectionString(ConnectionScheme scheme, [NotNull] IEnumerable <string> hosts, ushort?port) { if (!Enum.IsDefined(typeof(ConnectionScheme), scheme)) { #if NETSTANDARD15 throw new ArgumentException(nameof(scheme), "Invalid connection scheme"); #else throw new InvalidEnumArgumentException(nameof(scheme), (int)scheme, typeof(ConnectionScheme)); #endif } if (hosts == null) { throw new ArgumentNullException(nameof(hosts)); } Scheme = scheme; Hosts = new ReadOnlyCollection <string>(hosts.ToList()); Port = port; }
public WatcherHttpRequestDescriptor Scheme(ConnectionScheme scheme) { Self.Scheme = scheme; return this; }
/// <inheritdoc /> public WebhookActionDescriptor Scheme(ConnectionScheme scheme) => Assign(a => a.Scheme = scheme);
public WatcherHttpRequestDescriptor Scheme(ConnectionScheme scheme) { Self.Scheme = scheme; return(this); }
/// <inheritdoc /> public HttpInputRequestDescriptor Scheme(ConnectionScheme scheme) => Assign(a => a.Scheme = scheme);
public ConnectionString(ConnectionScheme scheme, IEnumerable <string> hosts) : this(scheme, hosts, null) { }