Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/feast107/CodeAnalysis
SourceGenerator for SourceGenerators
https://github.com/feast107/CodeAnalysis
codegenerator enhancement extension roslyn
Last synced: about 1 month ago
JSON representation
SourceGenerator for SourceGenerators
- Host: GitHub
- URL: https://github.com/feast107/CodeAnalysis
- Owner: feast107
- License: mit
- Created: 2023-10-21T15:46:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-04T03:33:08.000Z (about 1 month ago)
- Last Synced: 2024-11-04T03:45:42.363Z (about 1 month ago)
- Topics: codegenerator, enhancement, extension, roslyn
- Language: C#
- Homepage:
- Size: 275 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- RSCG_Examples - https://github.com/feast107/CodeAnalysis
README
# CodeAnalysis
自动生成提供给 `SourceGenerator` 的扩展## Requires
+ [PolySharp](https://github.com/Sergio0694/PolySharp)
## Supports
+ `[Literal]`
Auto generate full qualified string literal for target class
if you have a class like
```csharp
[Literal("Your.Program.Class")]
public class Test
{
public IEnumerable Name { get; set; }
}
```
Then it will generate a class like```csharp
namespace Your.Program{
public class Class{
public static string Text = """
public class Test
{
public global::System.Collection.Generic.IEnumerable Name { get; set; }
}
""";
}
}
```+ `Feast.CompileTime`
```csharp
class Assembly : System.Reflection.Assembly;
class Module : System.Reflection.Module;
class Type : System.Type;
class MemberInfo : System.Reflection.MemberInfo;
class MethodInfo : System.Reflection.MethodInfo;
class EventInfo : System.Reflection.EventInfo;
class FieldInfo : System.Reflection.FieldInfo;
class PropertyInfo : System.Reflection.PropertyInfo;
class ParameterInfo : System.Reflection.ParameterInfo;
class ConstructorInfo : System.Reflection.ConstructorInfo;
```## Comment
我们需要 `源代码生成器`
因为我们需要生成更多的代码
我们需要 `源代码生成器` 的 `源代码生成器`
因为 `源代码生成器` 现在还不够强大
我们需要 `源代码生成器` 的 `源代码生成器` 的 `源代码生成器`
因为 `源代码生成器` 的 `源代码生成器` 现在还不能自举
由此可见
道生一,一生二,二生三,三生万物
总结
玩源生玩的。