Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit cce2550

Browse files
committed
ofc Type.EmptyTypes isn't PCL
1 parent 219f7a5 commit cce2550

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ServiceStack.Text/ReflectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1802,7 +1802,7 @@ public static Type GetCachedGenericType(this Type type, params Type[] argTypes)
18021802
throw new ArgumentException(type.FullName + " is not a Generic Type Definition");
18031803

18041804
if (argTypes == null)
1805-
argTypes = Type.EmptyTypes;
1805+
argTypes = TypeConstants.EmptyTypeArray;
18061806

18071807
var sb = StringBuilderThreadStatic.Allocate()
18081808
.Append(type.FullName);

src/ServiceStack.Text/TypeConstants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static class TypeConstants
1313
public static readonly bool[] EmptyBoolArray = new bool[0];
1414
public static readonly byte[] EmptyByteArray = new byte[0];
1515
public static readonly object[] EmptyObjectArray = new object[0];
16-
public static readonly Type[] EmptyTypeArray = Type.EmptyTypes;
16+
public static readonly Type[] EmptyTypeArray = new Type[0];
1717
public static readonly FieldInfo[] EmptyFieldInfoArray = new FieldInfo[0];
1818
public static readonly PropertyInfo[] EmptyPropertyInfoArray = new PropertyInfo[0];
1919

0 commit comments

Comments
 (0)