Esempio n. 1
0
        public override Object ValueFromDataContract(Object obj)
        {
            var intObj = obj as Int64?;

            if (intObj != null)
            {
                return((Double)intObj);
            }
            TypeValidationHelper.Validate(obj, typeof(Double));
            return(obj);
        }
Esempio n. 2
0
 public override Object ValueFromDataContract(Object obj)
 {
     TypeValidationHelper.Validate(obj, typeof(string));
     try
     {
         return(new HutelTime((string)obj));
     }
     catch (Exception ex)
     {
         throw new TypeValidationException("Error in time constructor", ex);
     }
 }
Esempio n. 3
0
 public override Object ValueToDataContract(Object obj)
 {
     TypeValidationHelper.Validate(obj, typeof(Int64));
     return(obj);
 }
Esempio n. 4
0
 public override Object ValueToDataContract(Object obj)
 {
     TypeValidationHelper.Validate(obj, typeof(string));
     throwIfNotInCollection(obj);
     return(obj);
 }
Esempio n. 5
0
 public override Object ValueToDataContract(Object obj)
 {
     TypeValidationHelper.Validate(obj, typeof(HutelTime));
     return(((HutelTime)obj).ToString());
 }
Esempio n. 6
0
 public override Object ValueFromDataContract(Object obj)
 {
     TypeValidationHelper.Validate(obj, typeof(string));
     return(obj);
 }