Dependency Injection. Assign values to IENUMERABLE
- by Boss
public interface IFeature
{
string FeatureName { get; set; }
}
public interface IFeatureRegistry
{
IEnumerable<IFeature> Features { get; set; }
bool IsEnabled(IEnumerable<string> featurePath);
}
public interface IApplicationTenant
{
string ApplicationName { get; }
IFeatureRegistry EnabledFeatures { get; }
}
public abstract class AbstractApplicationTenant : IApplicationTenant
{
public string ApplicationName { get; protected set; }
public IFeatureRegistry EnabledFeatures { get; protected set; }
}
public class SampleTenant : AbstractApplicationTenant
{
public SampleTenant()
{
ApplicationName = "Sample 1";
EnabledFeatures = null;
}
}
I am new to this field. My question is how to assign values to EnabledFeatures?
Thanks
Jeco