forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PipelineComponentScanner.cs
101 lines (87 loc) · 4.72 KB
/
PipelineComponentScanner.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// 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 System;
using System.Collections.Generic;
namespace Microsoft.Xna.Framework.Content.Pipeline
{
/// <summary>
/// Implements a scanner object containing the available importers and processors for an application. Designed for internal use only.
/// </summary>
public sealed class PipelineComponentScanner
{
List<string> errors = new List<string>();
Dictionary<string, ContentImporterAttribute> importerAttributes = new Dictionary<string, ContentImporterAttribute>();
Dictionary<string, ContentProcessorAttribute> processorAttributes = new Dictionary<string, ContentProcessorAttribute>();
Dictionary<string, string> importerOutputTypes = new Dictionary<string, string>();
Dictionary<string, string> processorInputTypes = new Dictionary<string, string>();
Dictionary<string, string> processorOutputTypes = new Dictionary<string, string>();
Dictionary<string, ProcessorParameterCollection> processorParameters = new Dictionary<string, ProcessorParameterCollection>();
/// <summary>
/// Gets the list of error messages produced by the last call to Update.
/// </summary>
public IList<string> Errors { get { return errors; } }
/// <summary>
/// Gets a dictionary that maps importer names to their associated metadata attributes.
/// </summary>
public IDictionary<string, ContentImporterAttribute> ImporterAttributes { get { return importerAttributes; } }
/// <summary>
/// Gets the names of all available importers.
/// </summary>
public IEnumerable<string> ImporterNames { get { return importerAttributes.Keys; } }
/// <summary>
/// Gets a dictionary that maps importer names to the fully qualified name of their return types.
/// </summary>
public IDictionary<string, string> ImporterOutputTypes { get { return importerOutputTypes; } }
/// <summary>
/// Gets a dictionary that maps processor names to their associated metadata attributes.
/// </summary>
public IDictionary<string, ContentProcessorAttribute> ProcessorAttributes { get { return processorAttributes; } }
/// <summary>
/// Gets a dictionary that maps processor names to the fully qualified name of supported input types.
/// </summary>
public IDictionary<string, string> ProcessorInputTypes { get { return processorInputTypes; } }
/// <summary>
/// Gets the names of all available processors.
/// </summary>
public IEnumerable<string> ProcessorNames { get { return processorAttributes.Keys; } }
/// <summary>
/// Gets a dictionary that maps processor names to the fully qualified name of their output types.
/// </summary>
public IDictionary<string, string> ProcessorOutputTypes { get { return processorOutputTypes; } }
/// <summary>
/// A collection of supported processor parameters.
/// </summary>
public IDictionary<string, ProcessorParameterCollection> ProcessorParameters { get { return processorParameters; } }
/// <summary>
/// Initializes a new instance of PipelineComponentScanner.
/// </summary>
public PipelineComponentScanner()
{
}
/// <summary>
/// Updates the scanner object with the latest available assembly states.
/// </summary>
/// <param name="pipelineAssemblies">Enumerated list of available assemblies.</param>
/// <returns>true if an actual scan was required, indicating the collection contents may have changed. false if no assembly changes were detected since the previous call.</returns>
public bool Update(
IEnumerable<string> pipelineAssemblies
)
{
return Update(pipelineAssemblies, null);
}
/// <summary>
/// Updates the scanner object with the latest available assembly states.
/// </summary>
/// <param name="pipelineAssemblies">Enumerated list of available assemblies.</param>
/// <param name="pipelineAssemblyDependencies">Enumerated list of dependent assemblies.</param>
/// <returns>true if an actual scan was required, indicating the collection contents may have changed. false if no assembly changes were detected since the previous call.</returns>
public bool Update(
IEnumerable<string> pipelineAssemblies,
IEnumerable<string> pipelineAssemblyDependencies
)
{
throw new NotImplementedException();
}
}
}