From eb4f38b676d102b00f7d1b7effa78e45ea8ee104 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 28 Mar 2024 20:02:18 +0800 Subject: [PATCH] code_style: move private member/functions (except static readonly members) after all public members --- src/SourceGit/Native/OS.cs | 4 ++-- src/SourceGit/Native/Windows.cs | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/SourceGit/Native/OS.cs b/src/SourceGit/Native/OS.cs index 62dc109f..285ec637 100644 --- a/src/SourceGit/Native/OS.cs +++ b/src/SourceGit/Native/OS.cs @@ -97,8 +97,6 @@ namespace SourceGit.Native }); } - private static readonly IBackend _backend; - public static void OpenInFleet(string repo) { if (string.IsNullOrEmpty(FleetExecutableFile)) @@ -115,5 +113,7 @@ namespace SourceGit.Native UseShellExecute = false, }); } + + private static readonly IBackend _backend; } } \ No newline at end of file diff --git a/src/SourceGit/Native/Windows.cs b/src/SourceGit/Native/Windows.cs index 7ae2971d..0027a032 100644 --- a/src/SourceGit/Native/Windows.cs +++ b/src/SourceGit/Native/Windows.cs @@ -189,7 +189,15 @@ namespace SourceGit.Native } } - private static void OpenFolderAndSelectFile(string folderPath) + public void OpenWithDefaultEditor(string file) + { + var info = new FileInfo(file); + var start = new ProcessStartInfo("cmd", $"/c start {info.FullName}"); + start.CreateNoWindow = true; + Process.Start(start); + } + + private void OpenFolderAndSelectFile(string folderPath) { var pidl = ILCreateFromPathW(folderPath); @@ -202,13 +210,5 @@ namespace SourceGit.Native ILFree(pidl); } } - - public void OpenWithDefaultEditor(string file) - { - var info = new FileInfo(file); - var start = new ProcessStartInfo("cmd", $"/c start {info.FullName}"); - start.CreateNoWindow = true; - Process.Start(start); - } } } \ No newline at end of file