System.Configuration.ErrorsHelper.AddErrors C# (CSharp) Метод

AddErrors() статический приватный Метод

static private AddErrors ( List &errors, ICollection coll ) : void
errors List
coll ICollection
Результат void
        static internal void AddErrors(ref List<ConfigurationException> errors, ICollection<ConfigurationException> coll) {
            if (coll == null || coll.Count == 0) {
                // Nothing to do here, bail
                return;
            }

            foreach (ConfigurationException e in coll) {
                AddError(ref errors, e);
            }
        }

Usage Example

Пример #1
0
        private List <ConfigurationException> GetAllErrors()
        {
            List <ConfigurationException> allErrors = null;

            if (HasLocationInputs)
            {
                foreach (SectionInput input in LocationInputs)
                {
                    ErrorsHelper.AddErrors(ref allErrors, input.Errors);
                }
            }

            if (HasIndirectLocationInputs)
            {
                foreach (SectionInput input in IndirectLocationInputs)
                {
                    ErrorsHelper.AddErrors(ref allErrors, input.Errors);
                }
            }

            if (HasFileInput)
            {
                ErrorsHelper.AddErrors(ref allErrors, FileInput.Errors);
            }

            return(allErrors);
        }
All Usage Examples Of System.Configuration.ErrorsHelper::AddErrors