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;
}
}
このフィールドを初めて使用しています。私の質問はEnabledFeatures
に値を割り当てる方法ですか?依存性注射。値をIENUMERABLEに割り当てます
おかげ Jeco
コードを少なくともフォーマットしてください。 –
私は彼のためにそれをやった。 (彼は新しいです) – Aren