Beispiel #1
0
        /// <summary>
        /// This static method can be used to load property values into a new vCard collection from a string
        /// containing one or more vCards.
        /// </summary>
        /// <param name="vCards">A set of properties for one or more vCards in a string</param>
        /// <returns>A new vCard collection as created from the string</returns>
        /// <example>
        /// <code language="cs">
        /// VCardCollection vCards = VCardParser.ParseSetFromString(vCards);
        /// </code>
        /// <code language="vbnet">
        /// Dim vCards As VCardCollection = VCardParser.ParseSetFromString(vCards)
        /// </code>
        /// </example>
        public static VCardCollection ParseSetFromString(string vCards)
        {
            VCardParser vcp = new VCardParser();

            vcp.ParseString(vCards);

            return(vcp.VCards);
        }
Beispiel #2
0
        //=====================================================================

        /// <summary>
        /// This static method can be used to load property values into a new instance of a single vCard from a
        /// string.
        /// </summary>
        /// <param name="vCardText">A set of properties for a single vCard in a string</param>
        /// <returns>A new vCard instance as created from the string</returns>
        /// <example>
        /// <code language="cs">
        /// VCard vCard = VCardParser.ParseFromString(oneVCard);
        /// </code>
        /// <code language="vbnet">
        /// Dim vCard As VCard = VCardParser.ParseFromString(oneVCard)
        /// </code>
        /// </example>
        public static VCard ParseFromString(string vCardText)
        {
            VCardParser vcp = new VCardParser();

            vcp.ParseString(vCardText);

            return(vcp.VCards[0]);
        }
Beispiel #3
0
        /// <summary>
        /// This static method can be used to load property values into an existing instance of a single vCard
        /// from a string.
        /// </summary>
        /// <param name="vCardText">A set of properties for a single vCard in a string</param>
        /// <param name="vCard">The vCard instance into which the properties will be loaded</param>
        /// <remarks>The properties of the specified vCard will be cleared before the new properties are loaded
        /// into it.</remarks>
        /// <example>
        /// <code language="cs">
        /// VCard vCard = new VCard();
        /// VCardParser.ParseFromString(oneVCard, vCard);
        /// </code>
        /// <code language="vbnet">
        /// Dim vCard As New VCard
        /// VCardParser.ParseFromString(oneVCard, vCard)
        /// </code>
        /// </example>
        public static void ParseFromString(string vCardText, VCard vCard)
        {
            VCardParser vcp = new VCardParser(vCard);

            vcp.ParseString(vCardText);
        }
Beispiel #4
0
        /// <summary>
        /// This static method can be used to load property values into a new vCard collection from a string
        /// containing one or more vCards.
        /// </summary>
        /// <param name="vCards">A set of properties for one or more vCards in a string</param>
        /// <returns>A new vCard collection as created from the string</returns>
        /// <example>
        /// <code language="cs">
        /// VCardCollection vCards = VCardParser.ParseSetFromString(vCards);
        /// </code>
        /// <code language="vbnet">
        /// Dim vCards As VCardCollection = VCardParser.ParseSetFromString(vCards)
        /// </code>
        /// </example>
        public static VCardCollection ParseSetFromString(string vCards)
        {
            VCardParser vcp = new VCardParser();
            vcp.ParseString(vCards);

            return vcp.VCards;
        }
Beispiel #5
0
 /// <summary>
 /// This static method can be used to load property values into an existing instance of a single vCard
 /// from a string.
 /// </summary>
 /// <param name="vCardText">A set of properties for a single vCard in a string</param>
 /// <param name="vCard">The vCard instance into which the properties will be loaded</param>
 /// <remarks>The properties of the specified vCard will be cleared before the new properties are loaded
 /// into it.</remarks>
 /// <example>
 /// <code language="cs">
 /// VCard vCard = new VCard();
 /// VCardParser.ParseFromString(oneVCard, vCard);
 /// </code>
 /// <code language="vbnet">
 /// Dim vCard As New VCard
 /// VCardParser.ParseFromString(oneVCard, vCard)
 /// </code>
 /// </example>
 public static void ParseFromString(string vCardText, VCard vCard)
 {
     VCardParser vcp = new VCardParser(vCard);
     vcp.ParseString(vCardText);
 }
Beispiel #6
0
        //=====================================================================

        /// <summary>
        /// This static method can be used to load property values into a new instance of a single vCard from a
        /// string.
        /// </summary>
        /// <param name="vCardText">A set of properties for a single vCard in a string</param>
        /// <returns>A new vCard instance as created from the string</returns>
        /// <example>
        /// <code language="cs">
        /// VCard vCard = VCardParser.ParseFromString(oneVCard);
        /// </code>
        /// <code language="vbnet">
        /// Dim vCard As VCard = VCardParser.ParseFromString(oneVCard)
        /// </code>
        /// </example>
        public static VCard ParseFromString(string vCardText)
        {
            VCardParser vcp = new VCardParser();
            vcp.ParseString(vCardText);

            return vcp.VCards[0];
        }