Volume Control
Application-specific hotkeys for Windows
VolumeControl.Core.EmbeddedResourceNotFoundException Class Reference

Represents errors that occur while trying to access an embedded resource file. More...

Inheritance diagram for VolumeControl.Core.EmbeddedResourceNotFoundException:
Collaboration diagram for VolumeControl.Core.EmbeddedResourceNotFoundException:

Public Member Functions

 EmbeddedResourceNotFoundException (string resourceName, Assembly sourceAssembly, string? message, Exception? innerException)
 Creates a new EmbeddedResourceNotFoundException instance with the specified message and innerException . More...
 
 EmbeddedResourceNotFoundException (string resourceName, Assembly sourceAssembly, string? message)
 Creates a new EmbeddedResourceNotFoundException instance with the specified message . More...
 
 EmbeddedResourceNotFoundException (string resourceName, Assembly sourceAssembly, Exception? innerException)
 Creates a new EmbeddedResourceNotFoundException instance with the specified innerException and a default message generated from the specified resourceName and sourceAssembly . More...
 
 EmbeddedResourceNotFoundException (string resourceName, Assembly sourceAssembly)
 Creates a new EmbeddedResourceNotFoundException instance with a default message generated from the specified resourceName and sourceAssembly . More...
 

Static Protected Member Functions

static ? string FindActualResourceName (Assembly assembly, string resourceName, StringComparison stringComparison=StringComparison.OrdinalIgnoreCase)
 Searches the specified assembly for an embedded resource with a similar name to resourceName . More...
 

Properties

string ResourceName [get]
 Gets the name of the missing resource file. More...
 
Assembly SourceAssembly [get]
 Gets the Assembly that was accessed. More...
 

Detailed Description

Represents errors that occur while trying to access an embedded resource file.

Constructor & Destructor Documentation

◆ EmbeddedResourceNotFoundException() [1/4]

VolumeControl.Core.EmbeddedResourceNotFoundException.EmbeddedResourceNotFoundException ( string  resourceName,
Assembly  sourceAssembly,
string?  message,
Exception?  innerException 
)

Creates a new EmbeddedResourceNotFoundException instance with the specified message and innerException .

Parameters
resourceNameThe name of the resource that wasn't found.
sourceAssemblyThe assembly that the resource wasn't found in.
messageThe error message that explains the reason for the exception.
innerExceptionThe exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

References VolumeControl.Core.EmbeddedResourceNotFoundException.ResourceName, and VolumeControl.Core.EmbeddedResourceNotFoundException.SourceAssembly.

◆ EmbeddedResourceNotFoundException() [2/4]

VolumeControl.Core.EmbeddedResourceNotFoundException.EmbeddedResourceNotFoundException ( string  resourceName,
Assembly  sourceAssembly,
string?  message 
)

Creates a new EmbeddedResourceNotFoundException instance with the specified message .

Parameters
resourceNameThe name of the resource that wasn't found.
sourceAssemblyThe assembly that the resource wasn't found in.
messageThe error message that explains the reason for the exception.

References VolumeControl.Core.EmbeddedResourceNotFoundException.ResourceName, and VolumeControl.Core.EmbeddedResourceNotFoundException.SourceAssembly.

◆ EmbeddedResourceNotFoundException() [3/4]

VolumeControl.Core.EmbeddedResourceNotFoundException.EmbeddedResourceNotFoundException ( string  resourceName,
Assembly  sourceAssembly,
Exception?  innerException 
)

Creates a new EmbeddedResourceNotFoundException instance with the specified innerException and a default message generated from the specified resourceName and sourceAssembly .

Parameters
resourceNameThe name of the resource that wasn't found.
sourceAssemblyThe assembly that the resource wasn't found in.
innerExceptionThe exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

References VolumeControl.Core.EmbeddedResourceNotFoundException.ResourceName, and VolumeControl.Core.EmbeddedResourceNotFoundException.SourceAssembly.

◆ EmbeddedResourceNotFoundException() [4/4]

VolumeControl.Core.EmbeddedResourceNotFoundException.EmbeddedResourceNotFoundException ( string  resourceName,
Assembly  sourceAssembly 
)

Creates a new EmbeddedResourceNotFoundException instance with a default message generated from the specified resourceName and sourceAssembly .

Parameters
resourceNameThe name of the resource that wasn't found.
sourceAssemblyThe assembly that the resource wasn't found in.

References VolumeControl.Core.EmbeddedResourceNotFoundException.ResourceName, and VolumeControl.Core.EmbeddedResourceNotFoundException.SourceAssembly.

Member Function Documentation

◆ FindActualResourceName()

static ? string VolumeControl.Core.EmbeddedResourceNotFoundException.FindActualResourceName ( Assembly  assembly,
string  resourceName,
StringComparison  stringComparison = StringComparison.OrdinalIgnoreCase 
)
staticprotected

Searches the specified assembly for an embedded resource with a similar name to resourceName .

If the specified resourceName is missing namespace qualifiers, this method will find the correct full name. When this method returns null, it indicates that the resourceName may be spelled wrong, the resource is in a different assembly, or the Build Action for the file isn't set to Embedded resource.

Parameters
assemblyThe Assembly to search.
resourceNameThe given name of the resource file.
stringComparisonThe comparison type to use when comparing strings.
Returns
The specified resourceName with namespace qualifiers included if found in the assembly ; otherwise null.

Property Documentation

◆ ResourceName

string VolumeControl.Core.EmbeddedResourceNotFoundException.ResourceName
get

Gets the name of the missing resource file.

Referenced by VolumeControl.Core.EmbeddedResourceNotFoundException.EmbeddedResourceNotFoundException().

◆ SourceAssembly

Assembly VolumeControl.Core.EmbeddedResourceNotFoundException.SourceAssembly
get

The documentation for this class was generated from the following file: