dnSpy.Contracts.Hex.HexBufferLineFormatter.IsValidPosition C# (CSharp) Метод

IsValidPosition() публичный Метод

Returns true if position is a valid position that can be passed to methods expecting a (physical) position.
public IsValidPosition ( HexBufferPoint position ) : bool
position HexBufferPoint Position
Результат bool
		public bool IsValidPosition(HexBufferPoint position) {
			if (position.Buffer != Buffer)
				return false;
			// Allow the last position since it's so easy to accidentally pass in the end position.
			// The text editor API also allows this so to make everything easier, also allow it here,
			// but treat it as Max(StartPosition, EndPosition - 1) (treating them as signed integers)
			return BufferStart <= position && position <= BufferEnd;
		}