From bfbd6a3eef9118b867793b899f8af950c0d2fd47 Mon Sep 17 00:00:00 2001 From: Ben Rogers Date: Tue, 30 Aug 2016 16:34:23 -0400 Subject: [PATCH] Fix compilation with PORTABLE symbol. Compiling with the PORTABLE symbol results in several errors. > The namespace 'TinyIoC' already contains a definition for > 'ReverseTypeExtender' The NETSTANDARD1_6 symbol is OR'd instead of AND'd. Since the rest of the symbols are AND'd, this appears to be a copy-and-paste error. > Inconsistent accessibility: parameter type 'BindingFlags' is less > accessible than method 'TypeExtensions.GetConstructors(Type, > BindingFlags)' The BindingFlags enum is marked internal; however, it is included in various public method signatures. --- src/TinyIoC/TinyIoC.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TinyIoC/TinyIoC.cs b/src/TinyIoC/TinyIoC.cs index 388b2e3..530659b 100644 --- a/src/TinyIoC/TinyIoC.cs +++ b/src/TinyIoC/TinyIoC.cs @@ -361,7 +361,7 @@ public static Type[] SafeGetTypes(this Assembly assembly) #if PORTABLE || NETSTANDARD1_0 || NETSTANDARD1_1 || NETSTANDARD1_2 [Flags] - internal enum BindingFlags { + public enum BindingFlags { Default = 0, IgnoreCase = 1, DeclaredOnly = 2, @@ -4246,7 +4246,7 @@ public static Assembly Assembly(this Type type) } #endif // reverse shim for WinRT SR changes... -#if (!NETFX_CORE && !PORTABLE && !NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 || !NETSTANDARD1_6) +#if (!NETFX_CORE && !PORTABLE && !NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6) static class ReverseTypeExtender { public static bool IsClass(this Type type)