Skip to content

Commit de74534

Browse files
committed
docs: update reambe with Installation section
1 parent 721b47d commit de74534

File tree

1 file changed

+30
-107
lines changed

1 file changed

+30
-107
lines changed

README.md

Lines changed: 30 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 🎯 Atc Source Generators
22

3-
A collection of Roslyn C# source generators for .NET that eliminate boilerplate code and improve developer productivity.
3+
A collection of Roslyn C# source generators for .NET that eliminate boilerplate code and improve developer productivity. All generators are designed with **Native AOT compatibility** in focus, enabling faster startup times, smaller deployment sizes, and optimal performance for modern cloud-native applications.
44

55
## 🚀 Source Generators
66

@@ -9,6 +9,34 @@ A collection of Roslyn C# source generators for .NET that eliminate boilerplate
99
- **[🗺️ MappingGenerator](#️-mappinggenerator)** - Automatic object-to-object mapping with type safety
1010
- **[🔄 EnumMappingGenerator](#-enummappinggenerator)** - Automatic enum-to-enum mapping with intelligent matching
1111

12+
## 📦 Installation
13+
14+
All generators are distributed in a single NuGet package. Install once to use all features.
15+
16+
**Required:**
17+
```bash
18+
dotnet add package Atc.SourceGenerators
19+
```
20+
21+
**Optional (recommended for better IntelliSense):**
22+
```bash
23+
dotnet add package Atc.SourceGenerators.Annotations
24+
```
25+
26+
Or in your `.csproj`:
27+
28+
```xml
29+
<ItemGroup>
30+
<!-- Required: Source generator -->
31+
<PackageReference Include="Atc.SourceGenerators" Version="1.0.0" />
32+
33+
<!-- Optional: Attribute definitions with XML documentation -->
34+
<PackageReference Include="Atc.SourceGenerators.Annotations" Version="1.0.0" />
35+
</ItemGroup>
36+
```
37+
38+
**Note:** The generator emits fallback attributes automatically, so the Annotations package is optional. However, it provides better XML documentation and IntelliSense. If you include it, suppress the expected CS0436 warning: `<NoWarn>$(NoWarn);CS0436</NoWarn>`
39+
1240
---
1341

1442
### ⚡ DependencyRegistrationGenerator
@@ -93,34 +121,6 @@ public class EmailService : IEmailService, INotificationService { }
93121
public class ReportService : IReportService { }
94122
```
95123

96-
#### 📦 Installation
97-
98-
**Required:**
99-
```bash
100-
dotnet add package Atc.SourceGenerators
101-
```
102-
103-
**Optional (recommended for better IntelliSense):**
104-
```bash
105-
dotnet add package Atc.SourceGenerators.Annotations
106-
```
107-
108-
Or in your `.csproj`:
109-
110-
```xml
111-
<ItemGroup>
112-
<!-- Required: Source generator -->
113-
<PackageReference Include="Atc.SourceGenerators" Version="1.0.0" />
114-
115-
<!-- Optional: Attribute definitions with XML documentation -->
116-
<PackageReference Include="Atc.SourceGenerators.Annotations" Version="1.0.0" />
117-
</ItemGroup>
118-
```
119-
120-
**Note:** The generator emits fallback attributes automatically, so the Annotations package is optional. However, it provides better XML documentation and IntelliSense. If you include it, suppress the expected CS0436 warning: `<NoWarn>$(NoWarn);CS0436</NoWarn>`
121-
122-
See the [complete guide](docs/generators/DependencyRegistration.md) for multi-project setups.
123-
124124
#### 🔧 Service Lifetimes
125125

126126
```csharp
@@ -277,32 +277,6 @@ public class MyService
277277
}
278278
```
279279

280-
#### 📦 Installation
281-
282-
**Required:**
283-
```bash
284-
dotnet add package Atc.SourceGenerators
285-
```
286-
287-
**Optional (recommended for better IntelliSense):**
288-
```bash
289-
dotnet add package Atc.SourceGenerators.Annotations
290-
```
291-
292-
Or in your `.csproj`:
293-
294-
```xml
295-
<ItemGroup>
296-
<!-- Required: Source generator -->
297-
<PackageReference Include="Atc.SourceGenerators" Version="1.0.0" />
298-
299-
<!-- Optional: Attribute definitions with XML documentation -->
300-
<PackageReference Include="Atc.SourceGenerators.Annotations" Version="1.0.0" />
301-
</ItemGroup>
302-
```
303-
304-
**Note:** The generator emits fallback attributes automatically, so the Annotations package is optional. However, it provides better XML documentation and IntelliSense. If you include it, suppress the expected CS0436 warning: `<NoWarn>$(NoWarn);CS0436</NoWarn>`
305-
306280
#### 🛡️ Compile-Time Safety
307281

308282
| ID | Description |
@@ -399,6 +373,7 @@ var dtos = users.Select(u => u.MapToUserDto()).ToList();
399373
- **🪆 Nested Object Mapping**: Automatically chains mappings for nested properties
400374
- **🔁 Multi-Layer Support**: Build Entity → Domain → DTO mapping chains effortlessly
401375
- **⚡ Zero Runtime Cost**: All code generated at compile time
376+
- **🚀 Native AOT Compatible**: No reflection or runtime code generation - fully trimming-safe
402377
- **🛡️ Type-Safe**: Compile-time validation catches mapping errors before runtime
403378
- **📦 Null Safety**: Built-in null checking for nullable reference types
404379
- **🎯 Convention-Based**: Maps properties by name - no configuration needed
@@ -460,32 +435,6 @@ var dto = person.MapToPersonDto();
460435
// ✨ Null safety built-in
461436
```
462437

463-
#### 📦 Installation
464-
465-
**Required:**
466-
```bash
467-
dotnet add package Atc.SourceGenerators
468-
```
469-
470-
**Optional (recommended for better IntelliSense):**
471-
```bash
472-
dotnet add package Atc.SourceGenerators.Annotations
473-
```
474-
475-
Or in your `.csproj`:
476-
477-
```xml
478-
<ItemGroup>
479-
<!-- Required: Source generator -->
480-
<PackageReference Include="Atc.SourceGenerators" Version="1.0.0" />
481-
482-
<!-- Optional: Attribute definitions with XML documentation -->
483-
<PackageReference Include="Atc.SourceGenerators.Annotations" Version="1.0.0" />
484-
</ItemGroup>
485-
```
486-
487-
**Note:** The generator emits fallback attributes automatically, so the Annotations package is optional. However, it provides better XML documentation and IntelliSense. If you include it, suppress the expected CS0436 warning: `<NoWarn>$(NoWarn);CS0436</NoWarn>`
488-
489438
#### 🔁 Multi-Layer Architecture
490439

491440
Perfect for 3-layer architectures:
@@ -659,32 +608,6 @@ var dto = entity.MapToStatusDto(); // StatusDto.Unknown
659608
var back = dto.MapToStatusEntity(); // StatusEntity.None (bidirectional!)
660609
```
661610

662-
#### 📦 Installation
663-
664-
**Required:**
665-
```bash
666-
dotnet add package Atc.SourceGenerators
667-
```
668-
669-
**Optional (recommended for better IntelliSense):**
670-
```bash
671-
dotnet add package Atc.SourceGenerators.Annotations
672-
```
673-
674-
Or in your `.csproj`:
675-
676-
```xml
677-
<ItemGroup>
678-
<!-- Required: Source generator -->
679-
<PackageReference Include="Atc.SourceGenerators" Version="1.0.0" />
680-
681-
<!-- Optional: Attribute definitions with XML documentation -->
682-
<PackageReference Include="Atc.SourceGenerators.Annotations" Version="1.0.0" />
683-
</ItemGroup>
684-
```
685-
686-
**Note:** The generator emits fallback attributes automatically, so the Annotations package is optional. However, it provides better XML documentation and IntelliSense. If you include it, suppress the expected CS0436 warning: `<NoWarn>$(NoWarn);CS0436</NoWarn>`
687-
688611
#### 🛡️ Compile-Time Safety
689612

690613
Get errors and warnings at compile time, not runtime:

0 commit comments

Comments
 (0)