-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper TPL usage and dependency injection for ConsoleReferenceClient (#…
…1281) * Adds proper TPL usage, decouples dependencies on Console and ClientBase, and uses string interpolation versus String.Format. * Renames private members to standard naming convention.
- Loading branch information
Showing
3 changed files
with
92 additions
and
81 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Quickstarts.ConsoleReferenceClient | ||
{ | ||
public interface IOutput | ||
{ | ||
void WriteLine(object obj); | ||
void WriteLine(string msg); | ||
void WriteLine(string msg, params object[] parameters); | ||
} | ||
|
||
public class ConsoleOutput : IOutput | ||
{ | ||
public void WriteLine(object obj) => Console.WriteLine(obj); | ||
public void WriteLine(string msg) => Console.WriteLine(msg); | ||
public void WriteLine(string msg, params object[] parameters) => Console.WriteLine(msg, parameters); | ||
} | ||
} |
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.