public override string[] ToColumns(string alias, string propertyName) { if (EntityClass.Equals(propertyName)) { // This doesn't actually seem to work but it *might* // work on some dbs. Also it doesn't work if there // are multiple columns of results because it // is not accounting for the suffix: // return new String[] { getDiscriminatorColumnName() }; //TODO: this will need to be changed to return a SqlString but for now the SqlString // is being converted to a string for existing interfaces to work. return(new string[] { DiscriminatorFragment(alias).ToSqlStringFragment() }); } else { return(base.ToColumns(alias, propertyName)); } }
public void test_equality_invalid_object() { var item = new EntityClass(); Assert.IsFalse(item.Equals(new object())); }
public override int CalculateDamageModifier(Entity attacker, Entity defender, int baseDamage) { return(entityClass.Equals(defender.Type.EntityClass) ? baseDamage * DamageMultiplier : baseDamage); }