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
return null;
lock (cache) {
- var ds = cache.GetOrCreateValue (request);
+ var ds = cache.GetValue (request, x => new NtlmSession ());
return ds.Authenticate (header, webRequest, credentials);
}
}