예제 #1
0
        public static string GetOptionValue(this SolutionPackageProvisionOptions options, string name)
        {
            var option = FindOption(options, name);

            if (option != null)
            {
                return(option.Value);
            }

            return(null);
        }
예제 #2
0
        public static SolutionPackageProvisionOptions SetOptionValue(
            this SolutionPackageProvisionOptions options,
            string name, string value)
        {
            var option = FindOption(options, name);

            if (option == null)
            {
                option = new OptionValue
                {
                    Name  = name,
                    Value = value
                };

                options.Options.Add(option);
            }

            option.Value = value;

            return(options);
        }
예제 #3
0
 public static OptionValue FindOption(this SolutionPackageProvisionOptions options, string name)
 {
     return(options.Options.FirstOrDefault(o => o.Name.ToUpper() == name.ToUpper()));
 }