Beispiel #1
0
        /// <summary>
        /// Return <see cref="Datacube"/> with supplied id and <see cref="DatacubeType"/>.
        /// </summary>
        public Datacube GetDatacube(ushort id, DatacubeType type)
        {
            uint hash = DatacubeHash(id, type);

            return(datacubes.TryGetValue(hash, out Datacube datacube) ? datacube : null);
        }
Beispiel #2
0
 private static uint DatacubeHash(ushort id, DatacubeType type)
 {
     return(((uint)id << 16) | (uint)type);
 }