ResXFileRef Class

Represents a link to an external resource.

Definition

Namespace: KGySoft.Resources
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
C#
[SerializableAttribute]
public sealed class ResXFileRef
Inheritance
Object    ResXFileRef

Remarks

The ResXFileRef class is used to include references to files in an XML resource (.resx) file. A ResXFileRef object represents a link to an external resource in an XML resource (.resx) file. You can add a ResXFileRef object to a .resx file programmatically by one of the following options:

Comparison with System.Resources.ResXFileRef 

  Note

The compatibility with System.Resources.ResXFileRef is provided without any reference to System.Windows.Forms.dll, where that type is located.

Incompatibility with System.Resources.ResXFileRef:

New features and improvements compared to System.Resources.ResXFileRef:

  Security Note

The TypeConverter that is assigned to the ResXFileRef type may load assemblies when its ConvertFrom method is called. The recommended way to retrieve a file resource is via the ResXDataNode class. Its GetValueSafe methods guarantees that no assembly is loaded during the deserialization, including retrieving resources from file references.

Constructors

ResXFileRef Initializes a new instance of the ResXFileRef class that references the specified file.

Properties

FileName Gets the file name specified in the constructor.
TextFileEncoding Gets the encoding specified in the constructor.
TypeName Gets the type name specified in the constructor.

Methods

Parse Converts the string representation of a file reference to a ResXFileRef instance.
ToString Gets the text representation of the current ResXFileRef object.
(Overrides ObjectToString)
TryParse Converts the string representation of a file reference to a ResXFileRef instance. A return value indicates whether the conversion succeeded.

Extension Methods

Convert Converts an Object specified in the obj parameter to the desired targetType.
See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example.
(Defined by ObjectExtensions)
ConvertTTarget Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions)
In Gets whether item is among the elements of set.
See the Examples section of the generic InT(T, T) overload for an example.
(Defined by ObjectExtensions)
TryConvert Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvert Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvertTTarget Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvertTTarget Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)

See Also