Пример #1
0
        public void TestMyBool()
        {
            var x = new MyBool();

            x |= true;
            x |= false;
            x |= true;
            Assert.AreEqual(x.Counter, 2);
        }
Пример #2
0
 public BoolSetting(string Key, MyBool DefaultValue, ArgTyp ArgType, bool Persist, bool IsInternal, string Help) : base(Key, null, ArgType, Persist, IsInternal, Help)
 {
     SettingRegTyp = RegistryValueKind.String;
     if (DefaultValue != null)
     {
         SettingValue = DefaultValue;
         if (ArgType != ArgTyp.Mandatory)
         {
             SettingInitialized = true;
         }
     }
 }
Пример #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (MyDouble != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MyDouble);
            }
            if (MyFloat != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MyFloat);
            }
            if (MyInt32 != 0)
            {
                hash ^= MyInt32.GetHashCode();
            }
            if (MyUint32 != 0)
            {
                hash ^= MyUint32.GetHashCode();
            }
            if (MyUint64 != 0UL)
            {
                hash ^= MyUint64.GetHashCode();
            }
            if (MyBool != false)
            {
                hash ^= MyBool.GetHashCode();
            }
            if (MyString.Length != 0)
            {
                hash ^= MyString.GetHashCode();
            }
            if (MyBytes.Length != 0)
            {
                hash ^= MyBytes.GetHashCode();
            }
            hash ^= myStringList_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #4
0
 static void Main(string[] args)
 {
     MyBool.ZeigeGleichheit();
     MyBool.ZeigeUngleichheit();
     MyBool.ZeigeUnd();
     MyBool.ZeigeOder();
     MyBool.ZeigeAusschlOder();
     MyString.ZeigeInterpoliertesString();
     MyString.ZeigeEscapes();
     MyString.ZeigeVerbatimString();
     MyString.ZeigeinterpoliertesVerbatimString();
     MyInt.ZeigeLiterals();
     MyInt.ZeigeMöglicheWerte();
     MyInt.ZeigeParsing();
     MyInt.ZeigeCasting();
     MyInt.ZeigeVergleich();
     MyDouble.ZeigeDouble();
     MyEnum.ZeigeEnumerator();
     Console.ReadKey();
 }