summaryrefslogtreecommitdiff
path: root/Plugins/MonoGame.Extended/source/MonoGame.Extended.Content.Pipeline/ContentImporterContextExtensions.cs
blob: 7f6381555c0c86195f053b0c749ae2d54cc64629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System.IO;
using Microsoft.Xna.Framework.Content.Pipeline;

namespace MonoGame.Extended.Content.Pipeline;

public static class ContentImporterContextExtensions
{
    public static string AddDependencyWithLogging(this ContentImporterContext context, string filePath, string source)
    {
        source = Path.Combine(Path.GetDirectoryName(filePath), source);
        ContentLogger.Log($"Adding dependency '{source}'");
        context.AddDependency(source);
        return source;
    }
}