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 Hero() { this.Speed = 10; this.health = new DInt(Rand.Next(4, 10)); this.evil = new DBool(); this.kind = new DByte(); this.attacking = new DBool(); this.attackSpeed = new DByte((byte)Rand.Next(5, 12)); this.attackDamage = new DByte((byte)Rand.Next(1, 4)); this.type = 10; }
public Hero() { this.Speed = 10; this.health = new DInt(Rand.Next(4,10)); this.evil = new DBool(); this.kind = new DByte(); this.attacking = new DBool(); this.attackSpeed = new DByte((byte)Rand.Next(5,12)); this.attackDamage = new DByte((byte)Rand.Next(1,4)); this.type = 10; }
public DType Accept(TBool type, XElement x, DefAssembly ass) { return(DBool.ValueOf(bool.Parse(x.Value.Trim().ToLower()))); }
public void Accept(DBool type, DefField x, List <ResourceInfo> y) { throw new NotImplementedException(); }
public Character(User user) { this.owner = user; this.enabled = new DBool(); this.Speed = 3; }
public int Accept(DBool data, TType type, Title x) { SetTitleValue(x, data.Value); return(1); }
public bool Accept(DBool type) { return(type.Value == false); }
public void Accept(DBool type, Utf8JsonWriter x) { x.WriteBooleanValue(type.Value); }
public string Accept(DBool type) { return(type.Value ? "true" : "false"); }
public DType Accept(TBool type, object x, DefAssembly ass) { return(DBool.ValueOf((bool)x)); }
public void Accept(DBool type, DefAssembly x) { throw new NotImplementedException(); }
public void Accept(DBool type, StringBuilder line) { line.Append(type.Value ? "true" : "false"); }
public void Accept(DBool type, ByteBuf x) { x.WriteBool(type.Value); }
public void Accept(DBool type, RawTextTable x) { }
public DBool OpAND(DBool other) { return(new DBool(value && other.value)); }
public void Accept(DBool type, TType x, List <ResourceInfo> y) { }
public DBool OpOR(DBool other) { return(new DBool(value || other.value)); }
public void Accept(DBool type, StringBuilder x) { x.Append(type.Value); }
public DType Accept(TBool type, JsonElement x, DefAssembly ass) { return(DBool.ValueOf(x.GetBoolean())); }