fix build: Remove inappropriate ThreadStatic attr
This has likely been incorrect for a while. The problem surfaced after upgrading to net7.0, as the new framework emits a warning (CA2259) when the attribute is associated with a non-static field.
This commit is contained in:
1 parent
222d4b266e
commit
bf87c46fcd
1 file changed
+3
-2
@@ -3,13 +3,14 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace mbts.ui.converters {
|
||||
class DictionaryLookupConverter : IMultiValueConverter {
|
||||
[ThreadStatic]
|
||||
Dictionary<Type, Lookup> _type_impls_backing;
|
||||
Dictionary<Type, Lookup> _type_impls => _type_impls_backing ?? (_type_impls_backing = new Dictionary<Type, Lookup>());
|
||||
Dictionary<Type, Lookup> _type_impls =>
|
||||
Interlocked.CompareExchange(ref _type_impls_backing, new(), null);
|
||||
|
||||
delegate bool Lookup(object source, object key, out object result);
|
||||
|
||||
|
||||
Reference in new issue
Block a user