Closed yallie closed 8 months ago
And/or can we make Flags
public?
/// <summary>Serializable DTO of all registration information.</summary>
public sealed class ExportedRegistrationInfo
{
public ExportInfo[] Exports;
public Type ImplementationType;
public string ImplementationTypeFullName;
public bool IsLazy => ImplementationTypeFullName != null;
public ReuseInfo Reuse;
public Setup.Settings Flags; // <--------------- here
public bool UseParentReuse
{
get => (Flags & Setup.Settings.UseParentReuse) != 0;
set => Flags = value ? Flags | Setup.Settings.UseParentReuse: Flags & ~Setup.Settings.UseParentReuse;
}
...
@yallie Done :) Will release a new version shortly
@yallie I have published to Nuget DryIoc v5.4.2 and DryIoc.MefAttributedModel v7.0.2
Thanks a lot! 👍
Hi, Maksim!
There is a class in
MefAttributedModel
library that is used as a serializable container for exported registrations: ExportedRegistrationInfoI use it in my app for registrations not available at compile time. Scripted components are stored in the database with their serialized registrations. On startup, I load and deserialize registrations and register in DryIoc container. Serialized registrations allow to compile scripts on-demand rather than up-front.
When upgrading from version 4.8.7 I noticed that some properties became internal. So I can't deserialize my registrations anymore 😮
I guess they are not public to protect the integrity of registrations. But does it make sense in a serializable DTO class to have internal properties? Can we revert the change and have them all public? Or am I missing something obvious?