public DType Accept(TDouble type, string x) { if (double.TryParse(x, out var b)) { return(DDouble.ValueOf(b)); } else { throw new Exception($"{x} 不是double类型"); } }
public DType Accept(TDouble type, ExcelStream x) { var d = x.Read(); if (CheckNull(type.IsNullable, d)) { return(null); } if (!double.TryParse(d.ToString(), out var v)) { throw new InvalidExcelDataException($"{d} 不是 double 类型值"); } return(DDouble.ValueOf(v)); }
public void Accept(DDouble type, StringBuilder x) { x.Append(type.Value); }
public int Accept(DDouble data, TType type, Title x) { SetTitleValue(x, data.Value); return(1); }
public void Accept(DDouble type, TType x, List <ResourceInfo> y) { }
public bool Accept(DDouble type) { return(type.Value == 0); }
public void Accept(DDouble type, RawTextTable x) { }
public void Accept(DDouble type, ByteBuf x) { x.WriteDouble(type.Value); }
public DType Accept(TDouble type, XElement x, DefAssembly ass) { return(DDouble.ValueOf(double.Parse(x.Value.Trim()))); }
public void Accept(DDouble type, DefField x, List <ResourceInfo> y) { throw new NotImplementedException(); }
public void Accept(DDouble type, Utf8JsonWriter x) { x.WriteNumberValue(type.Value); }
public string Accept(DDouble type) { return(type.Value.ToString()); }
public void Accept(DDouble type, DefAssembly x) { throw new NotImplementedException(); }
public void Accept(DDouble type, StringBuilder line) { line.Append(type.Value); }
public DType Accept(TDouble type, JsonElement x, DefAssembly ass) { return(DDouble.ValueOf(x.GetDouble())); }