mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-25 03:37:30 -05:00
Added XML comments where appropriate
This commit is contained in:
@@ -58,7 +58,14 @@ public static int getPKMDataFormat(byte[] data)
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
internal static PKM getPKMfromBytes(byte[] data, string ident = null)
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of <see cref="PKM"/> from the given data.
|
||||
/// </summary>
|
||||
/// <param name="data">Raw data of the Pokemon file.</param>
|
||||
/// <param name="ident">Optional identifier for the Pokemon. Usually the full path of the source file.</param>
|
||||
/// <returns>An instance of <see cref="PKM"/> created from the given <paramref name="data"/>, or null if <paramref name="data"/> is invalid.</returns>
|
||||
public static PKM getPKMfromBytes(byte[] data, string ident = null)
|
||||
{
|
||||
checkEncrypted(ref data);
|
||||
switch (getPKMDataFormat(data))
|
||||
|
||||
@@ -25,6 +25,11 @@ public static class PKX
|
||||
internal const int SIZE_6STORED = 0xE8;
|
||||
internal const int SIZE_6BLOCK = 56;
|
||||
|
||||
/// <summary>
|
||||
/// Determines if the given length is valid for a Pokemon file.
|
||||
/// </summary>
|
||||
/// <param name="len">Length of the data to check.</param>
|
||||
/// <returns>A boolean indicating whether or not the length is valid for a Pokemon file.</returns>
|
||||
public static bool getIsPKM(long len)
|
||||
{
|
||||
return new[] {SIZE_3STORED, SIZE_3PARTY, SIZE_4STORED, SIZE_4PARTY, SIZE_5PARTY, SIZE_6STORED, SIZE_6PARTY}.Contains((int)len);
|
||||
|
||||
Reference in New Issue
Block a user