Esempio n. 1
0
            public void Add(TKey key, TValue item)
            {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
                AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
                NativeHashMapBase <TKey, TValue> .AddAtomicMulti(m_Buffer, key, item, m_ThreadIndex);
            }
Esempio n. 2
0
        public bool TryGetNextValue(out TValue item, ref NativeMultiHashMapIterator <TKey> it)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckReadAndThrow(m_Safety);
#endif
            return(NativeHashMapBase <TKey, TValue> .TryGetNextValueAtomic(m_Buffer, out item, ref it));
        }
Esempio n. 3
0
        public bool SetValue(TValue item, NativeMultiHashMapIterator <TKey> it)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            return(NativeHashMapBase <TKey, TValue> .SetValue(m_Buffer, ref it, ref item));
        }
Esempio n. 4
0
        public void Remove(TKey key)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            NativeHashMapBase <TKey, TValue> .Remove(m_Buffer, key, true);
        }
Esempio n. 5
0
        public void Remove(NativeMultiHashMapIterator <TKey> it)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            NativeHashMapBase <TKey, TValue> .Remove(m_Buffer, it);
        }
Esempio n. 6
0
        public void Add(TKey key, TValue item)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            NativeHashMapBase <TKey, TValue> .TryAdd(m_Buffer, key, item, true, m_AllocatorLabel);
        }
Esempio n. 7
0
        public void Clear()
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            NativeHashMapBase <TKey, TValue> .Clear(m_Buffer);
        }
Esempio n. 8
0
            public bool TryAdd(TKey key, TValue item)
            {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
                AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
                return(NativeHashMapBase <TKey, TValue> .TryAddAtomic(m_Buffer, key, item, m_ThreadIndex));
            }
Esempio n. 9
0
 unsafe public bool TryGetFirstValue(TKey key, out TValue item, out NativeMultiHashMapIterator <TKey> it)
 {
                 #if ENABLE_UNITY_COLLECTIONS_CHECKS
     AtomicSafetyHandle.CheckReadAndThrow(m_Safety);
                 #endif
     return(NativeHashMapBase <TKey, TValue> .TryGetFirstValueAtomic((NativeHashMapData *)m_Buffer, key, out item, out it));
 }
Esempio n. 10
0
 unsafe public bool TryAdd(TKey key, TValue item)
 {
                 #if ENABLE_UNITY_COLLECTIONS_CHECKS
     AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
                 #endif
     return(NativeHashMapBase <TKey, TValue> .TryAdd((NativeHashMapData *)m_Buffer, key, item, false, m_AllocatorLabel));
 }