Lee.Infrastructure/Check.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

// ***********************************************************************
// Assembly         : Lee.Infrastructure
// Author           : yubaolee
// Created          : 06-19-2015
//
// Last Modified By : yubaolee
// Last Modified On : 06-19-2015
// ***********************************************************************
// <copyright file="Class1.cs" company="Microsoft">
//     Copyright (c) Microsoft. All rights reserved.
// </copyright>
// <summary>对象校验</summary>
// ***********************************************************************

using System;

namespace Lee.Infrastructure
{
    public class Check
    {
        /// <summary>
        /// 检验输入是否为0
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="input">The input.</param>
        /// <exception cref="System.ArgumentException"></exception>
        public static void IsNotZero(string name, int input)
        {
            if (input == 0)
            {
                throw new ArgumentException(string.Format("{0}不能为0", name));
            }
        }
        /// <summary>
        /// 检验对象是否为空
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="obj">The object.</param>
        /// <exception cref="System.ArgumentException"></exception>
        public static void IsNotNull(string name, object obj)
        {
            if (obj == null)
            {
                throw new ArgumentException(string.Format("{0}不能为空", name));
            }
        }
        /// <summary>
        /// 检验字符串是否为空
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="input">The input.</param>
        /// <exception cref="System.ArgumentException"></exception>
        public static void IsNotNullOrEmpty(string name, string input)
        {
            if (string.IsNullOrEmpty(input))
            {
                throw new ArgumentException(string.Format("{0}不能为空", name));
            }
        }
        /// <summary>

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。