Closed SmallShrimp closed 4 years ago
Feature system is used in a multi-tenant/SaaS application to grant/prohibit certain features. In this way Tenant A can use a feature while Tenant B can't use it.
This is not documented yet, but you can check the ASP.NET Boilerplate document to get the idea: https://aspnetboilerplate.com/Pages/Documents/Feature-Management
If I would directly answer your question, it is really simple:
var featuresOfMyProvider = featureDefinitionManager.GetAll().Where(f => f.AllowedProviders.Contains("MyProvider"));
Provides here are "Tenant", "Edition" and so on... not the features or modules of your application.
I think the "AllowedProviders" attribute should be used to filter the "FeatureDefinition" list,like
FeatureDefinitionManager.GetAll(string providerName)
.I'd like to get a different list of features in different place.For example, I need to add a product management module that makes a difference for different versions of the products that can be used.The products here are special features,but I don't want to see them in tenant management. And it can only be seen in product management