Table of Contents

Constructor BytePattern

Namespace
MonoMod.Core.Utils
Assembly
MonoMod.Core.dll

BytePattern(AddressMeaning, params ushort[])

Constructs a BytePattern with the specified AddressMeaning and pattern.
public BytePattern(AddressMeaning meaning, params ushort[] pattern)

Parameters

meaning AddressMeaning
The AddressMeaning.
pattern ushort[]
The pattern.

Remarks

The pattern is a sequence of ushorts. Each element corresponds to one byte. If the high byte of the element is zero, then the low byte is the exact byte value to match. If the high byte is 0xFF, then the low byte is some value with special meaning associated with it. If the high byte is any other value, then that high byte acts as a mask for the bits of the low byte which must match.

BytePattern(AddressMeaning, bool, params ushort[])

Constructs a BytePattern with the specified AddressMeaning and pattern.
public BytePattern(AddressMeaning meaning, bool mustMatchAtStart, params ushort[] pattern)

Parameters

meaning AddressMeaning
The AddressMeaning.
mustMatchAtStart bool
true if this pattern must match at the start of scanned data.
pattern ushort[]
The pattern.

Remarks

The pattern is a sequence of ushorts. Each element corresponds to one byte. If the high byte of the element is zero, then the low byte is the exact byte value to match. If the high byte is 0xFF, then the low byte is some value with special meaning associated with it. If the high byte is any other value, then that high byte acts as a mask for the bits of the low byte which must match.

BytePattern(AddressMeaning, ReadOnlyMemory<ushort>)

Constructs a BytePattern with the specified AddressMeaning and pattern.
public BytePattern(AddressMeaning meaning, ReadOnlyMemory<ushort> pattern)

Parameters

meaning AddressMeaning
The AddressMeaning.
pattern ReadOnlyMemory<ushort>
The pattern.

Remarks

The pattern is a sequence of ushorts. Each element corresponds to one byte. If the high byte of the element is zero, then the low byte is the exact byte value to match. If the high byte is 0xFF, then the low byte is some value with special meaning associated with it. If the high byte is any other value, then that high byte acts as a mask for the bits of the low byte which must match.

BytePattern(AddressMeaning, bool, ReadOnlyMemory<ushort>)

Constructs a BytePattern with the specified AddressMeaning and pattern.
public BytePattern(AddressMeaning meaning, bool mustMatchAtStart, ReadOnlyMemory<ushort> pattern)

Parameters

meaning AddressMeaning
The AddressMeaning.
mustMatchAtStart bool
true if this pattern must match at the start of scanned data.
pattern ReadOnlyMemory<ushort>
The pattern.

Remarks

The pattern is a sequence of ushorts. Each element corresponds to one byte. If the high byte of the element is zero, then the low byte is the exact byte value to match. If the high byte is 0xFF, then the low byte is some value with special meaning associated with it. If the high byte is any other value, then that high byte acts as a mask for the bits of the low byte which must match.

BytePattern(AddressMeaning, ReadOnlyMemory<byte>, ReadOnlyMemory<byte>)

Constructs a BytePattern with the specified AddressMeaning and pattern.
public BytePattern(AddressMeaning meaning, ReadOnlyMemory<byte> mask, ReadOnlyMemory<byte> pattern)

Parameters

meaning AddressMeaning
The AddressMeaning.
mask ReadOnlyMemory<byte>
The bitmask to use to match against pattern.
pattern ReadOnlyMemory<byte>
The pattern bytes.

Remarks

mask and pattern must be the same length.

If an element of mask is zero, then the corresponding byte in pattern has a special meaning.

BytePattern(AddressMeaning, bool, ReadOnlyMemory<byte>, ReadOnlyMemory<byte>)

Constructs a BytePattern with the specified AddressMeaning and pattern.
public BytePattern(AddressMeaning meaning, bool mustMatchAtStart, ReadOnlyMemory<byte> mask, ReadOnlyMemory<byte> pattern)

Parameters

meaning AddressMeaning
The AddressMeaning.
mustMatchAtStart bool
true if this pattern must match at the start of scanned data.
mask ReadOnlyMemory<byte>
The bitmask to use to match against pattern.
pattern ReadOnlyMemory<byte>
The pattern bytes.

Remarks

mask and pattern must be the same length.

If an element of mask is zero, then the corresponding byte in pattern has a special meaning.