示例#1
0
文件: LogLevel.cs 项目: winhu/NLog
        /// <summary>
        /// Compares two <see cref="LogLevel"/> objects
        /// and returns a value indicating whether
        /// the first one is less than or equal to the second one.
        /// </summary>
        /// <param name="level1">The first level.</param>
        /// <param name="level2">The second level.</param>
        /// <returns>The value of <c>level1.Ordinal &lt;= level2.Ordinal</c>.</returns>
        public static bool operator <=(LogLevel level1, LogLevel level2)
        {
            ParameterUtils.AssertNotNull(level1, "level1");
            ParameterUtils.AssertNotNull(level2, "level2");

            return(level1.Ordinal <= level2.Ordinal);
        }