(IResource): properties no longer backed up by private fields.

This commit is contained in:
morkt 2015-04-06 17:08:32 +04:00
parent 68038edf00
commit 87ec61587f

View File

@ -83,18 +83,10 @@ namespace GameRes
public abstract uint Signature { get; } public abstract uint Signature { get; }
/// <summary>Signatures peculiar to the resource (the one above is also included here).</summary> /// <summary>Signatures peculiar to the resource (the one above is also included here).</summary>
public IEnumerable<uint> Signatures public IEnumerable<uint> Signatures { get; protected set; }
{
get { return m_signatures; }
protected set { m_signatures = value; }
}
/// <summary>Filename extensions peculiar to the resource.</summary> /// <summary>Filename extensions peculiar to the resource.</summary>
public IEnumerable<string> Extensions public IEnumerable<string> Extensions { get; protected set; }
{
get { return m_extensions; }
protected set { m_extensions = value; }
}
/// <summary> /// <summary>
/// Create empty Entry that corresponds to implemented resource. /// Create empty Entry that corresponds to implemented resource.
@ -104,13 +96,10 @@ namespace GameRes
return new Entry { Type = this.Type }; return new Entry { Type = this.Type };
} }
private IEnumerable<string> m_extensions;
private IEnumerable<uint> m_signatures;
protected IResource () protected IResource ()
{ {
m_extensions = new string[] { Tag.ToLowerInvariant() }; Extensions = new string[] { Tag.ToLowerInvariant() };
m_signatures = new uint[] { Signature }; Signatures = new uint[] { this.Signature };
} }
} }