Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions PackageReadme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# Usage
## ProxyInterfaceGenerator
This project uses Source Generation to generate an interface and a Proxy class for classes.
This makes it possible to wrap external classes which do not have an interface, in a Proxy class which makes it easier to Mock and use DI.

It supports:
- properties
- methods
- events
- implicit and explicit operators


### Info

**Given: an external existing class which does not implement an interface**
``` c#
Expand Down Expand Up @@ -60,9 +71,18 @@ public class PersonProxy : IPerson
}
```

## Use it
### Use it
``` c#
IPerson p = new PersonProxy(new Person());
p.Name = "test";
p.HelloWorld("stef");
```
```


### Sponsors

[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=StefH) and [Dapper Plus](https://dapper-plus.net/?utm_source=StefH) are major sponsors and proud to contribute to the development of **ProxyInterfaceSourceGenerator**.

[![Entity Framework Extensions](https://raw.githubusercontent.com/StefH/resources/main/sponsor/entity-framework-extensions-sponsor.png)](https://entityframework-extensions.net/bulk-insert?utm_source=StefH)

[![Dapper Plus](https://raw.githubusercontent.com/StefH/resources/main/sponsor/dapper-plus-sponsor.png)](https://dapper-plus.net/bulk-insert?utm_source=StefH)
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ProxyInterfaceGenerator
# ![icon](./resources/icon_32x32.png) ProxyInterfaceGenerator
This project uses Source Generation to generate an interface and a Proxy class for classes.
This makes it possible to wrap external classes which do not have an interface, in a Proxy class which makes it easier to Mock and use DI.

Expand All @@ -8,7 +8,7 @@ It supports:
- events
- implicit and explicit operators

## NuGet
## 📦 NuGet
[![NuGet Badge](https://img.shields.io/nuget/v/ProxyInterfaceGenerator)](https://www.nuget.org/packages/ProxyInterfaceGenerator)

## Usage
Expand Down Expand Up @@ -136,5 +136,14 @@ public partial interface IAddress
}
```

# References
## 📚 References
- https://route2roslyn.netlify.app/symbols-for-dummies/


## Sponsors

[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=StefH) and [Dapper Plus](https://dapper-plus.net/?utm_source=StefH) are major sponsors and proud to contribute to the development of **ProxyInterfaceSourceGenerator**.

[![Entity Framework Extensions](https://raw.githubusercontent.com/StefH/resources/main/sponsor/entity-framework-extensions-sponsor.png)](https://entityframework-extensions.net/bulk-insert?utm_source=StefH)

[![Dapper Plus](https://raw.githubusercontent.com/StefH/resources/main/sponsor/dapper-plus-sponsor.png)](https://dapper-plus.net/bulk-insert?utm_source=StefH)
Binary file added resources/icon_32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>0.9.0</Version>
<Version>0.9.0.1</Version>
<TargetFramework>netstandard2.0</TargetFramework>
<ProjectGuid>{12344228-91F4-4502-9595-39584E5ABB34}</ProjectGuid>
<LangVersion>latest</LangVersion>
Expand Down