public void ParseOrThrow_From_ByteArray_AlternativeValues()
        {
            byte[] bytes = Hex.FromStringCondensed("b83dfb0b67f141aa992e030c167cd011");

            Guid uuid = UuidUtil.ParseOrThrow(bytes);

            Assert.AreEqual("b83dfb0b-67f1-41aa-992e-030c167cd011", uuid.ToString());
        }
Ejemplo n.º 2
0
        public static SignalServiceAddress FromProtobuf(AddressProto addressProto)
        {
            Guid?  uuid   = addressProto.HasUuid ? UuidUtil.ParseOrThrow(addressProto.Uuid.ToByteArray()) : (Guid?)null;
            string?number = addressProto.HasE164 ? addressProto.E164 : null;
            string?relay  = addressProto.HasRelay ? addressProto.Relay : null;

            return(new SignalServiceAddress(uuid, number, relay));
        }
        public void ParseOrThrow_From_ByteArray()
        {
            byte[] bytes = Hex.FromStringCondensed("3dc48790568b49c19bd6ab6604a5bc32");

            Guid uuid = UuidUtil.ParseOrThrow(bytes);

            Assert.AreEqual("3dc48790-568b-49c1-9bd6-ab6604a5bc32", uuid.ToString());
        }