mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Extract out DatItems namespace
This commit is contained in:
43
SabreTools.DatItems/Source.cs
Normal file
43
SabreTools.DatItems/Source.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
|
||||
namespace SabreTools.DatItems
|
||||
{
|
||||
/// <summary>
|
||||
/// Source information wrapper
|
||||
/// </summary>
|
||||
public class Source : ICloneable
|
||||
{
|
||||
/// <summary>
|
||||
/// Source index
|
||||
/// </summary>
|
||||
public int Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Source name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="id">Source ID, default 0</param>
|
||||
/// <param name="source">Source name, default null</param>
|
||||
public Source(int id = 0, string source = null)
|
||||
{
|
||||
Index = id;
|
||||
Name = source;
|
||||
}
|
||||
|
||||
#region Cloning
|
||||
|
||||
/// <summary>
|
||||
/// Clone the current object
|
||||
/// </summary>
|
||||
public object Clone()
|
||||
{
|
||||
return new Source(Index, Name);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user