예제 #1
0
                public override int GetHashCode()
                {
                    int hash = 1;

                    if (kindCase_ == KindOneofCase.StringValue)
                    {
                        hash ^= StringValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.FloatValue)
                    {
                        hash ^= FloatValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.DoubleValue)
                    {
                        hash ^= DoubleValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.IntValue)
                    {
                        hash ^= IntValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.UintValue)
                    {
                        hash ^= UintValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.SintValue)
                    {
                        hash ^= SintValue.GetHashCode();
                    }
                    if (kindCase_ == KindOneofCase.BoolValue)
                    {
                        hash ^= BoolValue.GetHashCode();
                    }
                    hash ^= (int)kindCase_;
                    return(hash);
                }
예제 #2
0
                public override int GetHashCode()
                {
                    int hash = 1;

                    if (StringValue.Length != 0)
                    {
                        hash ^= StringValue.GetHashCode();
                    }
                    if (FloatValue != 0F)
                    {
                        hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FloatValue);
                    }
                    if (DoubleValue != 0D)
                    {
                        hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue);
                    }
                    if (IntValue != 0L)
                    {
                        hash ^= IntValue.GetHashCode();
                    }
                    if (UintValue != 0UL)
                    {
                        hash ^= UintValue.GetHashCode();
                    }
                    if (SintValue != 0L)
                    {
                        hash ^= SintValue.GetHashCode();
                    }
                    if (BoolValue != false)
                    {
                        hash ^= BoolValue.GetHashCode();
                    }
                    if (_unknownFields != null)
                    {
                        hash ^= _unknownFields.GetHashCode();
                    }
                    return(hash);
                }