public void AddUrl(OpenSearchDescriptionUrl openSearchDescriptionUrl) { if (Url.Any(u => { var mimeType1 = new System.Net.Mime.ContentType(u.Type); var mimeType2 = new System.Net.Mime.ContentType(openSearchDescriptionUrl.Type); return(u.Template.Equals(openSearchDescriptionUrl.Template) && mimeType1.Equals(mimeType2)); })) { this.Url.Add(openSearchDescriptionUrl); } }
public override bool MoveNext() { if (Url.Any() == false) { if (string.IsNullOrEmpty(Encoding)) { this.Encoding = "utf-8"; } if (string.IsNullOrEmpty(FileName) == false) { Url = File.ReadAllLines(FileName, System.Text.Encoding.GetEncoding(Encoding)).ToList(); } } _index += 1; if (_index < Url.Count) { return(true); } return(false); }