mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
code_style: using avalonia's editorconfig and run dotnet format
.
This commit is contained in:
parent
3c38f681bd
commit
d89a00e559
233 changed files with 1806 additions and 1254 deletions
|
@ -6,17 +6,18 @@ namespace SourceGit.Converters
|
|||
{
|
||||
public static class PathConverters
|
||||
{
|
||||
public static FuncValueConverter<string, string> PureFileName =
|
||||
public static readonly FuncValueConverter<string, string> PureFileName =
|
||||
new FuncValueConverter<string, string>(fullpath => Path.GetFileName(fullpath) ?? "");
|
||||
|
||||
public static FuncValueConverter<string, string> PureDirectoryName =
|
||||
public static readonly FuncValueConverter<string, string> PureDirectoryName =
|
||||
new FuncValueConverter<string, string>(fullpath => Path.GetDirectoryName(fullpath) ?? "");
|
||||
|
||||
public static FuncValueConverter<string, string> TruncateIfTooLong =
|
||||
public static readonly FuncValueConverter<string, string> TruncateIfTooLong =
|
||||
new FuncValueConverter<string, string>(fullpath =>
|
||||
{
|
||||
if (fullpath.Length <= 50) return fullpath;
|
||||
if (fullpath.Length <= 50)
|
||||
return fullpath;
|
||||
return fullpath.Substring(0, 20) + ".../" + Path.GetFileName(fullpath);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue