diff options
| author | Marco Carvalho <marcolucio27@gmail.com> | 2023-09-07 09:10:58 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-07 14:10:58 +0200 |
| commit | 210f4754849bf147a584695c0cced9d14c905f8e (patch) | |
| tree | 345d861652453f7a225f9a9c19cbcd5e8072db17 /src/Ryujinx.HLE/HOS/Services | |
| parent | ddb64938968db5aa2a973604cf761f44c99d1c3d (diff) | |
Replacing 'Assembly.GetExecutingAssembly()' with 'Type.Assembly' (#5545)
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services')
| -rw-r--r-- | src/Ryujinx.HLE/HOS/Services/IpcService.cs | 4 | ||||
| -rw-r--r-- | src/Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/IpcService.cs b/src/Ryujinx.HLE/HOS/Services/IpcService.cs index eb9f6b2f..808f21c0 100644 --- a/src/Ryujinx.HLE/HOS/Services/IpcService.cs +++ b/src/Ryujinx.HLE/HOS/Services/IpcService.cs @@ -23,14 +23,14 @@ namespace Ryujinx.HLE.HOS.Services public IpcService(ServerBase server = null) { - CmifCommands = Assembly.GetExecutingAssembly().GetTypes() + CmifCommands = typeof(IpcService).Assembly.GetTypes() .Where(type => type == GetType()) .SelectMany(type => type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public)) .SelectMany(methodInfo => methodInfo.GetCustomAttributes(typeof(CommandCmifAttribute)) .Select(command => (((CommandCmifAttribute)command).Id, methodInfo))) .ToDictionary(command => command.Id, command => command.methodInfo); - TipcCommands = Assembly.GetExecutingAssembly().GetTypes() + TipcCommands = typeof(IpcService).Assembly.GetTypes() .Where(type => type == GetType()) .SelectMany(type => type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public)) .SelectMany(methodInfo => methodInfo.GetCustomAttributes(typeof(CommandTipcAttribute)) diff --git a/src/Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs b/src/Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs index 2d850220..9110d06d 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs @@ -28,7 +28,7 @@ namespace Ryujinx.HLE.HOS.Services.Sm static IUserInterface() { - _services = Assembly.GetExecutingAssembly().GetTypes() + _services = typeof(IUserInterface).Assembly.GetTypes() .SelectMany(type => type.GetCustomAttributes(typeof(ServiceAttribute), true) .Select(service => (((ServiceAttribute)service).Name, type))) .ToDictionary(service => service.Name, service => service.type); |
