Beispiel #1
0
 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));
        }
Beispiel #3
0
 public void Accept(DFshort type, StringBuilder x)
 {
     x.Append(type.Value);
 }
 public int Accept(DFshort data, TType type, Title x)
 {
     SetTitleValue(x, data.Value);
     return(1);
 }
 public void Accept(DFshort type, TType x, List <ResourceInfo> y)
 {
 }
Beispiel #6
0
 public bool Accept(DFshort type)
 {
     return(type.Value == 0);
 }
Beispiel #7
0
 public void Accept(DFshort type, RawTextTable x)
 {
 }
Beispiel #8
0
 public void Accept(DFshort type, ByteBuf x)
 {
     x.WriteFshort(type.Value);
 }
Beispiel #9
0
 public DType Accept(TFshort type, XElement x, DefAssembly ass)
 {
     return(DFshort.ValueOf(short.Parse(x.Value.Trim())));
 }
Beispiel #10
0
 public void Accept(DFshort type, DefField x, List <ResourceInfo> y)
 {
     throw new NotImplementedException();
 }
Beispiel #11
0
 public void Accept(DFshort type, Utf8JsonWriter x)
 {
     x.WriteNumberValue(type.Value);
 }
Beispiel #12
0
 public string Accept(DFshort type)
 {
     return(type.Value.ToString());
 }
 public DType Accept(TFshort type, object x, DefAssembly ass)
 {
     return(DFshort.ValueOf((short)(int)x));
 }
Beispiel #14
0
 public void Accept(DFshort type, DefAssembly x)
 {
     throw new NotImplementedException();
 }
Beispiel #15
0
 public void Accept(DFshort type, StringBuilder line)
 {
     line.Append(type.Value);
 }
Beispiel #16
0
 public DType Accept(TFshort type, JsonElement x, DefAssembly ass)
 {
     return(DFshort.ValueOf(x.GetInt16()));
 }