Exemplo n.º 1
0
        public Attachment(string value)
            : this()
        {
            var serializer = new AttachmentSerializer();

            CopyFrom(serializer.Deserialize(new StringReader(value)) as ICopyable);
        }
Exemplo n.º 2
0
        public Attachment(string value)
            : this()
        {
            AttachmentSerializer serializer = new AttachmentSerializer();
            StringReader         reader     = new StringReader(value);

            CopyFrom(serializer.Deserialize(reader) as ICopyable);
            reader.Dispose();
        }
Exemplo n.º 3
0
        public Attachment(string value) : this()
        {
            var serializer = new AttachmentSerializer();
            var a          = serializer.Deserialize(value);

            if (a == null)
            {
                throw new ArgumentException($"{value} is not a valid ATTACH component");
            }

            ValueEncoding = a.ValueEncoding;

            Data = a.Data;
            Uri  = a.Uri;
        }
Exemplo n.º 4
0
 public Attachment(string value)
     : this()
 {
     AttachmentSerializer serializer = new AttachmentSerializer();
     CopyFrom(serializer.Deserialize(new StringReader(value)) as ICopyable);
 }