Skip to content

Commit

Permalink
Added build and run instructions to README
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremybytes committed Jan 17, 2019
1 parent 1fc8d50 commit cea6363
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PeopleViewer/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private void UnhandledException(object sender, DispatcherUnhandledExceptionEvent

private static void ComposeObjects()
{
var reader = new CSVReader();
var reader = new ServiceReader();
var delay = new TimeSpan(0, 0, 3);
var retryReader = new RetryReader(reader, delay);
var logger = new FileLogger();
Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
# di-decorators
Sample code to show how decorators can add functionality to existing interface implementations, including caching, retry, and exception logging. Decorators can also be "stacked" to run multiple functions with a single call to an interface member.
Sample C# code to show how decorators can add functionality to existing interface implementations, including caching, retry, and exception logging. Decorators can also be "stacked" to run multiple functions with a single call to an interface member.

Articles:
## About the Code
This application is C# with a combination of **.NET Framework 4.7**, **.NET Standard 2.0**, and **ASP.NET MVC Core 2.1**. It was built with Visual Studio 2017. Since this uses .NET Framework, it is Windows only (this is a desktop application using WPF for the UI).

## Running the Application
The application uses a web service with is included as one of the projects. The easiest way to run the application is to start the service in a separate command window and run/debug the application from Visual Studio.

To run the service:
1. Open a command-prompt (cmd or PowerShell)
2. Navigate to {source root}\People.Service\
3. Type "dotnet run"

The service is self-hosted and runs at http://localhost:9874/api/people

In Visual Studio, start the application (with or without debugging). With the service running, the desktop application should be able to retrieve data. See the first article (listed below) for more information on running the application, including screenshots.

## Articles
The following articles give an overview of the project and a detailed look at the decorators included.
* More DI: Async Interfaces, Decorators and .NET Standard
https://jeremybytes.blogspot.com/2019/01/more-di-async-interfaces-decorators-and.html
* More DI: Async Interfaces
Expand Down

0 comments on commit cea6363

Please sign in to comment.