Exemplo n.º 1
0
        /// <summary>
        ///     Loads a new instance of the <see cref="vCard"/> class
        ///     from a text reader.
        /// </summary>
        /// <param name="input">
        ///     An initialized text reader.
        /// </param>
        public vCard(TextReader input)
            : this()
        {
            vCardReader reader = new vCardStandardReader();

            reader.ReadInto(this, input);
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Loads a new instance of the <see cref="vCard"/> class
 ///     from a text file.
 /// </summary>
 /// <param name="path">
 ///     The path to a text file containing vCard data in
 ///     any recognized vCard format.
 /// </param>
 public vCard(string path)
     : this()
 {
     using (StreamReader streamReader = new StreamReader(path))
     {
         vCardReader reader = new vCardStandardReader();
         reader.ReadInto(this, streamReader);
     }
 }
Exemplo n.º 3
0
        /// <summary>
        ///     Loads a new instance of the <see cref="vCard"/> class
        ///     from a text file.
        /// </summary>
        /// <param name="path">
        ///     The path to a text file containing vCard data in
        ///     any recognized vCard format.
        /// </param>
        public vCard(string path)
            : this()
        {
            using (StreamReader streamReader = new StreamReader(path))
            {
                vCardReader reader = new vCardStandardReader();
                reader.ReadInto(this, streamReader);
            }

            //String example = "BEGIN:VCARD\nVERSION:3.0\nN:;Saad;;;\nFN:Saad\nTEL;TYPE=CELL:418-271-3874\nTEL;TYPE=HOME:418-524-7721\nEND:VCARD";
            // using (MemoryStream s = GenerateStreamFromString(example))
            //{
            //    vCardReader reader = new vCardStandardReader();
            //    TextReader streamReader = new StreamReader(s, Encoding.Default);
            //    reader.ReadInto(this, streamReader);
            //}
        }
Exemplo n.º 4
0
        /// <summary>
        ///     Loads a new instance of the <see cref="vCard"/> class
        ///     from a text reader.
        /// </summary>
        /// <param name="input">
        ///     An initialized text reader.
        /// </param>
        public vCard(TextReader input)
            : this()
        {

            vCardReader reader = new vCardStandardReader();
            reader.ReadInto(this, input);

        }