示例#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);
            }
示例#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));
        }
示例#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));
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#7
0
        public void Clear()
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(m_Safety);
#endif
            NativeHashMapBase <TKey, TValue> .Clear(m_Buffer);
        }
示例#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));
            }
示例#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));
 }
示例#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));
 }