PKHeX/PKHeX.Core/Saves/Substructures/Battle Videos/BattleVideo.cs
Kurt fc754b346b
File scoped namespaces (#3529)
[Language Reference](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces)

Updates all the files, one less level of indentation.

Some small changes were made to API surfaces, renaming `PKM pkm` -> `PKM pk`, and `LegalityAnalysis.pkm` -> `LegalityAnalysis.Entity`
2022-06-18 11:04:24 -07:00

34 lines
836 B
C#

using System;
using System.Collections.Generic;
namespace PKHeX.Core;
public abstract class BattleVideo : IPokeGroup
{
public abstract IReadOnlyList<PKM> BattlePKMs { get; }
public abstract int Generation { get; }
public IEnumerable<PKM> Contents => BattlePKMs;
public static BattleVideo? GetVariantBattleVideo(byte[] data)
{
if (BV6.IsValid(data))
return new BV6(data);
if (BV7.IsValid(data))
return new BV7(data);
if (BV3.IsValid(data))
return new BV3(data);
return null;
}
public static bool IsValid(ReadOnlySpan<byte> data)
{
if (BV6.IsValid(data))
return true;
if (BV7.IsValid(data))
return true;
if (BV3.IsValid(data))
return true;
return false;
}
}