forked from nkast/MonoGame
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
ContentIdentity.cs
70 lines (62 loc) · 2.91 KB
/
ContentIdentity.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
// 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;
namespace Microsoft.Xna.Framework.Content.Pipeline
{
/// <summary>
/// Provides properties describing the origin of the game asset, such as the original source file and creation tool. This information is used for error reporting, and by processors that need to determine from what directory the asset was originally loaded.
/// </summary>
[Serializable]
public class ContentIdentity
{
/// <summary>
/// Gets or sets the specific location of the content item within the larger source file.
/// </summary>
public string FragmentIdentifier { get; set; }
/// <summary>
/// Gets or sets the file name of the asset source.
/// </summary>
public string SourceFilename { get; set; }
/// <summary>
/// Gets or sets the creation tool of the asset.
/// </summary>
public string SourceTool { get; set; }
/// <summary>
/// Initializes a new instance of ContentIdentity.
/// </summary>
public ContentIdentity()
: this(string.Empty, string.Empty, null)
{
}
/// <summary>
/// Initializes a new instance of ContentIdentity with the specified values.
/// </summary>
/// <param name="sourceFilename">The absolute path to the file name of the asset source.</param>
public ContentIdentity(string sourceFilename)
: this(sourceFilename, string.Empty, null)
{
}
/// <summary>
/// Initializes a new instance of ContentIdentity with the specified values.
/// </summary>
/// <param name="sourceFilename">The absolute path to the file name of the asset source.</param>
/// <param name="sourceTool">The name of the digital content creation (DCC) tool that created the asset.</param>
public ContentIdentity(string sourceFilename, string sourceTool)
: this(sourceFilename, sourceTool, null)
{
}
/// <summary>
/// Initializes a new instance of ContentIdentity with the specified values.
/// </summary>
/// <param name="sourceFilename">The absolute path to the file name of the asset source.</param>
/// <param name="sourceTool">The name of the digital content creation (DCC) tool that created the asset.</param>
/// <param name="fragmentIdentifier">Specific location of the content item within the larger source file. For example, this could be a line number in the file.</param>
public ContentIdentity(string sourceFilename, string sourceTool, string fragmentIdentifier)
{
SourceFilename = sourceFilename;
SourceTool = sourceTool;
FragmentIdentifier = fragmentIdentifier;
}
}
}