Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codewriter-packages/requirefieldsinit-analyzer
C# 11 "Required Members" for Unity
https://github.com/codewriter-packages/requirefieldsinit-analyzer
c-charp compiler csharp ecs extension game-development roslyn-analyzer unity
Last synced: 3 months ago
JSON representation
C# 11 "Required Members" for Unity
- Host: GitHub
- URL: https://github.com/codewriter-packages/requirefieldsinit-analyzer
- Owner: codewriter-packages
- License: mit
- Created: 2023-04-01T18:57:05.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-24T14:53:01.000Z (over 1 year ago)
- Last Synced: 2023-10-24T15:42:26.790Z (over 1 year ago)
- Topics: c-charp, compiler, csharp, ecs, extension, game-development, roslyn-analyzer, unity
- Language: C#
- Homepage:
- Size: 27.3 KB
- Stars: 8
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# RequireFieldsInit Analyzer
## Usage
Mark the struct with the `[RequireFieldsInit]` attribute.
The compiler now requires you to initialize all fields
in the object's initializer![Usage](https://user-images.githubusercontent.com/26966368/229343387-22f6a248-543b-4944-a2a7-9b9344c0aba1.png)
![Usage](https://user-images.githubusercontent.com/26966368/229343423-b4f523e5-67d3-4c32-a383-9ff421c6c458.png)
![Usage](https://user-images.githubusercontent.com/26966368/229343462-6ab6e16b-ef0e-444a-bac8-7e50240bcf13.png)