{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/6880","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/6880/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/6880/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/6880/events","html_url":"https://github.com/dotnet/corefx/pull/6880","id":140812405,"number":6880,"title":"Break dependency on older collections in System.Net.Security","user":{"login":"justinvp","id":710598,"avatar_url":"https://avatars.githubusercontent.com/u/710598?v=3","gravatar_id":"","url":"https://api.github.com/users/justinvp","html_url":"https://github.com/justinvp","followers_url":"https://api.github.com/users/justinvp/followers","following_url":"https://api.github.com/users/justinvp/following{/other_user}","gists_url":"https://api.github.com/users/justinvp/gists{/gist_id}","starred_url":"https://api.github.com/users/justinvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinvp/subscriptions","organizations_url":"https://api.github.com/users/justinvp/orgs","repos_url":"https://api.github.com/users/justinvp/repos","events_url":"https://api.github.com/users/justinvp/events{/privacy}","received_events_url":"https://api.github.com/users/justinvp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/cla-already-signed","name":"cla-already-signed","color":"009800"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Net","name":"System.Net","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/4","html_url":"https://github.com/dotnet/corefx/milestones/1.0.0-rtm","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/4/labels","id":1248719,"number":4,"title":"1.0.0-rtm","description":"2016 https://github.com/aspnet/Home/wiki/Roadmap","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":312,"closed_issues":371,"state":"open","created_at":"2015-08-10T18:04:00Z","updated_at":"2016-03-15T01:57:16Z","due_on":"2016-06-30T07:00:00Z","closed_at":null},"comments":2,"created_at":"2016-03-14T22:16:22Z","updated_at":"2016-03-15T04:11:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/6880","html_url":"https://github.com/dotnet/corefx/pull/6880","diff_url":"https://github.com/dotnet/corefx/pull/6880.diff","patch_url":"https://github.com/dotnet/corefx/pull/6880.patch"},"body":"Removes `System.Net.Security`'s dependency on `System.Collections.NonGeneric` and `System.Collections.Specialized`.\r\n\r\nThis PR is broken up into 3 commits:\r\n\r\n 1. Adds tests for `ServiceNameCollection`. 100% line and branch coverage, other than the `NormalizeServiceName` method. The tests pass on both the full framework and before/after these changes on .NET Core (other than one behavior difference in `CopyTo` noted below).\r\n\r\n 2. Removes the dependency on `System.Collections.NonGeneric` and `System.Collections.Specialized`.\r\n  - `SpnDictionary`: Removed. It's the only thing that depends on the Specialized collections and isn't currently being used anywhere in CoreFX. In the full framework, it's only used in [a few places](http://referencesource.microsoft.com/#System/net/System/Net/_SpnDictionary.cs,3c13c3eec03ce802,references) related to `HttpWebRequest`'s implementation that I don't think is relevant in CoreFX. I also verified it isn't currently used in dev/negotiatestream branch.\r\n  - `ServiceNameCollection`: No longer inherits from `ReadOnlyCollectionBase` and uses `List<T>` instead of `ArrayList`.\r\n  - `SslSessionsCache`: Uses of `Hashtable` replaced with `ConcurrentDictionary`.\r\n  - `SecureChannel`: Uses of `ArrayList` replaced with `List<T>`.\r\n\r\n 3. `ServiceNameCollection`: Minor perf optimizations and cleanup, while making changes here.\r\n\r\n**Behavior change**: In the full framework, `ServiceNameCollection.CopyTo(Array, int)` throws `InvalidCastException` when the destination array is not of a compatible type, but now it throws `ArgumentException` because we now use `List<T>`'s implementation of the non-generic `CopyTo`. Do we need to match the full framework and throw `InvalidCastException` here? (This could have implications for other collections in .NET Core that are now backed by `List<T>` instead of `ArrayList`).\r\n\r\nNote: `SslSessionsCache` could use some test coverage around shrinking the cache, but I didn't have a chance to work on it. Not sure if I will anytime soon.\r\n\r\nFixes #6725.\r\n\r\ncc: @weshaggard @davidsh"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/196645726","html_url":"https://github.com/dotnet/corefx/pull/6880#issuecomment-196645726","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/6880","id":196645726,"user":{"login":"stephentoub","id":2642209,"avatar_url":"https://avatars.githubusercontent.com/u/2642209?v=3","gravatar_id":"","url":"https://api.github.com/users/stephentoub","html_url":"https://github.com/stephentoub","followers_url":"https://api.github.com/users/stephentoub/followers","following_url":"https://api.github.com/users/stephentoub/following{/other_user}","gists_url":"https://api.github.com/users/stephentoub/gists{/gist_id}","starred_url":"https://api.github.com/users/stephentoub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephentoub/subscriptions","organizations_url":"https://api.github.com/users/stephentoub/orgs","repos_url":"https://api.github.com/users/stephentoub/repos","events_url":"https://api.github.com/users/stephentoub/events{/privacy}","received_events_url":"https://api.github.com/users/stephentoub/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T04:11:46Z","updated_at":"2016-03-15T04:11:46Z","body":"@dotnet-bot test this please"}}