Esempio n. 1
0
        public override int GetHashCode()
        {
            var HashCode = 674144506;

            HashCode = HashCode * -1521134295 + Type.GetHashCode();
            HashCode = HashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(AsString);

            HashCode = HashCode * -1521134295 + AsInteger.GetHashCode();
            HashCode = HashCode * -1521134295 + AsDouble.GetHashCode();
            if (AsByteArray != null)
            {
                HashCode = HashCode * -1521134295 + AsByteArray.ToString().GetHashCode();
            }
            return(HashCode);
        }
Esempio n. 2
0
        public override string ToString()
        {
            switch (Type)
            {
            case EBPrimitiveTypeEnum.Double:
                return(AsDouble.ToString());

            case EBPrimitiveTypeEnum.Integer:
                return(AsInteger.ToString());

            case EBPrimitiveTypeEnum.ByteArray:
                return(Convert.ToBase64String(AsByteArray));

            default:
                return(AsString);
            }
        }