public void SetTimeZone(TwitterTimeZone twitterTimeZone) { var tzinfo = twitterTimeZone.GetTZinfo(); if (tzinfo != null) { TimeZone = tzinfo; } }
public void SetTimeZone(TwitterTimeZone twitterTimeZone) { var tzinfo = twitterTimeZone.GetTZinfo(); if (tzinfo != null) { TimeZone = tzinfo; } }
public static string GetDisplayableValue(this TwitterTimeZone twitterTimeZone) { var twitterTimeZoneAttribute = GetAttribute(twitterTimeZone); return(twitterTimeZoneAttribute != null ? twitterTimeZoneAttribute.DisplayValue : twitterTimeZone.ToString()); }
private static TwitterTimeZoneAttribute GetAttribute(TwitterTimeZone twitterTimeZone) { var field = twitterTimeZone.GetType().GetField(twitterTimeZone.ToString()); return((TwitterTimeZoneAttribute)Attribute.GetCustomAttribute(field, typeof(TwitterTimeZoneAttribute))); }
public static string GetTZinfo(this TwitterTimeZone twitterTimeZone) { var twitterTimeZoneAttribute = GetAttribute(twitterTimeZone); return(twitterTimeZoneAttribute != null ? twitterTimeZoneAttribute.TZinfo : null); }
private static TwitterTimeZoneAttribute GetAttribute(TwitterTimeZone twitterTimeZone) { var field = twitterTimeZone.GetType().GetField(twitterTimeZone.ToString()); return (TwitterTimeZoneAttribute)Attribute.GetCustomAttribute(field, typeof(TwitterTimeZoneAttribute)); }