Added Prism to example, Added ability to filter files and minor bugfixes
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
|
||||
@ -11,6 +12,7 @@ namespace KattekerCreator
|
||||
private string _programFile;
|
||||
private string _publishDir;
|
||||
private string _version;
|
||||
private string _filterAsString;
|
||||
|
||||
[DisplayName("Program")]
|
||||
[Description("Path to the program file")]
|
||||
@ -60,6 +62,14 @@ namespace KattekerCreator
|
||||
set => SetPropertyIfNotDefault(ref _version, value);
|
||||
}
|
||||
|
||||
[DisplayName("Filter")]
|
||||
[Description("Filter parameter. Use minimatch pattern.")]
|
||||
public string FilterAsString
|
||||
{
|
||||
get => _filterAsString;
|
||||
set => SetPropertyIfNotDefault(ref _filterAsString, value);
|
||||
}
|
||||
|
||||
private static bool SetPropertyIfNotDefault<T>(ref T field, T value)
|
||||
{
|
||||
if (Equals(value, field)) return false;
|
||||
@ -67,5 +77,7 @@ namespace KattekerCreator
|
||||
field = value;
|
||||
return true;
|
||||
}
|
||||
|
||||
public string[] Filter => string.IsNullOrWhiteSpace(FilterAsString) ? new string[0] : FilterAsString.Split(';');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user