public static MillisecondsToDateTime ( long unixTimeStamp ) : System.DateTime | ||
unixTimeStamp | long | |
return | System.DateTime |
public DdpJsonConverter() { _readTypes = new Dictionary <Type, Func <JsonReader, object, JsonSerializer, object> > { [typeof(DdpDate)] = (reader, existingValue, serializer) => { JObject ob = JObject.Load(reader); return(ob["$date"] == null ? existingValue : new DdpDate { DateTime = DdpUtil.MillisecondsToDateTime(ob["$date"].ToObject <long>()) }); }, [typeof(DdpBinary)] = (reader, existingValue, serializer) => { JObject ob = JObject.Load(reader); return(ob["$binary"] == null ? existingValue : new DdpBinary { Data = DdpUtil.GetBytesFromBase64(ob["$binary"].ToObject <string>()) }); } }; }