コード例 #1
0
        public static string Serialize(VCard vcard)
        {
            if (vcard.BirthDay == null)
            {
                return(string.Empty);
            }

            return(DateTimeProcessor.Serialize(vcard.BirthDay, "BDAY", vcard.Version));
        }
コード例 #2
0
        public static string Serialize(VCard vcard)
        {
            if (vcard.LastRevision == null)
            {
                return(string.Empty);
            }

            return(DateTimeProcessor.Serialize(vcard.LastRevision, "REV", vcard.Version));
        }
コード例 #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;
        }
コード例 #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));
        }