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); }
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); } }