-
Notifications
You must be signed in to change notification settings - Fork 365
/
Target.cs
58 lines (48 loc) · 1.91 KB
/
Target.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
// Copyright © Microsoft Corporation.
// This source file is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.
// Change History
// 12/26/2012 - EFW - Moved the classes into the Targets namespace
// 12/30/2012 - EFW - Cleaned up the code and marked the class as serializable
using System;
using System.Collections.Generic;
namespace Sandcastle.Tools.BuildComponents.Targets
{
/// <summary>
/// This is the base class for all other target types
/// </summary>
[Serializable]
public class Target
{
#region Properties
//=====================================================================
/// <summary>
/// This is used to get or set the target's member ID
/// </summary>
public string Id { get; set; }
/// <summary>
/// This is used to get or set the target's container
/// </summary>
public string Container { get; set; }
/// <summary>
/// This is used to get or set the target's reference topic filename
/// </summary>
public string File { get; set; }
#endregion
#region Methods
//=====================================================================
/// <summary>
/// Add the target to the given collection
/// </summary>
/// <param name="targets">The targets dictionary to which this target is added</param>
/// <remarks>This can be overridden to add dependent targets to the dictionary as well</remarks>
public virtual void Add(IDictionary<string, Target> targets)
{
if(targets == null)
throw new ArgumentNullException(nameof(targets));
targets[this.Id] = this;
}
#endregion
}
}