Class TempDirectory
An object that materializes a collection of embedded resources to a directory structure
For this to work properly, embedded resource files are all expected to have file extensions. This is because the internal manifest format uses dot as a separator character therefore it is impossible to programmatically determine whether the last dot in a resource name is a directory separator or a file extension. The assumption used here is that it is a file extension.
The compiler has a nasty trick when embedding folders into the resource manifest. These folders are effectively namespace names when committed to the assembly resource manifest and as such must confirm to .NET lexical structure rules for identifiers. All invalid characters as per this specification are replaced with underscore, and if the first character of the folder name is invalid, then an underscore is prefixed to the folder name.
Implements
Inherited Members
Namespace: Firefly.EmbeddedResourceLoader.Materialization
Assembly: Firefly.EmbeddedResourceLoader.dll
Syntax
public class TempDirectory : IDisposable
Constructors
| Improve this Doc View SourceTempDirectory()
Initializes a new instance of the TempDirectory class. It is up to the caller to dispose any TempDirectory instances to ensure clean-up of files created.
Convenience constructor allowing this class to be used for any temp directory requirements. Resource materialization is performed by an internal constructor.
Declaration
public TempDirectory()
Properties
| Improve this Doc View SourceFullPath
Gets the full path to the temporary directory.
Declaration
public string FullPath { get; }
Property Value
| Type | Description |
|---|---|
| String | The full path to the temporary directory. |
Methods
| Improve this Doc View SourceDispose()
Removes the temporary directory and all its content.
Declaration
public void Dispose()
Operators
| Improve this Doc View SourceImplicit(TempDirectory to String)
Performs an implicit conversion from TempDirectory to String.
Declaration
public static implicit operator string (TempDirectory self)
Parameters
| Type | Name | Description |
|---|---|---|
| TempDirectory | self | The TempDirectory object. |
Returns
| Type | Description |
|---|---|
| String | The fill path to the temp file. |