IFeatureDefinitionContext.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using Abp.Localization;
  2. using Abp.UI.Inputs;
  3. namespace Abp.Application.Features
  4. {
  5. /// <summary>
  6. /// Used in the <see cref="FeatureProvider.SetFeatures"/> method as context.
  7. /// </summary>
  8. public interface IFeatureDefinitionContext
  9. {
  10. /// <summary>
  11. /// Creates a new feature.
  12. /// </summary>
  13. /// <param name="name">Unique name of the feature</param>
  14. /// <param name="defaultValue">Default value</param>
  15. /// <param name="displayName">Display name of the feature</param>
  16. /// <param name="description">A brief description for this feature</param>
  17. /// <param name="scope">Feature scope</param>
  18. /// <param name="inputType">Input type</param>
  19. Feature Create(string name, string defaultValue, ILocalizableString displayName = null, ILocalizableString description = null, FeatureScopes scope = FeatureScopes.All, IInputType inputType = null);
  20. /// <summary>
  21. /// Gets a feature with a given name or null if it can not be found.
  22. /// </summary>
  23. /// <param name="name">Unique name of the feature</param>
  24. /// <returns><see cref="Feature"/> object or null</returns>
  25. Feature GetOrNull(string name);
  26. /// <summary>
  27. /// Remove feature with given name
  28. /// </summary>
  29. /// <param name="name"></param>
  30. void Remove(string name);
  31. }
  32. }