Make base entity classes use MarshalByRefObject
See original GitHub issueMarshalByRefObjects as you may know are for cross-AppDomain communication. If you’re going for “modern and secure” practices, implementing it would be a good idea. There are no downsides to this known to me.
AppDomains could be used to safely load DLL modules in a restricted sandboxed environment, and by using MarshalByRef enabled objects any entity can easily be accessed between AppDomains.
Code changes are easy and unnoticeable. In case of SocketEntity.cs for example, it’s a matter of changing
SocketEntity<T> : IEntity<T>
to
SocketEntity<T> : MarshalByRefObject, IEntity<T>
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to solve "Must be MarshalByRefObject" in a good but ...
It depends on how you need to get at it. Using a base class that derives from MarshalByRefObject might do it. Aggregation might...
Read more >MarshalByRefObject Class (System)
MarshalByRefObject is the base class for objects that communicate across application domain boundaries by exchanging messages using a proxy. Objects that do not ......
Read more >MarshalByRefObject - C# in a Nutshell [Book]
MarshalByRefObject is the base class for objects that are marshaled by reference across AppDomain boundaries. If you attempt to transmit an object that ......
Read more >Type: System.MarshalByRefObject
MarshalByRefObject is the base class for objects that communicate across application domain boundaries by exchanging messages using a proxy.
Read more >Entity Base Class
Every domain class not only has the Id property, but itself is an entity. It is important to remove possible misunderstandings; using an ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
.NET Standard doesn’t cover AppDomains, and since Discord.Net 1.0 targets .NET Standard 1.1 and 1.3, it can’t implement AppDomain APIs. This is a frustrating issue for many that relied upon AppDomains, as you can imagine.
Closing due to https://github.com/discord-net/Discord.Net/pull/2230#issuecomment-1089247749