diff options
Diffstat (limited to 'mcs/class/System.ComponentModel.Composition/src/ComponentModel/Microsoft/Internal/LazyServices.cs')
-rw-r--r-- | mcs/class/System.ComponentModel.Composition/src/ComponentModel/Microsoft/Internal/LazyServices.cs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/mcs/class/System.ComponentModel.Composition/src/ComponentModel/Microsoft/Internal/LazyServices.cs b/mcs/class/System.ComponentModel.Composition/src/ComponentModel/Microsoft/Internal/LazyServices.cs deleted file mode 100644 index 07783ffcd7b..00000000000 --- a/mcs/class/System.ComponentModel.Composition/src/ComponentModel/Microsoft/Internal/LazyServices.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using System.Text;
-using System.Globalization;
-
-namespace Microsoft.Internal
-{
- internal static class LazyServices
- {
- public static Lazy<T> AsLazy<T>(this T t)
- where T : class
- {
- return new Lazy<T>(() => t, false);
- }
-
- public static T GetNotNullValue<T>(this Lazy<T> lazy, string argument)
- where T : class
- {
- Assumes.NotNull(lazy);
- T value = lazy.Value;
- if (value == null)
- {
- throw new InvalidOperationException(
- string.Format(CultureInfo.CurrentCulture, Strings.LazyServices_LazyResolvesToNull, typeof(T), argument));
- }
-
- return value;
- }
- }
-}
|