Avoid allocating a delegate in OptionsMonitor.Get() when possible. (#66688)
* Avoid allocating a delegate in OptionsMonitor.Get() when possible. Fix #61086 * Address feedback from https://github.com/dotnet/runtime/pull/66688#discussion_r827519222 * Use locals to avoid unnecessary closure allocations. * Remove another closure allocation in OptionsMonitor and add test for #61086.
Showing
想要评论请 注册 或 登录