Beispiel #1
0
        private static void ValidateUniqueAppSettingNames(ICLIProvider provider)
        {
            if (provider.SetupAppSettings == null || provider.SetupAppSettings.Count == 0)
            {
                return;
            }

            ValidateUniqueNess(provider.SetupAppSettings.Select(p => p.Name.ToLowerInvariant()),
                               $"An appSetting in a  provider has to have a unique name. There is at least two called {{0}} in the {provider.Verb} provider");
        }
Beispiel #2
0
        private static void ValidateUniqueParameterNames(ICLIProvider provider)
        {
            if (provider.SetupParameters == null || provider.SetupParameters.Count == 0)
            {
                return;
            }

            ValidateUniqueNess(provider.SetupParameters.Select(p => p.ShortName.ToLowerInvariant()),
                               $"A parameter in a  provider has to have a unique name. There is at least two called {{0}} in the {provider.Verb} provider");

            ValidateUniqueNess(provider.SetupParameters.Select(p => p.LongName.ToLowerInvariant()),
                               $"A parameter in a  provider has to have a unique name. There is at least two called {{0}} in the {provider.Verb} provider");
        }