Home
last modified time | relevance | path

Searched refs:WeakWrapper (Results 1 – 2 of 2) sorted by relevance

/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Utilities/
DWeakWrapper.cs13 public class WeakWrapper<T> where T : class
17 public static WeakWrapper<T> CreateForComparison(T obj) in CreateForComparison()
19 return new WeakWrapper<T>(obj, true); in CreateForComparison()
22 public WeakWrapper(T obj) : this(obj, false) in WeakWrapper() method in Antmicro.Renode.Utilities.T
40 var objAsWeakWrapper = obj as WeakWrapper<T>; in Equals()
66 private WeakWrapper(T obj, bool doNotCreateWeakReference) in WeakWrapper() method in Antmicro.Renode.Utilities.T
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Logging/
DLogger.cs785 objectToIdMap = new ConcurrentDictionary<WeakWrapper<object>, int>(); in LogSourcesMap()
786 idToObjectMap = new ConcurrentDictionary<int, WeakWrapper<object>>(); in LogSourcesMap()
791 return objectToIdMap.GetOrAdd(WeakWrapper<object>.CreateForComparison(o), s => in GetOrCreateId()
803 … return objectToIdMap.TryGetValue(WeakWrapper<object>.CreateForComparison(o), out sourceId); in TryGetId()
808 WeakWrapper<object> outResult; in TryGetObject()
819 private readonly ConcurrentDictionary<int, WeakWrapper<object>> idToObjectMap;
820 private readonly ConcurrentDictionary<WeakWrapper<object>, int> objectToIdMap;