mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-11-25 00:22:22 -05:00
misc: chore: Use explicit types in common project
This commit is contained in:
@@ -101,7 +101,7 @@ namespace Ryujinx.Common.Helper
|
||||
{
|
||||
RegistryKey key = Registry.CurrentUser.OpenSubKey(@$"Software\Classes\{ext}");
|
||||
|
||||
var openCmd = key?.OpenSubKey(@"shell\open\command");
|
||||
RegistryKey openCmd = key?.OpenSubKey(@"shell\open\command");
|
||||
|
||||
if (openCmd is null)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ namespace Ryujinx.Common.Helper
|
||||
}
|
||||
else
|
||||
{
|
||||
using var key = Registry.CurrentUser.CreateSubKey(keyString);
|
||||
using RegistryKey key = Registry.CurrentUser.CreateSubKey(keyString);
|
||||
|
||||
if (key is null)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ namespace Ryujinx.Common.Helper
|
||||
}
|
||||
|
||||
Logger.Debug?.Print(LogClass.Application, $"Adding type association {ext}");
|
||||
using var openCmd = key.CreateSubKey(@"shell\open\command");
|
||||
using RegistryKey openCmd = key.CreateSubKey(@"shell\open\command");
|
||||
openCmd.SetValue(string.Empty, $"\"{Environment.ProcessPath}\" \"%1\"");
|
||||
Logger.Debug?.Print(LogClass.Application, $"Added type association {ext}");
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Ryujinx.Common.Helper
|
||||
return null;
|
||||
}
|
||||
|
||||
foreach (var searchPath in pathVar.Split(":", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries))
|
||||
foreach (string searchPath in pathVar.Split(":", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries))
|
||||
{
|
||||
string binaryPath = Path.Combine(searchPath, binary);
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Ryujinx.Common.Helper
|
||||
{
|
||||
ObjectiveC.NSString nsStringPath = new(path);
|
||||
ObjectiveC.Object nsUrl = new("NSURL");
|
||||
var urlPtr = nsUrl.GetFromMessage("fileURLWithPath:", nsStringPath);
|
||||
ObjectiveC.Object urlPtr = nsUrl.GetFromMessage("fileURLWithPath:", nsStringPath);
|
||||
|
||||
ObjectiveC.Object nsArray = new("NSArray");
|
||||
ObjectiveC.Object urlArray = nsArray.GetFromMessage("arrayWithObject:", urlPtr);
|
||||
@@ -99,7 +99,7 @@ namespace Ryujinx.Common.Helper
|
||||
{
|
||||
ObjectiveC.NSString nsStringPath = new(url);
|
||||
ObjectiveC.Object nsUrl = new("NSURL");
|
||||
var urlPtr = nsUrl.GetFromMessage("URLWithString:", nsStringPath);
|
||||
ObjectiveC.Object urlPtr = nsUrl.GetFromMessage("URLWithString:", nsStringPath);
|
||||
|
||||
ObjectiveC.Object nsWorkspace = new("NSWorkspace");
|
||||
ObjectiveC.Object sharedWorkspace = nsWorkspace.GetFromMessage("sharedWorkspace");
|
||||
|
||||
Reference in New Issue
Block a user