Show / Hide Table of Contents

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.

Inheritance
Object
TempDirectory
Implements
IDisposable
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Firefly.EmbeddedResourceLoader.Materialization
Assembly: Firefly.EmbeddedResourceLoader.dll
Syntax
public class TempDirectory : IDisposable

Constructors

| Improve this Doc View Source

TempDirectory()

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 Source

FullPath

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 Source

Dispose()

Removes the temporary directory and all its content.

Declaration
public void Dispose()

Operators

| Improve this Doc View Source

Implicit(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.

Implements

System.IDisposable

See Also

IDisposable
Notes on using TempDirectory
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX