Improve Catalogs and Managers Inheritance#107
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes to the catalog manager abstractions and their implementations, primarily to clarify responsibilities between read-only and mutable operations and to align interface inheritance with intended usage. The changes also update dependency injection registrations and method signatures to support cancellation tokens and improve consistency.
Abstraction and Interface Refactoring:
INamedCatalogManager<T>,ISourceCatalogManager<T>, andINamedSourceCatalogManager<T>interfaces now inherit fromIReadCatalogManager<T>instead ofICatalogManager<T>, and have been expanded with explicit CRUD and validation methods, each supporting cancellation tokens. [1] [2] [3]ISearchIndexProfileManagernow inherits fromINamedCatalogManager<SearchIndexProfile>instead ofICatalogManager<SearchIndexProfile>, and its methods have been updated to support cancellation tokens.ISearchIndexProfileStore'sGetByTypeAsyncmethod now accepts a cancellation token.Implementation and Dependency Injection Updates:
SearchIndexProfileManagernow derives fromNamedCatalogManager<SearchIndexProfile>, and its methods are updated for cancellation token support and to delegate name-based lookups to the base class. [1] [2]ICatalogManager<SearchIndexProfile>is replaced byINamedCatalogManager<SearchIndexProfile>to match the new interface hierarchy.Codebase Consistency and Usage:
ICatalog<AIDataSource>in the AI data source handlers are replaced withIAIDataSourceStorefor improved clarity and alignment with the new abstractions. [1] [2] [3]FindByNameAsyncandGetByTypeAsyncmethods across interfaces and implementations consistently support cancellation tokens. [1] [2]These changes collectively improve the clarity, flexibility, and testability of the catalog management infrastructure by separating read and write responsibilities, standardizing async operations, and ensuring all relevant methods support cancellation.