forked from nkast/MonoGame
-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
ImporterContext.cs
33 lines (27 loc) · 1.17 KB
/
ImporterContext.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
using Microsoft.Xna.Framework.Content.Pipeline;
namespace Microsoft.Xna.Framework.Content.Pipeline.Builder
{
internal class ImporterContext : ContentImporterContext
{
private readonly PipelineManager _manager;
ConsoleLogger _logger;
private readonly BuildEvent _buildEvent;
public ImporterContext(PipelineManager manager, ConsoleLogger logger, BuildEvent buildEvent)
{
_manager = manager;
_logger = logger;
_buildEvent = buildEvent;
}
public override string IntermediateDirectory { get { return _manager.IntermediateDirectory; } }
public override string OutputDirectory { get { return _manager.OutputDirectory; } }
public override ContentBuildLogger Logger { get { return _logger; } }
public override void AddDependency(string filename)
{
if (!_buildEvent.Dependencies.Contains(filename))
_buildEvent.Dependencies.Add(filename);
}
}
}