예제 #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));
        }
예제 #3
0
        public DType Accept(TFshort type, object converter, ExcelStream x, DefAssembly ass)
        {
            var d = x.Read();

            if (CheckNull(type.IsNullable, d))
            {
                return(null);
            }
            if (!short.TryParse(d.ToString(), out short v))
            {
                throw new Exception($"{d} 不是 short 类型值");
            }
            return(new DFshort(v));
        }
예제 #4
0
 public override string Accept(TFshort type)
 {
     return("Short");
 }
예제 #5
0
 public string Accept(TFshort type, string x)
 {
     return(x);
 }
예제 #6
0
 public string Accept(TFshort type)
 {
     return("readFshort");
 }
예제 #7
0
 public string Accept(TFshort type)
 {
     return("FSHORT");
 }
 public virtual void Accept(TFshort type, T x)
 {
     DoAccept(type, x);
 }
예제 #9
0
 public DType Accept(TFshort type, Sheet.NamedRow x, bool multirow, bool nullable)
 {
     throw new NotSupportedException();
 }
예제 #10
0
 public string Accept(TFshort type, string fieldName, string tablesName)
 {
     throw new NotImplementedException();
 }
예제 #11
0
 public DType Accept(TFshort type, IEnumerable <ExcelStream> x, bool y, DefAssembly ass)
 {
     throw new NotImplementedException();
 }
예제 #12
0
 public DType Accept(TFshort type, object x, DefAssembly ass)
 {
     return(DFshort.ValueOf((short)(int)x));
 }
예제 #13
0
 public DType Accept(TFshort type, object x, DefAssembly ass)
 {
     return(new DFshort((short)(int)x));
 }
예제 #14
0
 public string Accept(TFshort type, string fieldName, string logType)
 {
     return($"{fieldName} = default;");
 }
예제 #15
0
 public bool Accept(TFshort type, TType x, Dictionary <DefTypeBase, bool> y, HashSet <DefTypeBase> z)
 {
     return(true);
 }
예제 #16
0
 public virtual string Accept(TFshort type)
 {
     return(type.IsNullable ? "Short" : "short");
 }
예제 #17
0
 public string Accept(TFshort type, string json, string field)
 {
     return(DefaultLoad(json, field));
 }
예제 #18
0
 public string Accept(TFshort type, string bufName)
 {
     return($"{bufName}.ReadFshort()");
 }
예제 #19
0
 public string Accept(TFshort type, string jsonVarName, string fieldName)
 {
     return($"{fieldName} = {jsonVarName}");
 }
예제 #20
0
 public virtual TR Accept(TFshort type)
 {
     return DoAccept(type);
 }
예제 #21
0
 public string Accept(TFshort type)
 {
     return("FJsonValueNumber");
 }
예제 #22
0
 public string Accept(TFshort type, string bufName, string fieldName)
 {
     return($"{bufName}.WriteFshort({fieldName});");
 }
예제 #23
0
 public string Accept(TFshort type, string bufName, string fieldName)
 {
     return($"if(!{bufName}.readFshort({fieldName})) return false;");
 }
 public virtual void Accept(TFshort type, T x)
 {
 }
 public string Accept(TFshort type)
 {
     return("int16");
 }
예제 #26
0
 public string Accept(TFshort type)
 {
     return("writeFshort");
 }
예제 #27
0
 public void Accept(TFshort type, HashSet <DefTypeBase> x)
 {
 }
예제 #28
0
 public void Accept(TFshort type, Dictionary <string, DefTypeBase> x)
 {
 }
예제 #29
0
 public string Accept(TFshort type, string bufName, string fieldName)
 {
     return($"{fieldName} = {bufName}.ReadFshort();");
 }
예제 #30
0
 public DType Accept(TFshort type, XElement x, DefAssembly ass)
 {
     return(DFshort.ValueOf(short.Parse(x.Value.Trim())));
 }