コード例 #1
0
        public static void AgainstNullOrEmptyString(string value, string paramName)
        {
            if (!string.IsNullOrEmpty(value))
            {
                return;
            }

            var exception = new DataOnionException($"'{paramName}' cannot be null or empty",
                                                   new ArgumentNullException(paramName));

            throw exception;
        }
コード例 #2
0
        public static void AgainstNullOrEmptyGuid(Guid value, string paramName)
        {
            if (value != Guid.Empty)
            {
                return;
            }

            var exception = new DataOnionException($"'{paramName}' cannot be null or empty",
                                                   new ArgumentNullException(paramName));

            throw exception;
        }