added success indicator when processing trades
This commit is contained in:
parent
4dd3ac1ae1
commit
18af4d3714
1 changed files with 8 additions and 5 deletions
13
Program.cs
13
Program.cs
|
@ -439,22 +439,25 @@ public static class Program
|
||||||
Console.WriteLine("Processing...");
|
Console.WriteLine("Processing...");
|
||||||
for (var t = 0; t < trades.Length; t++)
|
for (var t = 0; t < trades.Length; t++)
|
||||||
{
|
{
|
||||||
|
bool success = false;
|
||||||
switch (tradeActions[t])
|
switch (tradeActions[t])
|
||||||
{
|
{
|
||||||
case TradeAction.Accept:
|
case TradeAction.Accept:
|
||||||
if (Verbose) Console.WriteLine($"Accepting {trades[t].Description}...");
|
if (Verbose) Console.Write($"Accepting {trades[t].Description}...");
|
||||||
account.AcceptConfirmation(trades[t]);
|
success = account.AcceptConfirmation(trades[t]);
|
||||||
break;
|
break;
|
||||||
case TradeAction.Deny:
|
case TradeAction.Deny:
|
||||||
if (Verbose) Console.WriteLine($"Denying {trades[t].Description}...");
|
if (Verbose) Console.Write($"Denying {trades[t].Description}...");
|
||||||
account.AcceptConfirmation(trades[t]);
|
success = account.AcceptConfirmation(trades[t]);
|
||||||
break;
|
break;
|
||||||
case TradeAction.Ignore:
|
case TradeAction.Ignore:
|
||||||
if (Verbose) Console.WriteLine($"Ignoring {trades[t].Description}...");
|
if (Verbose) Console.Write($"Ignoring {trades[t].Description}...");
|
||||||
|
success = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
|
if (Verbose) Console.WriteLine(success);
|
||||||
}
|
}
|
||||||
Console.WriteLine("Done.");
|
Console.WriteLine("Done.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue