diff options
Diffstat (limited to 'src/StardewModdingAPI/Framework/ContentManagerShim.cs')
-rw-r--r-- | src/StardewModdingAPI/Framework/ContentManagerShim.cs | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/StardewModdingAPI/Framework/ContentManagerShim.cs b/src/StardewModdingAPI/Framework/ContentManagerShim.cs deleted file mode 100644 index d46f23a3..00000000 --- a/src/StardewModdingAPI/Framework/ContentManagerShim.cs +++ /dev/null @@ -1,50 +0,0 @@ -using StardewValley; - -namespace StardewModdingAPI.Framework -{ - /// <summary>A minimal content manager which defers to SMAPI's main content manager.</summary> - internal class ContentManagerShim : LocalizedContentManager - { - /********* - ** Properties - *********/ - /// <summary>SMAPI's underlying content manager.</summary> - private readonly SContentManager ContentManager; - - - /********* - ** Accessors - *********/ - /// <summary>The content manager's name for logs (if any).</summary> - public string Name { get; } - - - /********* - ** Public methods - *********/ - /// <summary>Construct an instance.</summary> - /// <param name="contentManager">SMAPI's underlying content manager.</param> - /// <param name="name">The content manager's name for logs (if any).</param> - public ContentManagerShim(SContentManager contentManager, string name) - : base(contentManager.ServiceProvider, contentManager.RootDirectory, contentManager.CurrentCulture, contentManager.LanguageCodeOverride) - { - this.ContentManager = contentManager; - this.Name = name; - } - - /// <summary>Load an asset that has been processed by the content pipeline.</summary> - /// <typeparam name="T">The type of asset to load.</typeparam> - /// <param name="assetName">The asset path relative to the loader root directory, not including the <c>.xnb</c> extension.</param> - public override T Load<T>(string assetName) - { - return this.ContentManager.LoadFor<T>(assetName, this); - } - - /// <summary>Dispose held resources.</summary> - /// <param name="disposing">Whether the content manager is disposing (rather than finalising).</param> - protected override void Dispose(bool disposing) - { - this.ContentManager.DisposeFor(this); - } - } -} |