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