| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using Quadarax.Foundation.Core.QConsole.Argument;
- namespace qdr.app.tools.qfu.Commands.Aspects
- {
- internal class ScopeAspect
- {
- #region *** Constants ***
- public const string ARG_SCOPE_NAME = "scope";
- private const string ARG_SCOPE_HINT = "scope";
- private const string ARG_SCOPE_DESCR = "Define scope to clean. Possible values '"+ SCOPE_FILES +"' or '"+ SCOPE_DIRECTORIES +"'.";
- private const int ARG_SCOPE_ORD = 0;
- public const string SCOPE_FILES = "files";
- public const string SCOPE_DIRECTORIES = "directories";
- #endregion
- #region *** Public Operations ***
- public static IEnumerable<AbstractArgument> SetupArguments()
- {
- return
- [
- new OrdinalArgument(ARG_SCOPE_ORD, false, ARG_SCOPE_NAME, ARG_SCOPE_DESCR, ARG_SCOPE_HINT, Quadarax.Foundation.Core.QConsole.Value.TypeValuesEnum.String, string.Empty, true)
- ];
- }
- public static bool IsValidScope(string scope)
- {
- return string.Equals(scope, SCOPE_FILES, StringComparison.OrdinalIgnoreCase) ||
- string.Equals(scope, SCOPE_DIRECTORIES, StringComparison.OrdinalIgnoreCase);
- }
- public static bool IsScopeFiles(string scope)
- {
- return string.Equals(scope, SCOPE_FILES, StringComparison.OrdinalIgnoreCase);
- }
- public static bool IsScopeDirectories(string scope)
- {
- return string.Equals(scope, SCOPE_DIRECTORIES, StringComparison.OrdinalIgnoreCase);
- }
- #endregion
- }
- }
|