Exemplo n.º 1
0
        /// <summary>
        /// Gets the error message for the property with the given name.
        /// </summary>
        /// <returns>
        /// The error message for the property.
        /// </returns>
        /// <param name="columnName">The name of the property whose error message to get.</param>
        public string this[string columnName]
        {
            get
            {
                if (columnName == "LogName")
                {
                    if (string.IsNullOrEmpty(LogName))
                    {
                        return("Log name may not be blank.");
                    }

                    if (logManager != null && logManager.Any(l => l.Name == LogName))
                    {
                        return("A logger with that name already exists");
                    }
                }

                return(null);
            }
        }