public override void ValueFromConst(string value, Parser.ConstType typeHint)
 {
     if (typeHint == Parser.ConstType.String)
     {
         var uvalue = ProtocolFormatter.UnescapeStringValue(value);
         Data = new[] { uvalue };
     }
     else
     {
         Data = new[] { value }
     };
 }
Example #2
0
 public override void ValueFromConst(string value, Parser.ConstType typeHint)
 {
     if (typeHint == Parser.ConstType.String)
     {
         Data = new[] { DateTime.ParseExact(ProtocolFormatter.UnescapeStringValue(value), "yyyy-MM-dd", null, DateTimeStyles.AssumeUniversal) }
     }
     ;
     else
     {
         throw new InvalidCastException("Cannot convert numeric value to Date.");
     }
 }
Example #3
0
 public override void ValueFromConst(string value, Parser.ConstType typeHint)
 {
     if (typeHint == Parser.ConstType.String)
     {
         var uvalue = ProtocolFormatter.UnescapeStringValue(value);
         Data = new[] { Values.First(x => x.Item1 == uvalue).Item2 };
     }
     else
     {
         Data = new[] { int.Parse(value) }
     };
 }
Example #4
0
 public override void ValueFromConst(string value, Parser.ConstType typeHint)
 {
     if (typeHint == Parser.ConstType.String)
     {
         Data = new[] { (T)Convert.ChangeType(ProtocolFormatter.UnescapeStringValue(value), typeof(T)) }
     }
     ;
     else
     {
         Data = new[] { (T)Convert.ChangeType(value, typeof(T)) }
     };
 }
Example #5
0
 public override void ValueFromConst(string value, Parser.ConstType typeHint)
 {
     throw new NotImplementedException();
 }
 public override void ValueFromConst(string value, Parser.ConstType typeHint)
 {
     Nulls = new[] { value == null };
     InnerType.ValueFromConst(value, typeHint);
 }
Example #7
0
 public abstract void ValueFromConst(string value, Parser.ConstType typeHint);
Example #8
0
 public override void ValueFromConst(string value, Parser.ConstType typeHint)
 {
 }