public DType Accept(TFint type, string x) { if (int.TryParse(x, out var b)) { return(DFint.ValueOf(b)); } else { throw new Exception($"{x} 不是int类型"); } }
public DType Accept(TFint type, ExcelStream x) { var d = x.Read(); if (CheckNull(type.IsNullable, d)) { return(null); } var ds = d.ToString(); //if (field?.Remapper is TEnum te) //{ // if (te.DefineEnum.TryValueByNameOrAlias(ds, out var c)) // { // return new DFint(c); // } //} if (!int.TryParse(ds, out var v)) { throw new InvalidExcelDataException($"{d} 不是 int 类型值"); } return(DFint.ValueOf(v)); }
public void Accept(DFint type, StringBuilder x) { x.Append(type.Value); }
public int Accept(DFint data, TType type, Title x) { SetTitleValue(x, data.Value); return(1); }
public void Accept(DFint type, TType x, List <ResourceInfo> y) { }
public bool Accept(DFint type) { return(type.Value == 0); }
public void Accept(DFint type, RawTextTable x) { }
public void Accept(DFint type, ByteBuf x) { x.WriteFint(type.Value); }
public DType Accept(TFint type, XElement x, DefAssembly ass) { return(DFint.ValueOf(int.Parse(x.Value.Trim()))); }
public void Accept(DFint type, DefField x, List <ResourceInfo> y) { throw new NotImplementedException(); }
public void Accept(DFint type, Utf8JsonWriter x) { x.WriteNumberValue(type.Value); }
public string Accept(DFint type) { return(type.Value.ToString()); }
public DType Accept(TFint type, object x, DefAssembly ass) { return(DFint.ValueOf((int)x)); }
public void Accept(DFint type, DefAssembly x) { throw new NotImplementedException(); }
public void Accept(DFint type, StringBuilder line) { line.Append(type.Value); }
public DType Accept(TFint type, JsonElement x, DefAssembly ass) { return(DFint.ValueOf(x.GetInt32())); }