update MEF to preview 9
[mcs.git] / class / System.ComponentModel.Composition / src / Composition.Initialization / Microsoft / Internal / Requires.cs
blobc7c2d31c1e294db150b425c1173418a47d1a513c
1 // -----------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 // -----------------------------------------------------------------------
4 using System;
5 using System.Collections;
6 using System.Collections.Generic;
7 using System.Diagnostics;
8 using System.Linq;
9 using System.Globalization;
10 using System.Reflection;
11 using System.ComponentModel.Composition;
12 using System.Text;
14 namespace Microsoft.Internal
16 internal static class Requires
18 [DebuggerStepThrough]
19 public static void NotNull<T>(T value, string parameterName)
20 where T : class
22 if (value == null)
24 throw new ArgumentNullException(parameterName);
28 [DebuggerStepThrough]
29 public static void NotNullOrEmpty(string value, string parameterName)
31 NotNull(value, parameterName);
33 if (value.Length == 0)
35 throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Strings.ArgumentException_EmptyString, parameterName), parameterName);