Beispiel #1
0
 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));
        }
Beispiel #3
0
 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)
 {
 }
Beispiel #6
0
 public bool Accept(DDouble type)
 {
     return(type.Value == 0);
 }
Beispiel #7
0
 public void Accept(DDouble type, RawTextTable x)
 {
 }
Beispiel #8
0
 public void Accept(DDouble type, ByteBuf x)
 {
     x.WriteDouble(type.Value);
 }
Beispiel #9
0
 public DType Accept(TDouble type, XElement x, DefAssembly ass)
 {
     return(DDouble.ValueOf(double.Parse(x.Value.Trim())));
 }
Beispiel #10
0
 public void Accept(DDouble type, DefField x, List <ResourceInfo> y)
 {
     throw new NotImplementedException();
 }
Beispiel #11
0
 public void Accept(DDouble type, Utf8JsonWriter x)
 {
     x.WriteNumberValue(type.Value);
 }
Beispiel #12
0
 public string Accept(DDouble type)
 {
     return(type.Value.ToString());
 }
Beispiel #13
0
 public void Accept(DDouble type, DefAssembly x)
 {
     throw new NotImplementedException();
 }
Beispiel #14
0
 public void Accept(DDouble type, StringBuilder line)
 {
     line.Append(type.Value);
 }
Beispiel #15
0
 public DType Accept(TDouble type, JsonElement x, DefAssembly ass)
 {
     return(DDouble.ValueOf(x.GetDouble()));
 }