public DType Accept(TFshort type, string x) { if (short.TryParse(x, out var b)) { return(DFshort.ValueOf(b)); } else { throw new Exception($"{x} 不是short类型"); } }
public DType Accept(TFshort 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(DFshort.ValueOf(v)); }
public DType Accept(TFshort 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 DFshort(v)); }
public override string Accept(TFshort type) { return("Short"); }
public string Accept(TFshort type, string x) { return(x); }
public string Accept(TFshort type) { return("readFshort"); }
public string Accept(TFshort type) { return("FSHORT"); }
public virtual void Accept(TFshort type, T x) { DoAccept(type, x); }
public DType Accept(TFshort type, Sheet.NamedRow x, bool multirow, bool nullable) { throw new NotSupportedException(); }
public string Accept(TFshort type, string fieldName, string tablesName) { throw new NotImplementedException(); }
public DType Accept(TFshort type, IEnumerable <ExcelStream> x, bool y, DefAssembly ass) { throw new NotImplementedException(); }
public DType Accept(TFshort type, object x, DefAssembly ass) { return(DFshort.ValueOf((short)(int)x)); }
public DType Accept(TFshort type, object x, DefAssembly ass) { return(new DFshort((short)(int)x)); }
public string Accept(TFshort type, string fieldName, string logType) { return($"{fieldName} = default;"); }
public bool Accept(TFshort type, TType x, Dictionary <DefTypeBase, bool> y, HashSet <DefTypeBase> z) { return(true); }
public virtual string Accept(TFshort type) { return(type.IsNullable ? "Short" : "short"); }
public string Accept(TFshort type, string json, string field) { return(DefaultLoad(json, field)); }
public string Accept(TFshort type, string bufName) { return($"{bufName}.ReadFshort()"); }
public string Accept(TFshort type, string jsonVarName, string fieldName) { return($"{fieldName} = {jsonVarName}"); }
public virtual TR Accept(TFshort type) { return DoAccept(type); }
public string Accept(TFshort type) { return("FJsonValueNumber"); }
public string Accept(TFshort type, string bufName, string fieldName) { return($"{bufName}.WriteFshort({fieldName});"); }
public string Accept(TFshort type, string bufName, string fieldName) { return($"if(!{bufName}.readFshort({fieldName})) return false;"); }
public virtual void Accept(TFshort type, T x) { }
public string Accept(TFshort type) { return("int16"); }
public string Accept(TFshort type) { return("writeFshort"); }
public void Accept(TFshort type, HashSet <DefTypeBase> x) { }
public void Accept(TFshort type, Dictionary <string, DefTypeBase> x) { }
public string Accept(TFshort type, string bufName, string fieldName) { return($"{fieldName} = {bufName}.ReadFshort();"); }
public DType Accept(TFshort type, XElement x, DefAssembly ass) { return(DFshort.ValueOf(short.Parse(x.Value.Trim()))); }