Search Results for

    Show / Hide Table of Contents

    Class ContainerPattern

    A pattern used to match magic bytes in an image file header.

    Inheritance
    System.Object
    ContainerPattern
    Implements
    System.IEquatable<ContainerPattern>
    Namespace: PhotoSauce.MagicScaler
    Assembly: PhotoSauce.MagicScaler.dll
    Syntax
    public sealed class ContainerPattern : ValueType
    Remarks

    The total length described by (Offset + Pattern.Length) should not be more than 16 bytes.

    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.

    Remarks

    The total length described by (Offset + Pattern.Length) should not be more than 16 bytes.

    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
    Type Name Description
    ContainerPattern other
    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
    Type Name Description
    ContainerPattern left
    ContainerPattern right
    Returns
    Type Description
    System.Boolean

    Inequality(ContainerPattern, ContainerPattern)

    Declaration
    public static bool operator !=(ContainerPattern left, ContainerPattern right)
    Parameters
    Type Name Description
    ContainerPattern left
    ContainerPattern right
    Returns
    Type Description
    System.Boolean

    Implements

    System.IEquatable<>
    In This Article
    Back to top Copyright © 2022 Clinton Ingram
    Generated with DocFX