Table of Contents

Class ContentFileCache

Namespace
MonoGame.Framework.Content.Pipeline.Builder
Assembly
MonoGame.Framework.Content.Pipeline.dll

Contains cached information about a single source content file.

public record ContentFileCache : IEquatable<ContentFileCache>
Inheritance
ContentFileCache
Implements
Inherited Members

Constructors

ContentFileCache()

public ContentFileCache()

ContentFileCache(ContentFileCache)

protected ContentFileCache(ContentFileCache original)

Parameters

original ContentFileCache

Properties

CompressContent

Indicates if the content was compressed.

public bool CompressContent { get; init; }

Property Value

bool

ContentRoot

The ContentRoot that was used for the building of the content file,

public string ContentRoot { get; init; }

Property Value

string

Dependencies

A dictionary of keys of dependency files that either the IContentImporter or IContentProcessor included and values of the last modified times for those files.

public Dictionary<string, DateTime> Dependencies { get; init; }

Property Value

Dictionary<string, DateTime>

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

GraphicsProfile

Indicates the GraphicsProfile that was used when the content was built.

public GraphicsProfile GraphicsProfile { get; init; }

Property Value

GraphicsProfile

Importer

An IContentImporter that was used for the building of the content file,

public IContentImporter? Importer { get; init; }

Property Value

IContentImporter

Outputs

A hashset of output files that the IContentProcessor included.

public HashSet<string> Outputs { get; init; }

Property Value

HashSet<string>

Processor

An IContentProcessor that was used for the building of the content file,

public IContentProcessor? Processor { get; init; }

Property Value

IContentProcessor

ShouldBuild

true if the content was built, false if the content was copied.

public bool ShouldBuild { get; init; }

Property Value

bool

Methods

AddDependency(ContentBuilder, string)

Adds the specified file as a dependency related to the current content file.

public void AddDependency(ContentBuilder builder, string dependencyPath)

Parameters

builder ContentBuilder

A ContentBuilder the added depedency is related to.

dependencyPath string

A relative or absolute path to the dependency file.

AddOutputFile(ContentBuilder, string)

Adds the specified file as an output file related to the current content file.

public void AddOutputFile(ContentBuilder builder, string outputPath)

Parameters

builder ContentBuilder

A ContentBuilder the output file is related to.

outputPath string

A relative or absolute path to the output file.

Equals(ContentFileCache?)

public virtual bool Equals(ContentFileCache? other)

Parameters

other ContentFileCache

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

RemoveDependency(ContentBuilder, string)

Removes the specified file as a dependency related to the current content file.

public void RemoveDependency(ContentBuilder builder, string dependencyPath)

Parameters

builder ContentBuilder

A ContentBuilder the added depedency is related to.

dependencyPath string

A relative or absolute path to the dependency file.

RemoveOutputFile(ContentBuilder, string)

Removes the specified file as an output related to the current content file.

public void RemoveOutputFile(ContentBuilder builder, string outputPath)

Parameters

builder ContentBuilder

A ContentBuilder the output file is related to.

outputPath string

A relative or absolute path to the output file.

ToString()

public override string ToString()

Returns

string

<Clone>$()

public virtual ContentFileCache <Clone>$()

Returns

ContentFileCache

Operators

operator ==(ContentFileCache?, ContentFileCache?)

public static bool operator ==(ContentFileCache? left, ContentFileCache? right)

Parameters

left ContentFileCache
right ContentFileCache

Returns

bool

operator !=(ContentFileCache?, ContentFileCache?)

public static bool operator !=(ContentFileCache? left, ContentFileCache? right)

Parameters

left ContentFileCache
right ContentFileCache

Returns

bool