/// <summary> /// Create deep copy of current instance. /// </summary> /// <returns>Deep copy.</returns> public WebServicesSettings Copy() { var result = new WebServicesSettings(_parent); result.Copy(this); return(result); }
/// <summary> /// Create deep copy from source into current instance. /// </summary> /// <param name="source">Source.</param> /// <exception cref="ArgumentNullException"><paramref name="source"/>must be not null.</exception> public void Copy(WebServicesSettings source) { if (source == null) { throw new ArgumentNullException("source"); } var list = new List <WebServiceNode>(source.WebServices.Count()); list.AddRange(source.WebServices.Select(webNode => webNode.Copy())); WebServices = new ReadOnlyCollection <WebServiceNode>(list); }