public DType Accept(TByte type, string x) { if (byte.TryParse(x, out var b)) { return(DByte.ValueOf(b)); } else { throw new Exception($"{x} 不是byte类型"); } }
public DType Accept(TByte type, ExcelStream x) { var d = x.Read(); if (CheckNull(type.IsNullable, d)) { return(null); } if (!byte.TryParse(d.ToString(), out byte v)) { throw new InvalidExcelDataException($"{d} 不是 byte 类型值"); } return(DByte.ValueOf(v)); }
public DType Accept(TByte type, object converter, ExcelStream x, DefAssembly ass) { var d = x.Read(); if (CheckNull(type.IsNullable, d)) { return(null); } if (!byte.TryParse(d.ToString(), out byte v)) { throw new Exception($"{d} 不是 byte 类型值"); } return(new DByte(v)); }
public DType Accept(TByte type, XElement x, DefAssembly ass) { return(DByte.ValueOf(byte.Parse(x.Value.Trim()))); }
public string Accept(TByte type, string bufName) { return($"{bufName}.ReadByte()"); }
public string Accept(TByte type, string x) { return(x); }
public override string Accept(TByte type) { return("Byte"); }
public string Accept(TByte type, string bufName, string fieldName) { return($"if(!{bufName}.readByte({fieldName})) return false;"); }
public string Accept(TByte type) { return("readByte"); }
public string Accept(TByte type, string jsonVarName, string fieldName) { return($"{fieldName} = {jsonVarName}"); }
public string Accept(TByte type) { return("FJsonValueNumber"); }
public virtual string Accept(TByte type) { return(type.IsNullable ? "Byte" : "byte"); }
public string Accept(TByte type, string json, string field) { return(DefaultLoad(json, field)); }
public DType Accept(TByte type, IEnumerable <ExcelStream> x, bool y, DefAssembly ass) { throw new NotImplementedException(); }
public DType Accept(TByte type, object x, DefAssembly ass) { return(DByte.ValueOf((byte)(int)x)); }
public DType Accept(TByte type, object x, DefAssembly ass) { return(new DByte((byte)(int)x)); }
public string Accept(TByte type, string fieldName, string logType) { return($"{fieldName} = default;"); }
public bool Accept(TByte type, TType x, Dictionary <DefTypeBase, bool> y, HashSet <DefTypeBase> z) { return(true); }
public string Accept(TByte type, string fieldName, string tablesName) { throw new NotImplementedException(); }
public virtual TR Accept(TByte type) { return DoAccept(type); }
public DType Accept(TByte type, Sheet.NamedRow x, bool multirow, bool nullable) { throw new NotSupportedException(); }
public string Accept(TByte type, string bufName, string fieldName) { return($"{bufName}.WriteByte({fieldName});"); }
public virtual void Accept(TByte type, T x) { DoAccept(type, x); }
public string Accept(TByte type) { return("uint8"); }
public string Accept(TByte type) { return("BYTE"); }
public virtual void Accept(TByte type, T x) { }
public void Accept(TByte type, HashSet <DefTypeBase> x) { }
public string Accept(TByte type) { return("writeByte"); }
public string Accept(TByte type, string bufName, string fieldName) { return($"{fieldName} = {bufName}.ReadByte();"); }
public void Accept(TByte type, Dictionary <string, DefTypeBase> x) { }