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 void Accept(DShort type, StringBuilder x) { x.Append(type.Value); }
public int Accept(DShort data, TType type, Title x) { SetTitleValue(x, data.Value); return(1); }
public void Accept(DShort type, TType x, List <ResourceInfo> y) { }
public bool Accept(DShort type) { return(type.Value == 0); }
public void Accept(DShort type, RawTextTable x) { }
public void Accept(DShort type, ByteBuf x) { x.WriteShort(type.Value); }
public DType Accept(TShort type, XElement x, DefAssembly ass) { return(DShort.ValueOf(short.Parse(x.Value.Trim()))); }
public void Accept(DShort type, DefField x, List <ResourceInfo> y) { throw new NotImplementedException(); }
public void Accept(DShort type, Utf8JsonWriter x) { x.WriteNumberValue(type.Value); }
public string Accept(DShort type) { return(type.Value.ToString()); }
public DType Accept(TShort type, object x, DefAssembly ass) { return(DShort.ValueOf((short)(int)x)); }
public void Accept(DShort type, DefAssembly x) { throw new NotImplementedException(); }
public void Accept(DShort type, StringBuilder line) { line.Append(type.Value); }
public DType Accept(TShort type, JsonElement x, DefAssembly ass) { return(DShort.ValueOf(x.GetInt16())); }