public DType Accept(TShort type, string x) { if (short.TryParse(x, out var b)) { return(DShort.ValueOf(b)); } else { throw new Exception($"{x} 不是short类型"); } }
public DType Accept(TShort type, ExcelStream x) { var d = x.Read(); if (CheckNull(type.IsNullable, d)) { return(null); } if (!short.TryParse(d.ToString(), out short v)) { throw new InvalidExcelDataException($"{d} 不是 short 类型值"); } return(DShort.ValueOf(v)); }
public DType Accept(TShort type, object converter, ExcelStream x, DefAssembly ass) { var d = x.Read(); if (CheckNull(type.IsNullable, d)) { return(null); } if (!short.TryParse(d.ToString(), out short v)) { throw new Exception($"{d} 不是 short 类型值"); } return(new DShort(v)); }
public override string Accept(TShort type) { return("Short"); }
public string Accept(TShort type, string x) { return(x); }
public string Accept(TShort type) { return("readShort"); }
public string Accept(TShort type) { return("SHORT"); }
public virtual void Accept(TShort type, T x) { DoAccept(type, x); }
public DType Accept(TShort type, Sheet.NamedRow x, bool multirow, bool nullable) { throw new NotSupportedException(); }
public string Accept(TShort type, string fieldName, string tablesName) { throw new NotImplementedException(); }
public DType Accept(TShort type, IEnumerable <ExcelStream> x, bool y, DefAssembly ass) { throw new NotImplementedException(); }
public DType Accept(TShort type, object x, DefAssembly ass) { return(DShort.ValueOf((short)(int)x)); }
public DType Accept(TShort type, object x, DefAssembly ass) { return(new DShort((short)(int)x)); }
public string Accept(TShort type, string fieldName, string logType) { return($"{fieldName} = default;"); }
public bool Accept(TShort type, TType x, Dictionary <DefTypeBase, bool> y, HashSet <DefTypeBase> z) { return(true); }
public virtual string Accept(TShort type) { return(type.IsNullable ? "Short" : "short"); }
public string Accept(TShort type, string json, string field) { return(DefaultLoad(json, field)); }
public string Accept(TShort type, string bufName) { return($"{bufName}.ReadShort()"); }
public string Accept(TShort type, string jsonVarName, string fieldName) { return($"{fieldName} = {jsonVarName}"); }
public virtual TR Accept(TShort type) { return DoAccept(type); }
public string Accept(TShort type) { return("FJsonValueNumber"); }
public string Accept(TShort type, string bufName, string fieldName) { return($"{bufName}.WriteShort({fieldName});"); }
public string Accept(TShort type, string bufName, string fieldName) { return($"if(!{bufName}.readShort({fieldName})) return false;"); }
public virtual void Accept(TShort type, T x) { }
public string Accept(TShort type) { return("int16"); }
public string Accept(TShort type) { return("writeShort"); }
public void Accept(TShort type, HashSet <DefTypeBase> x) { }
public void Accept(TShort type, Dictionary <string, DefTypeBase> x) { }
public string Accept(TShort type, string bufName, string fieldName) { return($"{fieldName} = {bufName}.ReadShort();"); }
public DType Accept(TShort type, XElement x, DefAssembly ass) { return(DShort.ValueOf(short.Parse(x.Value.Trim()))); }