{"action":"created","issue":{"url":"https://api.github.com/repos/jstedfast/MimeKit/issues/118","labels_url":"https://api.github.com/repos/jstedfast/MimeKit/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/jstedfast/MimeKit/issues/118/comments","events_url":"https://api.github.com/repos/jstedfast/MimeKit/issues/118/events","html_url":"https://github.com/jstedfast/MimeKit/issues/118","id":63938498,"number":118,"title":"Problems with InternetAddresList.Equals()","user":{"login":"guywyers","id":11456731,"avatar_url":"https://avatars.githubusercontent.com/u/11456731?v=3","gravatar_id":"","url":"https://api.github.com/users/guywyers","html_url":"https://github.com/guywyers","followers_url":"https://api.github.com/users/guywyers/followers","following_url":"https://api.github.com/users/guywyers/following{/other_user}","gists_url":"https://api.github.com/users/guywyers/gists{/gist_id}","starred_url":"https://api.github.com/users/guywyers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guywyers/subscriptions","organizations_url":"https://api.github.com/users/guywyers/orgs","repos_url":"https://api.github.com/users/guywyers/repos","events_url":"https://api.github.com/users/guywyers/events{/privacy}","received_events_url":"https://api.github.com/users/guywyers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-24T08:43:10Z","updated_at":"2015-03-24T12:52:14Z","closed_at":null,"body":"I think there two issues with the implementation of the Equals function of the InternetAddressList. The most important issue is that it goes through both lists with a for loop and compares the indivudal InternetAddresses on both sides by calling .Equals on the InternetAdress objects. However the InternetAdress class does not implement its own Equals function and therefore falls back on reference comparison.\r\nThe second issue is that the implementation with a for loop implies that the lists that are being compared are in the same order. In other words, it treats two lists with the same InternetAdresses on them, but in a different order, as not equal. Although this is debatable, conceptually it would probably be better to do something like \"SequenceEqual' from linq."},"comment":{"url":"https://api.github.com/repos/jstedfast/MimeKit/issues/comments/85483772","html_url":"https://github.com/jstedfast/MimeKit/issues/118#issuecomment-85483772","issue_url":"https://api.github.com/repos/jstedfast/MimeKit/issues/118","id":85483772,"user":{"login":"jstedfast","id":338984,"avatar_url":"https://avatars.githubusercontent.com/u/338984?v=3","gravatar_id":"","url":"https://api.github.com/users/jstedfast","html_url":"https://github.com/jstedfast","followers_url":"https://api.github.com/users/jstedfast/followers","following_url":"https://api.github.com/users/jstedfast/following{/other_user}","gists_url":"https://api.github.com/users/jstedfast/gists{/gist_id}","starred_url":"https://api.github.com/users/jstedfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstedfast/subscriptions","organizations_url":"https://api.github.com/users/jstedfast/orgs","repos_url":"https://api.github.com/users/jstedfast/repos","events_url":"https://api.github.com/users/jstedfast/events{/privacy}","received_events_url":"https://api.github.com/users/jstedfast/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T12:52:14Z","updated_at":"2015-03-24T12:52:14Z","body":"Seems fair. I think my original purpose for IEquatable was for the unit tests, but making it such that 2 lists compare as equal even in different orders seems reasonable."}}