-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* (#407) Fix NullReferenceException when description too long * (#408) Display description on 95 chars * (#407) Fix NullReferenceException when description too long * (#408) Display description on 95 chars * (#407) Fix NullReferenceException when description too long * (#408) Display description on 95 chars * (#404) Add logging... * (#408) Fix unit tests * (#428) Bump to version 2.5.1 * (#428) Update GitVersion.yml * (#415) Replace CentreMacro with CentreAlias * (maint) Move ScreenRuler * (maint) Move AppRestart facility * (#416) Set default windows position at first boot * (#416) Fix unit tests * (#403) Change error message when alias fails to start * (maint) Rider refactoring advices (#435) * (#423) Retrieve thumbnails is done a a separate thread (#437) * (maint) Refactoring (#438) * Issue/412 (#441) * (#412) Replace NLogger with Serilog * (maint) Bump version * (#412) Implements Microsoft.Extensions.Logging * (#421) Refactor TimeSpan with Humanizer (#443) * (#431) Fix autocompletion & syntax colouration (#442) * Issue/439 (#444) * (#439) Fix empty synonyms when wrongly written * (#439) Add Unit test * (#436) Refactore the KeywordViewModel into more Reactive (#446) * (#436) Refactor the KeywordViewModel into more Reactive * (maint) Refactor some unit tests * (#436) Fix InvalidOperationException when updating synonyms (#447) * Issue/445 (#448) * (#445) Add cache when querying user packages * (maint) IThumbnailRefresher is async * (#364) Show help to create macros (#449) * Issue/450 (#451) * (#450) Add logging and measure time * (#450) Optimise search (execution time) * (#450) Optimise alias counters * (maint) Fix unit tests * Issue/452 (#454) * (maint) Fix thumbnail manager * (#452) Rethrow exception when error in transaction * (maint) Log SQL on error * Issue/453 (#455) * (maint) Refactoring * (#453) Remove SQL query repetition * (maint) Adding logs in tests and refactoring * (#450) Remove useless inner joins from SQL * Isue/456 (#457) * (#456) Fix warning when executing empty Lua scripts * (#456) Unit test * Issue/458 (#459) * (maint) Change log level * (#458) Add more logging * Issue/458 (#462) * (#458) Add unit test * (#458) Fix delete of parameters when updating alias * (#456) Fix Lua scripting when code is null (#464) * (#456) Fix Lua scripting when code is null * (#456) Fix unit test * (#461) Catch error and add logs (#465) * Issue/466 (#468) * (maint) Refactoring * (#466) Add logging to catch slow process executions * Issue/467 (#469) * (maint) Refactoring * (#467) Fix XAML template * (#470) Execute powershell command with '-noprofile' (#472) * Issue/471 (#473) * (#471) Adding log information * (#471) Fix failure when Lua script returns 'nil' * (#471) Fix logging (#474) * (#476) Fix Lua script error (#477) * (#479) Remove keyword (#480) * (#482) Increase resilience for UiNotification (#483)
- Loading branch information
1 parent
8334a18
commit a145e10
Showing
188 changed files
with
3,211 additions
and
6,647 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using Lanceur.Core.Models; | ||
using Lanceur.SharedKernel.Mixins; | ||
|
||
namespace Lanceur.Core.BusinessLogic | ||
{ | ||
public static class AliasQueryResultMixin | ||
{ | ||
#region Methods | ||
|
||
public static bool IsUwp(this AliasQueryResult alias) => alias.FileName.IsUwp(); | ||
|
||
/// <summary> | ||
/// Clears all the useless spaces and comas | ||
/// </summary> | ||
/// <param name="alias">The <see cref="AliasQueryResult"/> to sanitize</param> | ||
public static void SanitizeSynonyms(this AliasQueryResult alias) | ||
{ | ||
var items = string.Join(',', | ||
alias.Synonyms | ||
.Replace(' ', ',') | ||
.Split(',', StringSplitOptions.RemoveEmptyEntries) | ||
); | ||
alias.Synonyms = items; | ||
} | ||
|
||
public static IEnumerable<AliasQueryResult> CloneFromSynonyms(this AliasQueryResult alias) | ||
{ | ||
var names = alias.Synonyms.SplitCsv(); | ||
var errors = new List<Exception>(); | ||
var results = new List<AliasQueryResult>(); | ||
|
||
foreach (var name in names) | ||
{ | ||
try | ||
{ | ||
var toAdd = alias.CloneObject(); | ||
toAdd.Name = name; | ||
results.Add(toAdd); | ||
} | ||
catch (Exception ex) | ||
{ | ||
errors.Add(ex); | ||
} | ||
} | ||
|
||
if (errors.Any()) throw new AggregateException($"Errors occured while updating synonyms of alias with these synonyms: {alias.Synonyms}", errors); | ||
|
||
return results.ToList(); | ||
} | ||
|
||
#endregion Methods | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.