If I use Managed AddIn Framework (System.AddIn) and set it up to use separate AppDomains, can I use a centralized IoC container that is in the primary/default AppDomain? Can the IoC container resolve across the AppDomains?
Can IoC and the Managed AddIn Framework (System.AddIn) work together with isolated AppDomains?
656 views Asked by Daniel A. White At
1
There are 1 answers
Related Questions in .NET
- file download method in visual studio 2017
- Repository manager receives the wrong connection string in .net core
- MongoDb not connecting C#
- The current .NET SDK does not support targeting .NET Core 6.0. Brand new WPF Project VS Community 2022 17.9.5
- Why Scanning GSI on DynamoDb doesnt work as fast as expected when using CONTAINS?
- Are "blittable types" really unmanaged types for StructLayout Sequential
- Failed to fetch dynamically imported module on Blazor JS Interop
- Problem to upload several images per one request
- Implementing Azure AD B2C Authentication in .NET 8 Blazor Project (RenderMode: InteractiveAuto)
- Stripe connect payout - throws exceptions
- 'IOException: The cloud file provider is not running', when trying to delete 'cloud' folder
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Convert C# DateTime.Ticks to Bigquery DateTime Format
- Socket.io nodejs server .NET connection
- Producer Batching Service Bus Vs Kafka
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 ADD-IN
- Excel add-in saved on Dropbox - formula from add-in appearing with filepath
- VSTO Ms-Word addin -i need to show publisher name in Ms-Word addin section. I aready digtaly sign with digicert
- Regular refresh in Excel through C# add-in
- Microsoft Add Ins; Add-Ins allowed, installed, but show greyed out for some users
- Accept/Reject Tracked Changes in word document using office js api
- EA Addin - API EA_OnNotifyContextItemModified
- Cannot see custom functions in Excel right-click menu
- Set Microsoft Office Addin for excel taskpane width by default
- UDFs in Excel add-ins only work when I open the add-in first. How do I get Excel to link the add-in to the spread sheet naturally?
- How to open excel native taskbar/contextual menu from excel add-in taskpane?
- How to get or copy Office settings from another workbook?
- Azure Bot Message Extension auth is not responding
- Deployed Outlook add-in doesn't show up in old Outlook (365)
- Custom Add-In Won't Load
- Get word Document Name? Using Office JavaScript API
Related Questions in IOC-CONTAINER
- Do we need IoC containers in typescript if ts-mock-imports exists
- Laravel's Singleton issue (works in Tinker, not in the served app)
- Problem registering two instances of IEnumerable<Type>
- Unity IOC Container. How to resolve instance from IOC container outside of the scope where container was created?
- How to register dependencies in Castle Windsor that work the same as MEF's [Export]
- Question of lifycycle callbacks of beans in Spring
- Autofac assembly scanning with interfaces
- Autofac WhenInjectInto like Grace/Ninject
- IocLookupException: E_IOC_LOOKUP_FAILED: Cannot resolve "Adonis/Lucid/Database" namespace from the IoC Container
- WPF with Dependency Injection using Ioc
- When i use IoC container to control windows in WPF MVVM, Open Window workes, but Close Window doesn't work
- Resolve a service using Autofac
- Does getbean() method share the beans for different instances of the bean?
- Dependency Injection container for functional programming in Typescript and Express
- How to create and configure multiple instances of the same class with dependency injection?
Related Questions in MAF
- Multiple Cucumber report has been encoded to base64
- Mutation plot splitting cohort
- How to apply condition IF...ELSE in MAF CUCUMBER
- Printing a specific number of nucleotides
- How do I perform MAF analysis for each family separately in PLINK?
- Difficulty in downloading TCGA data
- Android app button text disappears after months of working fine
- how to do gene mutation multivariate survival analysis in R?
- Sending Event from AddIn to Host
- Exception while debugging using windows MAF (AddIn pipeline)
- How to use skinning in maf-skins.xml?
- Assembly.LoadAssembly, MEF and MAF: how do they manage different assembly of frameworks and how not to lock loaded assemblies?
- Wpf Addin's View cover other user control
- iOS iPad Mini / iPhone: "Unable to Install <appname> Please try again later
- MAF Plugin UI content scrolling outside of bounds in main application
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?
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)
I'm going to approach this answer by ignoring the MAF part of the equation, and concentrating on the AppDomain issue. An IoC container could theoretically do what you describe, assuming that the IoC entry point inherits from MarshalByRefObject or is wrapped by a class that in turn inherits from MarshalByRefObject. With a 29K+ rep score, I am sure you know this but:
1) Objects which inherit from MarshalByRefObject can be accessed across AppDomain boundaries via proxying (that is, all of the calls are marshalled across the appdomain boundary to the object).
2) Objects that are serializable can be passed across the AppDomain boundary via serialization, that is, you can get another copy of them in the other AppDomain.
For a number of reasons, you wouldn't want to serialize your whole IoC container and ship it across the AppDomain boundary. First off, the overhead of doing that would be enormous, and secondly there is likely a lot of plumbing behind an IoC container that isn't serializable. Therefore the only possible way for this to work is if:
1) The IoC container itself was MarshalByRef, or was wrapped by such
and
2) The objects that you were getting from the IoC container were all set up properly for cross-domain use (either serializable or MBR-inheriting).
If both of the above are true, then you could theoretically use the IoC container hosted in the main AppDomain from other AppDomains. You'd probably do this by defining a MAF host adapter that was specific to the IoC container's Resolve methods (or whatever the equivalent is in the IoC tool you use).
Keep in mind that a LOT of IoC functionality (especially AOP) is implemented using the same proxy APIs that cross-appdomain communication also uses. I could definitely see this complicating things if you attempt to use the IoC container for anything more than basic serializable structures and MBR-inheriting services.