mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
code_style: run dotnet format
This commit is contained in:
parent
7fe1df20cc
commit
84b8735d6c
11 changed files with 23 additions and 26 deletions
|
@ -1,7 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SourceGit.Commands
|
||||
{
|
||||
|
|
|
@ -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
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -320,7 +320,7 @@ namespace SourceGit.ViewModels
|
|||
var window = new Views.Blame() { DataContext = new Blame(_repo.FullPath, change.Path, _commit.SHA) };
|
||||
window.Show();
|
||||
ev.Handled = true;
|
||||
};
|
||||
};
|
||||
|
||||
menu.Items.Add(history);
|
||||
menu.Items.Add(blame);
|
||||
|
@ -415,7 +415,7 @@ namespace SourceGit.ViewModels
|
|||
window.Show();
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
|
||||
var copyPath = new MenuItem();
|
||||
copyPath.Header = App.Text("CopyPath");
|
||||
copyPath.Icon = App.CreateMenuIcon("Icons.Copy");
|
||||
|
|
|
@ -279,7 +279,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
if (value is null || value < 1)
|
||||
return;
|
||||
|
||||
|
||||
if (Models.AutoFetchManager.Instance.Interval != value)
|
||||
{
|
||||
Models.AutoFetchManager.Instance.Interval = (int)value;
|
||||
|
|
|
@ -1312,7 +1312,7 @@ namespace SourceGit.ViewModels
|
|||
var succ = true;
|
||||
if (autoStage && _unstaged.Count > 0)
|
||||
succ = new Commands.Add(_repo.FullPath).Exec();
|
||||
|
||||
|
||||
if (succ)
|
||||
succ = new Commands.Commit(_repo.FullPath, _commitMessage, _useAmend).Exec();
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace SourceGit.Views
|
|||
{
|
||||
if (line.IsDisposed || line.FirstDocumentLine == null || line.FirstDocumentLine.IsDeleted)
|
||||
continue;
|
||||
|
||||
|
||||
var lineNumber = line.FirstDocumentLine.LineNumber;
|
||||
if (lineNumber > _editor.BlameData.LineInfos.Count)
|
||||
break;
|
||||
|
@ -156,7 +156,7 @@ namespace SourceGit.Views
|
|||
{
|
||||
if (line.IsDisposed || line.FirstDocumentLine == null || line.FirstDocumentLine.IsDeleted)
|
||||
continue;
|
||||
|
||||
|
||||
var lineNumber = line.FirstDocumentLine.LineNumber;
|
||||
if (lineNumber >= _editor.BlameData.LineInfos.Count)
|
||||
break;
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace SourceGit.Views
|
|||
if (links.Count > 1)
|
||||
{
|
||||
var menu = new ContextMenu();
|
||||
|
||||
|
||||
foreach (var link in links)
|
||||
{
|
||||
var url = $"{link.URLPrefix}{detail.Commit.SHA}";
|
||||
|
@ -69,7 +69,7 @@ namespace SourceGit.Views
|
|||
var url = $"{links[0].URLPrefix}{detail.Commit.SHA}";
|
||||
Native.OS.OpenBrowser(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace SourceGit.Views
|
|||
{
|
||||
if (line.IsDisposed || line.FirstDocumentLine == null || line.FirstDocumentLine.IsDeleted)
|
||||
continue;
|
||||
|
||||
|
||||
var index = line.FirstDocumentLine.LineNumber;
|
||||
if (index > lines.Count)
|
||||
break;
|
||||
|
@ -744,7 +744,7 @@ namespace SourceGit.Views
|
|||
{
|
||||
if (line.IsDisposed || line.FirstDocumentLine == null || line.FirstDocumentLine.IsDeleted)
|
||||
continue;
|
||||
|
||||
|
||||
var index = line.FirstDocumentLine.LineNumber;
|
||||
if (index > diff.Lines.Count)
|
||||
break;
|
||||
|
@ -926,7 +926,7 @@ namespace SourceGit.Views
|
|||
{
|
||||
if (line.IsDisposed || line.FirstDocumentLine == null || line.FirstDocumentLine.IsDeleted)
|
||||
continue;
|
||||
|
||||
|
||||
var index = line.FirstDocumentLine.LineNumber;
|
||||
if (index > lines.Count)
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue