private void CheckHeader() { if (Unknown0x08 != 0x1) { throw new Exception("DDSHeaderV2: exception 0x08"); } if (Unknown0x0C != 0x0) { throw new Exception("DDSHeaderV2: exception 0x0C"); } if (HeaderSize != 0x80) { throw new Exception("DDSHeaderV2: exception 0x10"); } if (Unknown0x1A != 0x02) { throw new Exception("DDSHeaderV2: exception 0x1A"); } if (Unknown0x24 != 0x10000) { throw new Exception("DDSHeaderV2: exception 0x24"); } if (Reserved.Contains <int>(0, new ReverseStructComparer <int>())) { throw new Exception("DDSHeaderV2: exception 0x28 array"); } }
/// <summary> /// The Postgres Server requires case sensativity if you enclose identifiers in double-quotes. /// So, this is only done when necessary. /// </summary> /// <param name="name"></param> /// <returns></returns> public string Enclose(string name) { if (_c.Enclose) { return(L + name + R); } return(name.Contains(" ") || Reserved.Contains(name) ? L + name + R : name); }
public Point GetFreeSpot() { for (int x = X; x < X + Width; x++) { for (int y = Y; y < Y + Height; y++) { if (this.ParentMap.GetObjects <Components.MapItem>(x, y).Count <= 0) { if (!Reserved.Contains(new Point(x, y))) { return(new Point(x, y)); } } else { } } } return(new Point(-1, -1)); }
protected bool IsReserved(Keyword keyword) => Reserved.Contains(keyword.Semantic);