Class UnexpectedMagicException
Namespace: ValveResourceFormat.Utils
Assembly: ValveResourceFormat.dll
Exception thrown when an unexpected magic number or value is encountered.
public class UnexpectedMagicException : Exception, ISerializableInheritance
object ← Exception ← UnexpectedMagicException
Implements
Inherited Members
Exception.GetBaseException(), Exception.GetType(), Exception.ToString(), Exception.Data, Exception.HelpLink, Exception.HResult, Exception.InnerException, Exception.Message, Exception.Source, Exception.StackTrace, Exception.TargetSite, Exception.SerializeObjectState
Constructors
UnexpectedMagicException(string, int, string?)
Initializes a new instance of the class.
public UnexpectedMagicException(string message, int magic, string? nameofMagic = null)Parameters
message string
The error message.
magic int
The unexpected magic value.
nameofMagic string?
The name of the magic parameter.
UnexpectedMagicException(string, uint, string?)
Initializes a new instance of the class.
public UnexpectedMagicException(string message, uint magic, string? nameofMagic = null)Parameters
message string
The error message.
magic uint
The unexpected magic value.
nameofMagic string?
The name of the magic parameter.
UnexpectedMagicException(string, string, string?)
Initializes a new instance of the class.
public UnexpectedMagicException(string message, string magic, string? nameofMagic = null)Parameters
message string
The error message.
magic string
The unexpected magic value.
nameofMagic string?
The name of the magic parameter.
Properties
Message
Gets a message that describes the current exception.
public override string Message { get; }Property Value
Methods
Assert<T>(bool, T, string?)
Asserts that a condition is true, throwing an exception if it's false.
public static void Assert<T>(bool condition, T actualMagic, string? conditionExpression = null)Parameters
condition bool
The condition to check.
actualMagic T
The actual magic value.
conditionExpression string?
The condition expression string.
Type Parameters
T
The type of the actual magic value.

