Example #1
0
        public static string GetValue(this AppDomainDeploymentOptions options, string name)
        {
            var option = options.AdditionalOptions.FirstOrDefault(o => o.Name.ToUpper() == name.ToUpper());

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

            return(null);
        }
Example #2
0
        public static AppDomainDeploymentOptions Add(this AppDomainDeploymentOptions options, string name, string value)
        {
            var option = options.AdditionalOptions.FirstOrDefault(o => o.Name.ToUpper() == name.ToUpper());

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

            option.Value = value;

            return(options);
        }