Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dgmjr-io/InterfaceGenerator
A Rosyn-powered library to generate interfaces from extant classes
https://github.com/dgmjr-io/InterfaceGenerator
Last synced: about 2 months ago
JSON representation
A Rosyn-powered library to generate interfaces from extant classes
- Host: GitHub
- URL: https://github.com/dgmjr-io/InterfaceGenerator
- Owner: dgmjr-io
- Created: 2023-03-24T10:05:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-21T00:06:11.000Z (12 months ago)
- Last Synced: 2024-02-21T01:25:22.239Z (12 months ago)
- Language: C#
- Size: 394 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- RSCG_Examples - https://github.com/dgmjr-io/InterfaceGenerator - io/InterfaceGenerator (Contributors Welcome for those / 1. [ThisAssembly](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ThisAssembly) , in the [EnhancementProject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) category)
README
---
authors:
- dgmjr
title: README.md
lastmod: 2023-03-24-05:58:52
created: 2023-03-24-05:58:52
license: MIT
keywords:
- DGMJR-IO
tags:
- DGMJR-IO
categories:
- DGMJR-IO
---# Interface Generator
You can use this library to generate an interface from an extant class. Let's say you want to create an interface for the DbContext class. You can do that with the following code:
```csharp
[InterfaceGenerator(typeof(Microsoft.EntityFrameworkCore.DbContext))]
public partial interface IDbContext
{
}
```Make sure to mark the interface as `partial` or it won't work.