-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new environment check for expected pre-built-types
- Loading branch information
1 parent
192b4c9
commit 8f9b866
Showing
6 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/JasperFx.CodeGeneration.Commands/AllPreGeneratedTypesExist.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Oakton.Environment; | ||
|
||
namespace JasperFx.CodeGeneration.Commands; | ||
|
||
public class AllPreGeneratedTypesExist : IEnvironmentCheck | ||
{ | ||
public async Task Assert(IServiceProvider services, CancellationToken cancellation) | ||
{ | ||
var collections = services.GetServices<ICodeFileCollection>().ToArray(); | ||
foreach (var collection in collections) | ||
{ | ||
collection.AssertPreBuildTypesExist(services); | ||
} | ||
} | ||
|
||
public string Description { get; } = | ||
"Asserting that all expected pre-built generated types exist in the configured assembly"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ public enum CodeAction | |
preview, | ||
write, | ||
test, | ||
delete | ||
delete, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters