Files
SabreTools/SabreTools.DatItems/Source.cs
Matt Nadareski b37aed389e Add nullable context to SabreTools.DatItems
This change also starts migrating the internals of the DatItem formats to the new internal models. Right now, it's basically just acting like a wrapper around those models.
2023-08-14 13:17:51 -04:00

44 lines
939 B
C#

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
}
}