Class ContainerPattern
A pattern used to match magic bytes in an image file header.
Inheritance
System.Object
ContainerPattern
Assembly: PhotoSauce.MagicScaler.dll
Syntax
public sealed class ContainerPattern : ValueType
Constructors
ContainerPattern(Int32, Byte[], Byte[])
A pattern used to match magic bytes in an image file header.
Declaration
public ContainerPattern(int Offset, byte[] Pattern, byte[] Mask)
Parameters
Type |
Name |
Description |
System.Int32 |
Offset |
Number of bytes to skip from the start of the file before attempting pattern match.
|
System.Byte[] |
Pattern |
A byte pattern to match at the given Offset .
|
System.Byte[] |
Mask |
A mask to apply to image bytes (using binary langword_csharp_&) before matching against the Pattern .
|
Properties
Mask
A mask to apply to image bytes (using binary langword_csharp_&) before matching against the Pattern
.
Declaration
public byte[] Mask { get; set; }
Property Value
Type |
Description |
System.Byte[] |
|
Offset
Number of bytes to skip from the start of the file before attempting pattern match.
Declaration
public int Offset { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Pattern
A byte pattern to match at the given Offset
.
Declaration
public byte[] Pattern { get; set; }
Property Value
Type |
Description |
System.Byte[] |
|
Methods
Deconstruct(out Int32, out Byte[], out Byte[])
Declaration
public void Deconstruct(out int Offset, out byte[] Pattern, out byte[] Mask)
Parameters
Type |
Name |
Description |
System.Int32 |
Offset |
|
System.Byte[] |
Pattern |
|
System.Byte[] |
Mask |
|
Equals(ContainerPattern)
Declaration
public bool Equals(ContainerPattern other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Operators
Equality(ContainerPattern, ContainerPattern)
Declaration
public static bool operator ==(ContainerPattern left, ContainerPattern right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(ContainerPattern, ContainerPattern)
Declaration
public static bool operator !=(ContainerPattern left, ContainerPattern right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<>