// ----------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // ----------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Globalization; using System.Reflection; using System.ComponentModel.Composition; using System.Text; namespace Microsoft.Internal { internal static class Requires { [DebuggerStepThrough] public static void NotNull<T>(T value, string parameterName) where T : class { if (value == null) { throw new ArgumentNullException(parameterName); } } [DebuggerStepThrough] public static void NotNullOrEmpty(string value, string parameterName) { NotNull(value, parameterName); if (value.Length == 0) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Strings.ArgumentException_EmptyString, parameterName), parameterName); } } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)