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 }
     };
 }
示例#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.");
     }
 }
示例#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) }
     };
 }
示例#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)) }
     };
 }
示例#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);
 }
示例#7
0
 public abstract void ValueFromConst(string value, Parser.ConstType typeHint);
示例#8
0
 public override void ValueFromConst(string value, Parser.ConstType typeHint)
 {
 }