using System; namespace StardewModdingAPI.Framework.Content { /// An operation which provides the initial instance of an asset when it's requested from the content pipeline. internal class AssetLoadOperation { /********* ** Accessors *********/ /// The mod loading the asset. public IModMetadata Mod { get; } /// The content pack on whose behalf the asset is being loaded, if any. public IModMetadata OnBehalfOf { get; } /// Load the initial value for an asset. public Func GetData { get; } /********* ** Public methods *********/ /// Construct an instance. /// The mod applying the edit. /// The content pack on whose behalf the asset is being loaded, if any. /// Load the initial value for an asset. public AssetLoadOperation(IModMetadata mod, IModMetadata onBehalfOf, Func getData) { this.Mod = mod; this.OnBehalfOf = onBehalfOf; this.GetData = getData; } } }