Add docstrings for exceptions to methods near TryGetApplicationsFromFile()
This commit is contained in:
parent
1a919e99b2
commit
93f4de7219
8 changed files with 50 additions and 0 deletions
|
@ -15,6 +15,12 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
public ServiceAccessControl ServiceAccessControl { get; private set; }
|
||||
public KernelAccessControl KernelAccessControl { get; private set; }
|
||||
|
||||
/// <exception cref="InvalidNpdmException">The stream doesn't contain valid ACI0 data.</exception>
|
||||
/// <exception cref="System.ArgumentException">The stream does not support reading, is <see langword="null"/>, or is already closed.</exception>
|
||||
/// <exception cref="EndOfStreamException">The end of the stream is reached.</exception>
|
||||
/// <exception cref="System.ObjectDisposedException">The stream is closed.</exception>
|
||||
/// <exception cref="IOException">An I/O error occurred.</exception>
|
||||
/// <exception cref="System.NotImplementedException">The FsAccessHeader.ContentOwnerId section is not implemented.</exception>
|
||||
public Aci0(Stream stream, int offset)
|
||||
{
|
||||
stream.Seek(offset, SeekOrigin.Begin);
|
||||
|
|
|
@ -19,6 +19,11 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
public ServiceAccessControl ServiceAccessControl { get; private set; }
|
||||
public KernelAccessControl KernelAccessControl { get; private set; }
|
||||
|
||||
/// <exception cref="InvalidNpdmException">The stream doesn't contain valid ACID data.</exception>
|
||||
/// <exception cref="System.ArgumentException">The stream does not support reading, is <see langword="null"/>, or is already closed.</exception>
|
||||
/// <exception cref="EndOfStreamException">The end of the stream is reached.</exception>
|
||||
/// <exception cref="System.ObjectDisposedException">The stream is closed.</exception>
|
||||
/// <exception cref="IOException">An I/O error occurred.</exception>
|
||||
public Acid(Stream stream, int offset)
|
||||
{
|
||||
stream.Seek(offset, SeekOrigin.Begin);
|
||||
|
|
|
@ -11,6 +11,10 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
public int Unknown3 { get; private set; }
|
||||
public int Unknown4 { get; private set; }
|
||||
|
||||
/// <exception cref="System.ArgumentException">The stream does not support reading, is <see langword="null"/>, or is already closed.</exception>
|
||||
/// <exception cref="EndOfStreamException">The end of the stream is reached.</exception>
|
||||
/// <exception cref="System.ObjectDisposedException">The stream is closed.</exception>
|
||||
/// <exception cref="IOException">An I/O error occurred.</exception>
|
||||
public FsAccessControl(Stream stream, int offset, int size)
|
||||
{
|
||||
stream.Seek(offset, SeekOrigin.Begin);
|
||||
|
|
|
@ -9,6 +9,12 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
public int Version { get; private set; }
|
||||
public ulong PermissionsBitmask { get; private set; }
|
||||
|
||||
/// <exception cref="InvalidNpdmException">The stream contains invalid data.</exception>
|
||||
/// <exception cref="NotImplementedException">The ContentOwnerId section is not implemented.s</exception>
|
||||
/// <exception cref="ArgumentException">The stream does not support reading, is <see langword="null"/>, or is already closed.</exception>
|
||||
/// <exception cref="EndOfStreamException">The end of the stream is reached.</exception>
|
||||
/// <exception cref="ObjectDisposedException">The stream is closed.</exception>
|
||||
/// <exception cref="IOException">An I/O error occurred.</exception>
|
||||
public FsAccessHeader(Stream stream, int offset, int size)
|
||||
{
|
||||
stream.Seek(offset, SeekOrigin.Begin);
|
||||
|
|
|
@ -6,6 +6,10 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
{
|
||||
public int[] Capabilities { get; private set; }
|
||||
|
||||
/// <exception cref="System.ArgumentException">The stream does not support reading, is <see langword="null"/>, or is already closed.</exception>
|
||||
/// <exception cref="EndOfStreamException">The end of the stream is reached.</exception>
|
||||
/// <exception cref="System.ObjectDisposedException">The stream is closed.</exception>
|
||||
/// <exception cref="IOException">An I/O error occurred.</exception>
|
||||
public KernelAccessControl(Stream stream, int offset, int size)
|
||||
{
|
||||
stream.Seek(offset, SeekOrigin.Begin);
|
||||
|
|
|
@ -24,6 +24,13 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
public Aci0 Aci0 { get; private set; }
|
||||
public Acid Acid { get; private set; }
|
||||
|
||||
/// <exception cref="InvalidNpdmException">The stream doesn't contain valid NPDM data.</exception>
|
||||
/// <exception cref="System.NotImplementedException">The FsAccessHeader.ContentOwnerId section is not implemented.</exception>
|
||||
/// <exception cref="System.ArgumentException">The stream does not support reading, is <see langword="null"/>, or is already closed.</exception>
|
||||
/// <exception cref="System.ArgumentException">An error occured while reading bytes from the stream.</exception>
|
||||
/// <exception cref="EndOfStreamException">The end of the stream is reached.</exception>
|
||||
/// <exception cref="System.ObjectDisposedException">The stream is closed.</exception>
|
||||
/// <exception cref="IOException">An I/O error occurred.</exception>
|
||||
public Npdm(Stream stream)
|
||||
{
|
||||
BinaryReader reader = new(stream);
|
||||
|
|
|
@ -9,6 +9,11 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
{
|
||||
public IReadOnlyDictionary<string, bool> Services { get; private set; }
|
||||
|
||||
/// <exception cref="System.ArgumentException">The stream does not support reading, is <see langword="null"/>, or is already closed.</exception>
|
||||
/// <exception cref="System.ArgumentException">An error occured while reading bytes from the stream.</exception>
|
||||
/// <exception cref="EndOfStreamException">The end of the stream is reached.</exception>
|
||||
/// <exception cref="System.ObjectDisposedException">The stream is closed.</exception>
|
||||
/// <exception cref="IOException">An I/O error occurred.</exception>
|
||||
public ServiceAccessControl(Stream stream, int offset, int size)
|
||||
{
|
||||
stream.Seek(offset, SeekOrigin.Begin);
|
||||
|
|
|
@ -72,6 +72,11 @@ namespace Ryujinx.UI.App.Common
|
|||
return resourceByteArray;
|
||||
}
|
||||
|
||||
/// <exception cref="Ryujinx.HLE.Exceptions.InvalidNpdmException">The npdm file doesn't contain valid data.</exception>
|
||||
/// <exception cref="NotImplementedException">The FsAccessHeader.ContentOwnerId section is not implemented.</exception>
|
||||
/// <exception cref="ArgumentException">An error occured while reading bytes from the stream.</exception>
|
||||
/// <exception cref="EndOfStreamException">The end of the stream is reached.</exception>
|
||||
/// <exception cref="IOException">An I/O error occurred.</exception>
|
||||
private ApplicationData GetApplicationFromExeFs(PartitionFileSystem pfs, string filePath)
|
||||
{
|
||||
ApplicationData data = new()
|
||||
|
@ -103,6 +108,13 @@ namespace Ryujinx.UI.App.Common
|
|||
}
|
||||
}
|
||||
|
||||
/// <exception cref="MissingKeyException">The configured key set is missing a key.</exception>
|
||||
/// <exception cref="HorizonResultException">An error occured while reading PFS data.</exception>
|
||||
/// <exception cref="Ryujinx.HLE.Exceptions.InvalidNpdmException">The npdm file doesn't contain valid data.</exception>
|
||||
/// <exception cref="NotImplementedException">The FsAccessHeader.ContentOwnerId section is not implemented.</exception>
|
||||
/// <exception cref="ArgumentException">An error occured while reading bytes from the stream.</exception>
|
||||
/// <exception cref="EndOfStreamException">The end of the stream is reached.</exception>
|
||||
/// <exception cref="IOException">An I/O error occurred.</exception>
|
||||
private ApplicationData GetApplicationFromNsp(PartitionFileSystem pfs, string filePath)
|
||||
{
|
||||
bool isExeFs = false;
|
||||
|
@ -417,6 +429,7 @@ namespace Ryujinx.UI.App.Common
|
|||
};
|
||||
|
||||
applications.Add(application);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue