From 21456331e834dbfb52956a862b9f830d10dec5b4 Mon Sep 17 00:00:00 2001 From: Abrynos <6608231+Abrynos@users.noreply.github.com> Date: Mon, 9 Aug 2021 12:32:53 +0200 Subject: [PATCH] Add note about GitHub packages to README and Add example entry for .csproj files. --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4bbb528..e50ac47 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,22 @@ Make sure this is what you need. There is a very limited amount of actual use ca ### Step 1: Dependency -From the command line add the dependency to your project. Alternatively you can do this in your IDE as well. +From the command line add the dependency to your project: ```bash dotnet add package Implement.Net ``` +Alternatively you can edit your `.csproj` file directly. Just make sure you replace the `*` from the example below with the version you want to use: + +```xml + + + +``` + +In addition to the official NuGet registry we also push to [GitHub packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry). + ### Step 2: Handler implementation This is the single most important piece of code you are going to write if you use this library. Here you are going to handle any access to the methods/properties/events of the interface you generated an implementation for. Most likely you will either go by name or some implementations of `Attribute`. @@ -117,3 +127,9 @@ new TypeFactory.CreateType(typeof(IDisposable)); // This will fail - TypeFactory is not an interface new TypeFactory.CreateType(typeof(TypeFactory)); ``` + +## FAQ + +### What's the difference between this and the `dynamic` keyword? + +This allows for static typing. The "end user" can use a predefined interface instead of `dynamic`.