Class DiscoverSnapshotsUseCase
- Namespace
- ProjGraph.Lib.EntityFramework.Application.UseCases
- Assembly
- ProjGraph.Lib.EntityFramework.dll
Use case for discovering all ModelSnapshot classes within a C# file.
public class DiscoverSnapshotsUseCase
- Inheritance
-
DiscoverSnapshotsUseCase
- Inherited Members
Constructors
DiscoverSnapshotsUseCase(IEfModelAnalyzer, IFileSystem)
Use case for discovering all ModelSnapshot classes within a C# file.
public DiscoverSnapshotsUseCase(IEfModelAnalyzer modelAnalyzer, IFileSystem fileSystem)
Parameters
modelAnalyzerIEfModelAnalyzerThe EF model analyzer used for snapshot discovery.
fileSystemIFileSystemThe file system abstraction for reading source files.
Methods
ExecuteAsync(string)
Executes the discovery of all ModelSnapshot classes within a specified C# file.
public Task<List<string>> ExecuteAsync(string path)
Parameters
pathstringThe file path to the C# source file to analyze.
Returns
- Task<List<string>>
A task that represents the asynchronous operation. The task result contains a list of discovered ModelSnapshot class names.
Exceptions
- ArgumentException
Thrown when the provided file path is not a .cs file.