/// <summary>
 /// Initializes a new <see cref="ReadOnlyEndpointCollection"/> based on the
 /// endpoints in the specified <paramref name="endpointCollection"/>
 /// </summary>
 /// <param name="endpointCollection">An endpoint collection</param>
 public ReadOnlyEndpointCollection(IEndpointCollection endpointCollection)
 {
     if (endpointCollection == null) throw new ArgumentNullException("endpointCollection");
     _endpoints = endpointCollection.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
 }