Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Commit

Permalink
Add note about GitHub packages to README and Add example entry for .c…
Browse files Browse the repository at this point in the history
…sproj files.
  • Loading branch information
Abrynos committed Aug 9, 2021
1 parent fde757c commit 2145633
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<ItemGroup>
<PackageReference Include="Implement.Net" Version="*" />
</ItemGroup>
```

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`.
Expand Down Expand Up @@ -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`.

0 comments on commit 2145633

Please sign in to comment.