コード例 #1
0
 public override int GetHashCode()
 {
     if (this.value == null)
     {
         return 0;
     }
     return BitConvertor.ToInt32(this.value, 0) ^
         BitConvertor.ToInt32(this.value, 4) ^
         BitConvertor.ToInt32(this.value, 8) ^
         BitConvertor.ToInt32(this.value, 12);
 }
コード例 #2
0
 private static uint GetRandomUInt32()
 {
     uint result;
     lock (PositionLock.Value)
     {
         if ((PoolSize - bufferPosition) < sizeof(uint))
         {
             GeneratePool(Pool.Value)
         }
         result = BitConvertor.ToUInt32(
             Pool.Value,
             bufferPosition);
         bufferPostion += sizeof(uint);
     }
     return result;
 }