-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ApplicationPart should be a feature collection #4760
Comments
I like this, but is this something we'd do in 1.0.1? This seems breaking changey |
Yea, we can talk about it some more after 1.0.0 |
I can actually think of a way we can do this without breaking changes. Add the feature collection, and then have a default implementation on |
How does the user apply a feature to all parts - ones already in the part manager and ones that are added later? e.g. foreach (var part in partManager.Parts.OfType<AssemblyPart>())
{
part.Features.Set<ITestFeature>(foo);
}
partManager.Parts.Add(new AssemblyPart(..)); <-- How do I ensure this part also has the feature? |
@pranavkm the order in which you call things during startup is important. You add parts first then you create features. |
Sure, but it makes it much harder to compose it. For instance, we wouldn't be able to light up the the |
@pranavkm let's talk offline |
Discussed this offline and here's what we have: We decided the current model of creating parts doesn't lend itself to a feature collection model. The guidance would be
|
We don't have any immediate work scheduled for this. Closing this for now and we can track the embedded view work via #5144. |
Today
ApplicationPart
need to implement interfaces in order for the feature provider to interact with the part. This means that parts cannot be extended without making a new derived one. Instead,ApplicationPart
should be a feature collection so that new interfaces can be added/removed from existing parts.It will allow people to extend
AssemblyPart
for example without making a new derived type./cc @javiercn @rynowak @Eilon @pranavkm
The text was updated successfully, but these errors were encountered: