public DType Accept(TBool type, ExcelStream x) { var d = x.Read(); if (CheckNull(type.IsNullable, d)) { return(null); } return(DBool.ValueOf(CreateBool(d))); }
public DType Accept(TBool type, string x) { if (bool.TryParse(x, out var b)) { return(DBool.ValueOf(b)); } else { throw new Exception($"{x} 不是bool类型"); } }
public DType Accept(TBool type, XElement x, DefAssembly ass) { return(DBool.ValueOf(bool.Parse(x.Value.Trim().ToLower()))); }
public DType Accept(TBool type, object x, DefAssembly ass) { return(DBool.ValueOf((bool)x)); }
public DType Accept(TBool type, JsonElement x, DefAssembly ass) { return(DBool.ValueOf(x.GetBoolean())); }