public SniContactPoint(SortedSet <string> serverNames, ISniEndPointResolver resolver) { if (serverNames == null) { throw new ArgumentNullException(nameof(serverNames), "Server Names in SniContactPoint can't be null."); } if (serverNames.Any(name => name == null)) { SniContactPoint.Logger.Warning("Found null server names in SniContactPoint, skipping those."); serverNames = new SortedSet <string>(serverNames.Where(name => name != null)); } if (serverNames.Count == 0) { throw new ArgumentException("No server names found in SniContactPoint."); } _serverNames = serverNames; _resolver = resolver ?? throw new ArgumentNullException(nameof(resolver)); }
public bool Equals(ISniEndPointResolver other) { return(Equals((object)other)); }