PKHeX/PKHeX.Core/Editing/Saves/Slots/SlotViewInfo.cs
Kurt 6d8ff992e2
Clean up / fix external drag in (#2383)
* stash

* Consolidate some logic
2019-09-03 19:54:41 -07:00

16 lines
No EOL
519 B
C#

namespace PKHeX.Core
{
/// <summary>
/// Tuple containing data for a <see cref="Slot"/> and the originating <see cref="View"/>
/// </summary>
/// <typeparam name="T"></typeparam>
public class SlotViewInfo<T>
{
public ISlotInfo Slot;
public ISlotViewer<T> View;
public PKM ReadCurrent() => Slot.Read(View.SAV);
public bool CanWriteTo() => Slot.CanWriteTo(View.SAV);
public WriteBlockedMessage CanWriteTo(PKM pkm) => Slot.CanWriteTo(View.SAV, pkm);
}
}