[system] Avoid reflection use to create NtlmSession. Fixes #37732
authorSebastien Pouliot <sebastien@xamarin.com>
Fri, 22 Jan 2016 19:19:46 +0000 (14:19 -0500)
committerSebastien Pouliot <sebastien@xamarin.com>
Fri, 22 Jan 2016 19:19:46 +0000 (14:19 -0500)
commitb9015716470568e39b56cb4384d8799ae80f98c5
tree90bc9f0d13a88f168c8260ecbd79f162916ae0c6
parentb1eb334287223a09efaedaac12da21c55b931e4e
[system] Avoid reflection use to create NtlmSession. Fixes #37732

commit d2325f1483cd642457a7b2efe402e3c1d414d69d (only since 4.3.2, not
4.3.1) caused the failure when an application is linked.

The use of `GetOrCreateValue` uses reflection to create an `NtlmSession`
instance so the linker won't see it as used anymore (and removes it).

Fixed by avoiding reflection (which will also perform better).

https://bugzilla.xamarin.com/show_bug.cgi?id=37732
mcs/class/System/Mono.Http/NtlmClient.cs