コード例 #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类型");
     }
 }
コード例 #2
0
        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
ファイル: ExcelDataCreator.cs プロジェクト: zhangga/luban
        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
ファイル: CsConstValueVisitor.cs プロジェクト: zhangga/luban
 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");
 }
コード例 #8
0
 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
ファイル: JavaDefineTypeName.cs プロジェクト: zhangga/luban
 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
ファイル: GoDeserializeVisitor.cs プロジェクト: zhangga/luban
 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;");
 }
コード例 #24
0
 public virtual void Accept(TFshort type, T x)
 {
 }
コード例 #25
0
 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())));
 }