mirror of
https://github.com/ppy/osu
synced 2025-01-04 13:22:08 +00:00
Standardise using declaration
This commit is contained in:
parent
3419b8ffa8
commit
139072fa81
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
@ -108,8 +109,7 @@ namespace osu.Desktop.Windows
|
||||
try
|
||||
{
|
||||
using var classes = Registry.CurrentUser.OpenSubKey(SOFTWARE_CLASSES, true);
|
||||
if (classes == null)
|
||||
return;
|
||||
Debug.Assert(classes != null);
|
||||
|
||||
foreach (var association in file_associations)
|
||||
association.Uninstall(classes, PROGRAM_ID_PREFIX);
|
||||
@ -131,8 +131,7 @@ namespace osu.Desktop.Windows
|
||||
private static void updateAssociations()
|
||||
{
|
||||
using var classes = Registry.CurrentUser.OpenSubKey(SOFTWARE_CLASSES, true);
|
||||
if (classes == null)
|
||||
return;
|
||||
Debug.Assert(classes != null);
|
||||
|
||||
foreach (var association in file_associations)
|
||||
association.Install(classes, EXE_PATH);
|
||||
@ -144,8 +143,7 @@ namespace osu.Desktop.Windows
|
||||
private static void updateDescriptions(LocalisationManager? localisation)
|
||||
{
|
||||
using var classes = Registry.CurrentUser.OpenSubKey(SOFTWARE_CLASSES, true);
|
||||
if (classes == null)
|
||||
return;
|
||||
Debug.Assert(classes != null);
|
||||
|
||||
foreach (var association in file_associations)
|
||||
association.UpdateDescription(classes, PROGRAM_ID_PREFIX, getLocalisedString(association.Description));
|
||||
|
Loading…
Reference in New Issue
Block a user