I want to preserve the DI abstraction layer Kephas provides, but in my particular case I need to register a service which is imported from a third-party library. Given this, I cannot annotate the service with the [AppServiceContract] attribute required for service registration. Is there a way to achieve this?
How can I register services in Kephas using a fluent API?
19 Views Asked by Auguste Leroi At
1
There are 1 best solutions below
Related Questions in DEPENDENCY-INJECTION
- How to add logging to an abstract class in php
- Nest.js can't resolve dependencies of the external library's Reflector dependency
- Do we need IoC containers in typescript if ts-mock-imports exists
- Blazor/Razor resolve components using dependency injection
- Access Registed Scoped Services and Transient Services using GetService()
- using state data class alongside ComposeDestinations
- Messing up with conflict between spring jcl and commons-logging.jar
- How to write pytest tests for a FastAPI route involving dependency injection with Pydantic models using Annotated and Depends?
- .NET Core Include Method in Dependency Injection
- Injecting IHubContext into my background service for SignalR in .NET 5
- Issue with service method call in .NET Background Service , Issue with Scope
- How can I inject the prisma io module using inversify in my node.js project?
- Angular service injection hierarchy
- Trouble with "dotnet run seeddata" when trying to seed a database with EntityFrameworkCore. Specifically with ASP.NET Core 6 Web API
- NX Angular unit tests fail because of NullInjectorError
Related Questions in KEPHAS
- I have to integrate ServiceStack together with Kephas. How do I make them both play together with Dependency Injection?
- How does Kephas integrate with ASP.NET Core?
- Cannot use constructors in open generic services with Kephas
- What is PreserveThreadContext() when calling async functions in Kephas?
- How is the DI relative to constructor and/or property injection solved in Kephas?
- Is Kephas.Data some kind of ORM?
- What is the difference between AmbientServices and CompositionContext in Kephas?
- The Kephas.Model package seems a bit heavy weight for my requirements of extensible metadata. Is there a lighter alternative?
- How can I register services in Kephas using a fluent API?
- Is there a possibility to specify a service metadata attribute to be applied to all services in Kephas?
- Is there a possibility to control the Expando class to not allow adding properties/members under certain conditions?
- How can I integrate my current logging infrastructure with Kephas?
- Am I forced into using the attributed service registration in Kephas?
- Kephas has its own dependecy injection container. Why another framework, why not use an existing one?
- How to provide a different strategy for loading application assemblies in Kephas bootstrapper
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Yes there is. Here are the steps to follow:
IConventionsRegistrar.Sample code:
There is a second way of registering services, however by the means of service descriptors instead of a fluent API. For this case, follow the steps:
IAppServiceInfoProvider.Sample code with the same registrations as above:
Both cases are autodiscovered and, at the proper time, the registration methods are called. However, in the second case, the advantage is that the registrations are available as service metadata for querying at a later time.