code_style: run dotnet format

This commit is contained in:
leo 2024-08-18 23:14:44 +08:00
parent 7fe1df20cc
commit 84b8735d6c
No known key found for this signature in database
11 changed files with 23 additions and 26 deletions

View file

@ -17,13 +17,13 @@ namespace SourceGit.Models
return _instance;
}
}
public class Job
{
public Commands.Fetch Cmd = null;
public DateTime NextRunTimepoint = DateTime.MinValue;
}
public bool IsEnabled
{
get;
@ -36,7 +36,7 @@ namespace SourceGit.Models
set
{
_interval = Math.Max(1, value);
lock (_lock)
{
foreach (var job in _jobs)
@ -81,7 +81,7 @@ namespace SourceGit.Models
Thread.Sleep(2000);
}
// ReSharper disable once FunctionNeverReturns
});
}

View file

@ -32,9 +32,9 @@ namespace SourceGit.Models
return _instance;
}
}
private static AvatarManager _instance = null;
[GeneratedRegex(@"^(?:(\d+)\+)?(.+?)@users\.noreply\.github\.com$")]
private static partial Regex REG_GITHUB_USER_EMAIL();
@ -43,7 +43,7 @@ namespace SourceGit.Models
private List<IAvatarHost> _avatars = new List<IAvatarHost>();
private Dictionary<string, Bitmap> _resources = new Dictionary<string, Bitmap>();
private HashSet<string> _requesting = new HashSet<string>();
public void Start()
{
_storePath = Path.Combine(Native.OS.DataDir, "avatars");
@ -121,7 +121,7 @@ namespace SourceGit.Models
NotifyResourceChanged(email);
});
}
// ReSharper disable once FunctionNeverReturns
});
}

View file

@ -82,7 +82,7 @@ namespace SourceGit.Models
public class ExternalToolPaths
{
[JsonPropertyName("tools")]
public Dictionary<string, string> Tools { get; set; } = new Dictionary<string, string>();
public Dictionary<string, string> Tools { get; set; } = new Dictionary<string, string>();
}
public class ExternalToolsFinder

View file

@ -41,7 +41,7 @@ namespace SourceGit.Models
}
}
}
public IRawTheme GetTheme(string scopeName)
{
return _backend.GetTheme(scopeName);
@ -74,7 +74,7 @@ namespace SourceGit.Models
var grammar = _extraGrammars.Find(x => x.GetScopeName().EndsWith(extension, StringComparison.OrdinalIgnoreCase));
if (grammar != null)
return grammar.GetScopeName();
if (extension == ".h")
extension = ".cpp";
else if (extension == ".resx" || extension == ".plist" || extension == ".manifest")
@ -88,7 +88,7 @@ namespace SourceGit.Models
private readonly RegistryOptions _backend;
private readonly List<IRawGrammar> _extraGrammars;
}
public static class TextMateHelper
{
public static TextMate.Installation CreateForEditor(TextEditor editor)