~ubuntu-branches/ubuntu/trusty/smuxi/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/Twitterizer/Twitterizer2/Core/TwitterizerDateConverter.cs

  • Committer: Package Import Robot
  • Author(s): Mirco Bauer
  • Date: 2013-05-25 22:11:31 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20130525221131-nd2mc0kzubuwyx20
Tags: 0.8.11-1
* [22d13d5] Imported Upstream version 0.8.11
* [6d2b95a] Refreshed patches
* [89eb66e] Added ServiceStack libraries to smuxi-engine package
* [848ab10] Enable Campfire engine
* [c6dbdc7] Always build db4o for predictable build result
* [13ec489] Exclude OS X specific libraries from dh_clideps

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    /// </summary>
43
43
    public class TwitterizerDateConverter : Newtonsoft.Json.Converters.DateTimeConverterBase
44
44
    {
45
 
        public TwitterizerDateConverter() { }
46
45
        /// <summary>
47
46
        /// The date pattern for most dates returned by the API
48
47
        /// </summary>
79
78
        /// <param name="serializer">The serializer.</param>
80
79
        public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
81
80
        {
82
 
            throw new NotImplementedException();
 
81
            if (value.GetType() != typeof(DateTime))
 
82
                throw new ArgumentOutOfRangeException("value", "The value provided was not the expected data type.");
 
83
 
 
84
            writer.WriteValue(((DateTime)value).ToString(DateFormat, CultureInfo.InvariantCulture));
83
85
        }
84
 
 
85
 
//#if SILVERLIGHT
86
 
//        /// <summary>
87
 
//        /// Determines whether this instance can convert the specified object type.
88
 
//        /// </summary>
89
 
//        /// <param name="objectType">Type of the object.</param>
90
 
//        /// <returns>
91
 
//        /// <c>true</c> if this instance can convert the specified object type; otherwise, <c>false</c>.
92
 
//        /// </returns>
93
 
//        public override bool CanConvert(Type objectType)
94
 
//        {
95
 
//            return objectType == typeof(DateTime);
96
 
//        }
97
 
//#endif
98
86
    }
99
87
}