コード例 #1
0
 public DType Accept(TFint type, string x)
 {
     if (int.TryParse(x, out var b))
     {
         return(DFint.ValueOf(b));
     }
     else
     {
         throw new Exception($"{x} 不是int类型");
     }
 }
コード例 #2
0
        public DType Accept(TFint type, ExcelStream x)
        {
            var d = x.Read();

            if (CheckNull(type.IsNullable, d))
            {
                return(null);
            }
            var ds = d.ToString();

            //if (field?.Remapper is TEnum te)
            //{
            //    if (te.DefineEnum.TryValueByNameOrAlias(ds, out var c))
            //    {
            //        return new DFint(c);
            //    }
            //}
            if (!int.TryParse(ds, out var v))
            {
                throw new InvalidExcelDataException($"{d} 不是 int 类型值");
            }
            return(DFint.ValueOf(v));
        }
コード例 #3
0
 public void Accept(DFint type, StringBuilder x)
 {
     x.Append(type.Value);
 }
コード例 #4
0
 public int Accept(DFint data, TType type, Title x)
 {
     SetTitleValue(x, data.Value);
     return(1);
 }
コード例 #5
0
 public void Accept(DFint type, TType x, List <ResourceInfo> y)
 {
 }
コード例 #6
0
 public bool Accept(DFint type)
 {
     return(type.Value == 0);
 }
コード例 #7
0
 public void Accept(DFint type, RawTextTable x)
 {
 }
コード例 #8
0
 public void Accept(DFint type, ByteBuf x)
 {
     x.WriteFint(type.Value);
 }
コード例 #9
0
 public DType Accept(TFint type, XElement x, DefAssembly ass)
 {
     return(DFint.ValueOf(int.Parse(x.Value.Trim())));
 }
コード例 #10
0
ファイル: ResourceExportor.cs プロジェクト: zhangga/luban
 public void Accept(DFint type, DefField x, List <ResourceInfo> y)
 {
     throw new NotImplementedException();
 }
コード例 #11
0
ファイル: JsonExportor.cs プロジェクト: zhangga/luban
 public void Accept(DFint type, Utf8JsonWriter x)
 {
     x.WriteNumberValue(type.Value);
 }
コード例 #12
0
 public string Accept(DFint type)
 {
     return(type.Value.ToString());
 }
コード例 #13
0
 public DType Accept(TFint type, object x, DefAssembly ass)
 {
     return(DFint.ValueOf((int)x));
 }
コード例 #14
0
ファイル: ValidatorVisitor.cs プロジェクト: zhangga/luban
 public void Accept(DFint type, DefAssembly x)
 {
     throw new NotImplementedException();
 }
コード例 #15
0
ファイル: LuaExportor.cs プロジェクト: zhangga/luban
 public void Accept(DFint type, StringBuilder line)
 {
     line.Append(type.Value);
 }
コード例 #16
0
 public DType Accept(TFint type, JsonElement x, DefAssembly ass)
 {
     return(DFint.ValueOf(x.GetInt32()));
 }