mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Merge pull request #21 from Bletch1971/ServerMonitorChanges
Server monitor changes
This commit is contained in:
commit
bdd36bf235
25 changed files with 1825 additions and 329 deletions
|
|
@ -19,7 +19,6 @@ namespace ServerManagerTool.Common.Lib
|
|||
public ActionQueue(TaskScheduler scheduler = null)
|
||||
{
|
||||
this.workQueue = new ActionBlock<Action>(a => a.Invoke(), new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = 1, TaskScheduler = scheduler ?? TaskScheduler.Default });
|
||||
|
||||
}
|
||||
|
||||
public Task<T> PostAction<T>(Func<T> action)
|
||||
|
|
|
|||
|
|
@ -31,10 +31,7 @@ namespace ServerManagerTool.Common.Lib
|
|||
/// <param name="canExecute">The execution status logic.</param>
|
||||
public RelayCommand(Action<T> execute, Predicate<T> canExecute)
|
||||
{
|
||||
if (execute == null)
|
||||
throw new ArgumentNullException("execute");
|
||||
|
||||
_execute = execute;
|
||||
_execute = execute ?? throw new ArgumentNullException("execute");
|
||||
_canExecute = canExecute;
|
||||
}
|
||||
|
||||
|
|
@ -53,7 +50,7 @@ namespace ServerManagerTool.Common.Lib
|
|||
{
|
||||
try
|
||||
{
|
||||
return _canExecute == null ? true : _canExecute((T)parameter);
|
||||
return _canExecute == null || _canExecute((T)parameter);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup Label="Globals">
|
||||
<Configurations>Debug;Release;Debug - Beta</Configurations>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net462</TargetFramework>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue