Permalink
Browse files

Change the library to dotnet5.4; use COREFX rather than specific labe…

…ls for #if tests
  • Loading branch information...
1 parent 8e4d792 commit 44326df4ef60171832fe671ea8b29a22b49f4048 @mgravell committed Nov 24, 2015
@@ -24,7 +24,10 @@
"System.Data": "4.0.0.0"
}
},
- "dnxcore50": {
+ "dotnet5.4": {
+ "compilationOptions": {
+ "define": [ "COREFX" ]
+ },
"dependencies": {
"Microsoft.CSharp": "4.0.1-*",
"System.Collections.NonGeneric": "4.0.1-*",
@@ -86,7 +86,7 @@ public Type Type
public bool IsDefined(Type attributeType)
{
if (attributeType == null) throw new ArgumentNullException("attributeType");
-#if DNXCORE50
+#if COREFX
return member.IsDefined(attributeType);
#else
return Attribute.IsDefined(member, attributeType);
@@ -106,7 +106,7 @@ public override int Depth
get { return 0; }
}
-#if !DNXCORE50
+#if !COREFX
public override DataTable GetSchemaTable()
{
// these are the columns used by DataTable load
@@ -316,7 +316,7 @@ public override object GetValue(int i)
public override IEnumerator GetEnumerator()
{
-#if DNXCORE50
+#if COREFX
throw new NotImplementedException(); // https://github.com/dotnet/corefx/issues/4646
#else
return new DbEnumerator(this);
@@ -309,14 +309,14 @@ static TypeAccessor CreateNew(Type type, bool allowNonPublicAccessors)
if (assembly == null)
{
AssemblyName name = new AssemblyName("FastMember_dynamic");
-#if DNXCORE50
+#if COREFX
assembly = AssemblyBuilder.DefineDynamicAssembly(name, AssemblyBuilderAccess.Run);
#else
assembly = AppDomain.CurrentDomain.DefineDynamicAssembly(name, AssemblyBuilderAccess.Run);
#endif
module = assembly.DefineDynamicModule(name.Name);
}
-#if DNXCORE50
+#if COREFX
TypeAttributes attribs = typeof(TypeAccessor).GetTypeInfo().Attributes;
#else
TypeAttributes attribs = typeof(TypeAccessor).Attributes;
@@ -8,15 +8,15 @@ internal static class TypeHelpers
{
public static bool _IsValueType(this Type type)
{
-#if DNXCORE50
+#if COREFX
return type.GetTypeInfo().IsValueType;
#else
return type.IsValueType;
#endif
}
public static bool _IsPublic(this Type type)
{
-#if DNXCORE50
+#if COREFX
return type.GetTypeInfo().IsPublic;
#else
return type.IsPublic;
@@ -25,15 +25,15 @@ public static bool _IsPublic(this Type type)
public static bool _IsNestedPublic(this Type type)
{
-#if DNXCORE50
+#if COREFX
return type.GetTypeInfo().IsNestedPublic;
#else
return type.IsNestedPublic;
#endif
}
public static bool _IsClass(this Type type)
{
-#if DNXCORE50
+#if COREFX
return type.GetTypeInfo().IsClass;
#else
return type.IsClass;
@@ -42,15 +42,15 @@ public static bool _IsClass(this Type type)
public static bool _IsAbstract(this Type type)
{
-#if DNXCORE50
+#if COREFX
return type.GetTypeInfo().IsAbstract;
#else
return type.IsAbstract;
#endif
}
public static Type _CreateType(this TypeBuilder type)
{
-#if DNXCORE50
+#if COREFX
return type.CreateTypeInfo().AsType();
#else
return type.CreateType();
@@ -18,7 +18,10 @@
"System.Data": "4.0.0.0"
}
},
- "dnxcore50": {
+ "dotnet5.4": {
+ "compilationOptions": {
+ "define": [ "COREFX" ]
+ },
"dependencies": {
"Microsoft.CSharp": "4.0.1-*",
"System.Collections.NonGeneric": "4.0.1-*",

0 comments on commit 44326df

Please sign in to comment.