Exemple #1
0
 internal static IEntityPropertyDictionary MergeDicts(IEntityPropertyDictionary dictionary)
 {
     return(dictionary == null ?
            new Dictionary <string, EntityProperty>() :
            dictionary
            .ToDictionary(
                entry => entry.Key,
                entry => entry.Value));
 }
Exemple #2
0
 internal static DateTimeOffset ReadTimestamp(IEntityPropertyDictionary properties, string key)
 {
     if (properties.ContainsKey(key))
     {
         var val = properties[key].DateTimeOffsetValue;
         if (!val.HasValue)
         {
             return(DateTime.MinValue);
         }
         else
         {
             return(val.Value);
         }
     }
     else
     {
         //return DateTime.MinValue;
         return(DateTime.Now);
     }
 }
Exemple #3
0
 internal static void WriteTimestamp(IEntityPropertyDictionary prop, string key, DateTimeOffset val)
 {
     Debug.Assert(!prop.ContainsKey(key));
     prop[key] = new EntityProperty(val);
 }