/// <summary> /// for returning the socialProfile type string that will be used in the type=twitter for reading socialProfile vCard data /// </summary> /// <param name="serviceType">the SocialProfile Type to get the lowercase string for to include in the type value</param> /// <returns>facebook,twitter,etc</returns> public static string GetSocialProfileServicePropertyType(SocialProfileServiceType serviceType) { string profileType = null; switch (serviceType) { case SocialProfileServiceType.Facebook: profileType = "facebook"; break; case SocialProfileServiceType.Flickr: profileType = "flickr"; break; case SocialProfileServiceType.LinkedIn: profileType = "linkedin"; break; case SocialProfileServiceType.Myspace: profileType = "myspace"; break; case SocialProfileServiceType.Twitter: profileType = "twitter"; break; } return(profileType); }
private void CheckSocialProfile(vCardSocialProfileCollection sps, string username, string url, SocialProfileServiceType serviceType) { if (sps == null || sps.Count == 0) { Assert.Fail("sps null or empty"); } var sp = sps.FirstOrDefault(x => x.Username == username && x.ServiceType == serviceType); Assert.IsNotNull(sp, "no match for socialProfile for " + username + " for serviceType " + serviceType.ToString()); Assert.AreEqual(url, sp.ProfileUrl); Assert.AreEqual(username, sp.Username); Assert.AreEqual(serviceType, sp.ServiceType); }
/// <summary> /// Creates a new <see cref="vCardIMPP"/> object with the specified handle. /// </summary> /// <param name="username">the social profile username handle</param> /// <param name="serviceType">Facebook, Twitter, Flickr, etc</param> /// <param name="fullProfileUrl">the full url for the profile => http://twitter.com/username </param> public vCardSocialProfile(string username, SocialProfileServiceType serviceType, string fullProfileUrl) { this.username = username; this.serviceType = serviceType; this.fullProfileUrl = fullProfileUrl; }
/// <summary> /// Creates a new <see cref="vCardIMPP"/> object. /// </summary> public vCardSocialProfile() { this.serviceType = SocialProfileServiceType.Unspecified; }
/// <summary> /// for returning the socialProfile type string that will be used in the type=twitter for reading socialProfile vCard data /// </summary> /// <param name="serviceType">the SocialProfile Type to get the lowercase string for to include in the type value</param> /// <returns>facebook,twitter,etc</returns> public static string GetSocialProfileServicePropertyType(SocialProfileServiceType serviceType) { string profileType = null; switch (serviceType) { case SocialProfileServiceType.Facebook : profileType = "facebook"; break; case SocialProfileServiceType.Flickr: profileType = "flickr"; break; case SocialProfileServiceType.LinkedIn: profileType = "linkedin"; break; case SocialProfileServiceType.Myspace: profileType = "myspace"; break; case SocialProfileServiceType.Twitter: profileType = "twitter"; break; } return profileType; }
CheckPhone(c.Phones, "(333) 222-2222", vCardPhoneTypes.Home | vCardPhoneTypes.Voice, false); CheckPhone(c.Phones, "(809) 555-6666 x444", vCardPhoneTypes.Work | vCardPhoneTypes.Voice, false); CheckPhone(c.Phones, "(609) 888-7777", vCardPhoneTypes.Main, false); CheckPhone(c.Phones, "(555) 444-4443", vCardPhoneTypes.Home | vCardPhoneTypes.Fax, false); CheckPhone(c.Phones, "33322222222", vCardPhoneTypes.Work | vCardPhoneTypes.Fax, false); CheckPhone(c.Phones, "(999) 777-7999", vCardPhoneTypes.Default, false); //phones and emails are good //need to check the physical address parsing and on down CheckAddress(c.DeliveryAddresses, "8230 Boone Blvd", "Vinna", "VA", "22182", "United States", vCardDeliveryAddressTypes.Home | vCardDeliveryAddressTypes.Preferred, true); CheckIM(c.IMs, "skypeusernameee", IMServiceType.Skype, ItemType.HOME, true); CheckIM(c.IMs, "worksyokeusername", IMServiceType.Skype, ItemType.WORK, false); CheckIM(c.IMs, "msnname", IMServiceType.MSN, ItemType.UNSPECIFIED, false); CheckIM(c.IMs, "aolname", IMServiceType.AIM, ItemType.UNSPECIFIED, false);