2019-09-03 02:30:58 +00:00
|
|
|
namespace PKHeX.Core
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Tuple containing data for a <see cref="Slot"/> and the originating <see cref="View"/>
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="T"></typeparam>
|
2019-10-04 02:09:02 +00:00
|
|
|
public sealed class SlotViewInfo<T>
|
2019-09-03 02:30:58 +00:00
|
|
|
{
|
|
|
|
public ISlotInfo Slot;
|
|
|
|
public ISlotViewer<T> View;
|
2019-09-04 02:54:41 +00:00
|
|
|
|
|
|
|
public PKM ReadCurrent() => Slot.Read(View.SAV);
|
|
|
|
public bool CanWriteTo() => Slot.CanWriteTo(View.SAV);
|
|
|
|
public WriteBlockedMessage CanWriteTo(PKM pkm) => Slot.CanWriteTo(View.SAV, pkm);
|
2019-09-03 02:30:58 +00:00
|
|
|
}
|
|
|
|
}
|