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

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>

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.

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.