Esempio n. 1
0
        public static string Serialize(VCard vcard)
        {
            if (vcard.BirthDay == null)
            {
                return(string.Empty);
            }

            return(DateTimeProcessor.Serialize(vcard.BirthDay, "BDAY", vcard.Version));
        }
Esempio n. 2
0
        public static string Serialize(VCard vcard)
        {
            if (vcard.LastRevision == null)
            {
                return(string.Empty);
            }

            return(DateTimeProcessor.Serialize(vcard.LastRevision, "REV", vcard.Version));
        }
Esempio n. 3
0
        public static void Parse(Token token, ref VCard vcard)
        {
            string value = token.Values[0];

            if (string.IsNullOrWhiteSpace(value))
            {
                return;
            }

            var date = DateTimeProcessor.Parse(value);

            vcard.Anniversary = date;
        }
Esempio n. 4
0
        public static string Serialize(VCard vcard)
        {
            if (vcard.Anniversary == null)
            {
                return(string.Empty);
            }

            //Only vCard 4.0 supports ANNIVERSARY property
            if (vcard.Version != VCardVersion.V4)
            {
                return(string.Empty);
            }

            return(DateTimeProcessor.Serialize(vcard.Anniversary, "ANNIVERSARY", vcard.Version));
        }