Ejemplo n.º 1
0
        public void IsFlagComponentPositive1()
        {
            IsFlag sut    = IsFlag.Val1;
            var    target = sut.Components().ToList();

            Assert.AreEqual(1, target.Count);
            Assert.IsTrue(target.Contains(IsFlag.Val1));
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public override int GetHashCode()
        {
            int hashCode = IsFlag.GetHashCode() * 397;

            if (Key != null)
            {
                return(hashCode ^ Key.GetHashCode() * 397);
            }

            return(Values.Aggregate(hashCode, (current, value) => current ^ value.GetHashCode() * 397));
        }
Ejemplo n.º 3
0
 public void     SetFlag(IsFlag flag)
 {
     this.flag = flag;
 }
Ejemplo n.º 4
0
 private EnumInstance(ByteBuffer buffer)
 {
     this.flag  = IsFlag.Unset;
     this.type  = buffer.ReadUnicodeString();
     this.value = buffer.ReadInt32();
 }