Exemple #1
0
        /// <summary>
        /// Tries to get, return and remove CallSlot instance by its RequestID from the list.
        /// Returns null if CallSlot with such an id does not exist and nothing was removed
        /// </summary>
        public CallSlot TryGetAndRemove(Apps.FID requestID)
        {
            //getBucket() inlined for performance
            var idx    = (requestID.GetHashCode() & CoreConsts.ABS_HASH_MASK) % m_BucketCount;
            var bucket = m_Buckets[idx];

            CallSlot result;

            if (bucket.TryRemove(requestID, out result))
            {
                return(result);
            }

            return(null);
        }
Exemple #2
0
 public abstract void Write(Apps.FID value);
Exemple #3
0
 public static void Write(WritingStreamer streamer, ulong name, Apps.FID value)
 {
     streamer.Write(name);
     streamer.Write((byte)DataType.FID);
     streamer.Write(value);
 }
Exemple #4
0
 public override void Write(Apps.FID value)
 {
     m_Stream.WriteBEUInt64(value.ID);
 }