Skip to content

Commit

Permalink
Removed code that is not needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
jopmiddelkamp committed Jul 6, 2020
1 parent 3b77e80 commit ae436c7
Showing 1 changed file with 0 additions and 54 deletions.
54 changes: 0 additions & 54 deletions GuardedActions/Commands/AsyncGuardedCommandBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ public abstract class AsyncGuardedCommandBuilder : IAsyncGuardedCommandBuilder
protected AsyncGuardedCommandBuilder()
{
ExceptionGuard = IoCRegistration.Instance.GetService<IExceptionGuard>();
//Messenger = ??
}

protected virtual bool ShouldNotifyAboutLongOperation { get; } = true;

// TODO: Find framework independent solution
//public IMvxMessenger Messenger { get; protected set; }
public IExceptionGuard ExceptionGuard { get; protected set; }

public IAsyncGuardedCommandBuilder EnqueueAfterCommandExecuted(Action taskToInvoke)
Expand Down Expand Up @@ -66,11 +63,6 @@ protected virtual async Task BuildCommandBody(IAsyncCommand command)
await ExceptionGuard.Guard(this,
async () =>
{
if (ShouldNotifyAboutLongOperation)
{
NotifyAboutLongOperationStarted();
}

CommandBeingExecuted = true;

while (InvokeBeforeCommandExecutedTaskQueue.Count > 0)
Expand All @@ -84,11 +76,6 @@ await ExceptionGuard.Guard(this,
},
async () =>
{
if (ShouldNotifyAboutLongOperation)
{
NotifyAboutLongOperationFinished();
}

CommandBeingExecuted = false;
command.RaiseCanExecuteChanged();
Finally();
Expand All @@ -101,18 +88,6 @@ await ExceptionGuard.Guard(this,
);
}

protected virtual void NotifyAboutLongOperationStarted()
{
// Find framework independent solution
//Messenger.Publish(LongRunningAsyncOperationMessage.Started(this));
}

protected virtual void NotifyAboutLongOperationFinished()
{
// TODO: Find framework independent solution
//Messenger.Publish(LongRunningAsyncOperationMessage.Finished(this));
}

protected virtual void Finally()
{
}
Expand All @@ -127,9 +102,6 @@ protected virtual bool CanExecute()
public virtual void Dispose()
{
ExceptionGuard = null;

// TODO: Find framework independent solution
//Messenger = null;
}
}

Expand All @@ -143,11 +115,9 @@ public abstract class AsyncGuardedCommandBuilder<TCommandParameter> : IAsyncGuar
protected AsyncGuardedCommandBuilder()
{
ExceptionGuard = IoCRegistration.Instance.GetService<IExceptionGuard>();
//Messenger = ??
}

protected virtual bool ShouldNotifyAboutLongOperation { get; } = true;
//public IMvxMessenger Messenger { get; protected set; }
public IExceptionGuard ExceptionGuard { get; protected set; }

public IAsyncGuardedCommandBuilder<TCommandParameter> EnqueueAfterCommandExecuted(Action taskToInvoke)
Expand Down Expand Up @@ -197,11 +167,6 @@ protected virtual async Task BuildCommandBody(IAsyncCommand<TCommandParameter> c
await ExceptionGuard.Guard(this,
async () =>
{
if (ShouldNotifyAboutLongOperation)
{
NotifyAboutLongOperationStarted();
}

CommandBeingExecuted = true;

while (InvokeBeforeCommandExecutedTaskQueue.Any())
Expand All @@ -215,11 +180,6 @@ await ExceptionGuard.Guard(this,
},
async () =>
{
if (ShouldNotifyAboutLongOperation)
{
NotifyAboutLongOperationFinished();
}

CommandBeingExecuted = false;
command.RaiseCanExecuteChanged();
Finally();
Expand All @@ -232,18 +192,6 @@ await ExceptionGuard.Guard(this,
);
}

protected virtual void NotifyAboutLongOperationStarted()
{
// TODO: Find framework independent solution
//Messenger.Publish(LongRunningAsyncOperationMessage.Started(this));
}

protected virtual void NotifyAboutLongOperationFinished()
{
// TODO: Find framework independent solution
//Messenger.Publish(LongRunningAsyncOperationMessage.Finished(this));
}

protected virtual void Finally()
{
}
Expand All @@ -258,8 +206,6 @@ protected virtual bool CanExecute(TCommandParameter item)
public virtual void Dispose()
{
ExceptionGuard = null;
// TODO: Find framework independent solution
//Messenger = null;
}
}
}

0 comments on commit ae436c7

Please sign in to comment.