You've already forked linux-packaging-mono
Imported Upstream version 5.4.0.167
Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
parent
e49d6f06c0
commit
536cd135cc
@@ -2,7 +2,8 @@
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\dir.props" />
|
||||
<PropertyGroup>
|
||||
<AssemblyVersion>4.2.0.0</AssemblyVersion>
|
||||
<AssemblyVersion>4.2.1.0</AssemblyVersion>
|
||||
<AssemblyKey>MSFT</AssemblyKey>
|
||||
<IsNETCoreApp>true</IsNETCoreApp>
|
||||
<IsUAP>true</IsUAP>
|
||||
</PropertyGroup>
|
||||
|
@@ -1,4 +0,0 @@
|
||||
Compat issues with assembly System.Reflection:
|
||||
MembersMustExist : Member 'System.Reflection.FieldInfo.GetValueDirect(System.TypedReference)' does not exist in the implementation but it does exist in the contract.
|
||||
MembersMustExist : Member 'System.Reflection.FieldInfo.SetValueDirect(System.TypedReference, System.Object)' does not exist in the implementation but it does exist in the contract.
|
||||
Total Issues: 2
|
@@ -6,7 +6,6 @@
|
||||
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
|
||||
<ProjectGuid>{68F87E68-E13F-4354-A6D6-B44727FE53EE}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<!-- Help VS understand available configurations -->
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Debug|AnyCPU'" />
|
||||
|
@@ -30,11 +30,7 @@ namespace System.Reflection.Tests
|
||||
yield return new object[] { "NAME", "NAME" };
|
||||
yield return new object[] { "name with spaces", "name with spaces" };
|
||||
yield return new object[] { "\uD800\uDC00", "\uD800\uDC00" };
|
||||
yield return new object[] { "привет", "привет" };
|
||||
|
||||
// Invalid Unicode
|
||||
yield return new object[] { "\uD800", "\uFFFD" };
|
||||
yield return new object[] { "\uDC00", "\uFFFD" };
|
||||
yield return new object[] { "\u043F\u0440\u0438\u0432\u0435\u0442", "\u043F\u0440\u0438\u0432\u0435\u0442" };
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -50,7 +46,7 @@ namespace System.Reflection.Tests
|
||||
public void Ctor_String(string name, string expectedName)
|
||||
{
|
||||
AssemblyName assemblyName = new AssemblyName(name);
|
||||
Assert.Equal(expectedName, assemblyName.Name);
|
||||
Assert.Equal(expectedName.ToLowerInvariant(), assemblyName.Name.ToLowerInvariant());
|
||||
Assert.Equal(ProcessorArchitecture.None, assemblyName.ProcessorArchitecture);
|
||||
}
|
||||
|
||||
@@ -188,8 +184,11 @@ namespace System.Reflection.Tests
|
||||
{
|
||||
AssemblyName assemblyName = new AssemblyName(name);
|
||||
|
||||
string extended = $"{expectedName}, Culture=neutral, PublicKeyToken=null";
|
||||
Assert.True(assemblyName.FullName == expectedName || assemblyName.FullName == extended);
|
||||
expectedName = expectedName.ToLowerInvariant();
|
||||
string extended = $"{expectedName}, Culture=neutral, PublicKeyToken=null".ToLowerInvariant();
|
||||
string afn = assemblyName.FullName.ToLowerInvariant();
|
||||
|
||||
Assert.True(afn == expectedName || afn == extended, $"Expected\n{afn} == {expectedName}\nor\n{afn} == {extended}");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -252,11 +251,35 @@ namespace System.Reflection.Tests
|
||||
Assert.StartsWith("System.Reflection.Tests", assemblyName.Name);
|
||||
}
|
||||
|
||||
// The ECMA replacement key for the Microsoft implementation of the CLR.
|
||||
private static readonly byte[] TheKey =
|
||||
{
|
||||
0x00,0x24,0x00,0x00,0x04,0x80,0x00,0x00,0x94,0x00,0x00,0x00,0x06,0x02,0x00,0x00,
|
||||
0x00,0x24,0x00,0x00,0x52,0x53,0x41,0x31,0x00,0x04,0x00,0x00,0x01,0x00,0x01,0x00,
|
||||
0x07,0xd1,0xfa,0x57,0xc4,0xae,0xd9,0xf0,0xa3,0x2e,0x84,0xaa,0x0f,0xae,0xfd,0x0d,
|
||||
0xe9,0xe8,0xfd,0x6a,0xec,0x8f,0x87,0xfb,0x03,0x76,0x6c,0x83,0x4c,0x99,0x92,0x1e,
|
||||
0xb2,0x3b,0xe7,0x9a,0xd9,0xd5,0xdc,0xc1,0xdd,0x9a,0xd2,0x36,0x13,0x21,0x02,0x90,
|
||||
0x0b,0x72,0x3c,0xf9,0x80,0x95,0x7f,0xc4,0xe1,0x77,0x10,0x8f,0xc6,0x07,0x77,0x4f,
|
||||
0x29,0xe8,0x32,0x0e,0x92,0xea,0x05,0xec,0xe4,0xe8,0x21,0xc0,0xa5,0xef,0xe8,0xf1,
|
||||
0x64,0x5c,0x4c,0x0c,0x93,0xc1,0xab,0x99,0x28,0x5d,0x62,0x2c,0xaa,0x65,0x2c,0x1d,
|
||||
0xfa,0xd6,0x3d,0x74,0x5d,0x6f,0x2d,0xe5,0xf1,0x7e,0x5e,0xaf,0x0f,0xc4,0x96,0x3d,
|
||||
0x26,0x1c,0x8a,0x12,0x43,0x65,0x18,0x20,0x6d,0xc0,0x93,0x34,0x4d,0x5a,0xd2,0x93
|
||||
};
|
||||
|
||||
[Fact]
|
||||
public static void FullName_WithPublicKey()
|
||||
{
|
||||
AssemblyName assemblyName = new AssemblyName("MyAssemblyName, Version=1.0.0.0");
|
||||
assemblyName.SetPublicKey(TheKey);
|
||||
Assert.Equal("MyAssemblyName, Version=1.0.0.0, PublicKeyToken=b03f5f7f11d50a3a", assemblyName.FullName);
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> Version_TestData()
|
||||
{
|
||||
yield return new object[] { new Version(255, 1), "255.1.65535.65535" };
|
||||
yield return new object[] { new Version(255, 1, 2), "255.1.2.65535" };
|
||||
yield return new object[] { new Version(255, 1), "255.1" };
|
||||
yield return new object[] { new Version(255, 1, 2), "255.1.2" };
|
||||
yield return new object[] { new Version(255, 1, 2, 3), "255.1.2.3" };
|
||||
yield return new object[] { new Version(1, 2, 0x1ffff, 4), "1.2" };
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -268,7 +291,9 @@ namespace System.Reflection.Tests
|
||||
|
||||
string expected = "MyAssemblyName, Version=" + versionString;
|
||||
string extended = expected + ", Culture=neutral, PublicKeyToken=null";
|
||||
Assert.True(assemblyName.FullName == expected || assemblyName.FullName == extended);
|
||||
|
||||
Assert.True(assemblyName.FullName == expected || assemblyName.FullName == extended,
|
||||
$"Expected\n{assemblyName.FullName} == {expected}\nor\n{assemblyName.FullName} == {extended}");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@@ -118,10 +118,14 @@ namespace System.Reflection.Tests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "On desktop, XUnit hosts in an appdomain in such a way that GetEntryAssembly() returns null")]
|
||||
public void GetEntryAssembly()
|
||||
{
|
||||
Assert.NotNull(Assembly.GetEntryAssembly());
|
||||
Assert.StartsWith("xunit.console.netcore", Assembly.GetEntryAssembly().ToString(), StringComparison.OrdinalIgnoreCase);
|
||||
string assembly = Assembly.GetEntryAssembly().ToString();
|
||||
bool correct = assembly.IndexOf("xunit.console.netcore", StringComparison.OrdinalIgnoreCase) != -1 ||
|
||||
assembly.IndexOf("XUnit.Runner.Uap", StringComparison.OrdinalIgnoreCase) != -1;
|
||||
Assert.True(correct, $"Unexpected assembly name {assembly}");
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> GetHashCode_TestData()
|
||||
@@ -191,7 +195,7 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void Load_Invalid()
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>("assemblyRef", () => Assembly.Load((AssemblyName)null)); // AssemblyRef is null
|
||||
Assert.Throws<ArgumentNullException>(() => Assembly.Load((AssemblyName)null)); // AssemblyRef is null
|
||||
Assert.Throws<FileNotFoundException>(() => Assembly.Load(new AssemblyName("no such assembly"))); // No such assembly
|
||||
}
|
||||
|
||||
@@ -204,12 +208,14 @@ namespace System.Reflection.Tests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "CodeBase is not supported on UapAot")]
|
||||
public void CodeBase()
|
||||
{
|
||||
Assert.NotEmpty(Helpers.ExecutingAssembly.CodeBase);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ImageRuntimeVersion is not supported on UapAot.")]
|
||||
public void ImageRuntimeVersion()
|
||||
{
|
||||
Assert.NotEmpty(Helpers.ExecutingAssembly.ImageRuntimeVersion);
|
||||
@@ -260,6 +266,7 @@ namespace System.Reflection.Tests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "GetReferencedAssemblies is not supported on UapAot.")]
|
||||
public void GetReferencedAssemblies()
|
||||
{
|
||||
// It is too brittle to depend on the assembly references so we just call the method and check that it does not throw.
|
||||
|
@@ -60,9 +60,11 @@ namespace System.Reflection.Tests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Invoking static constructors are not supported on UapAot.")]
|
||||
public void Invoke_StaticConstructor_NullObject_NullParameters()
|
||||
{
|
||||
ConstructorInfo[] constructors = GetConstructors(typeof(ClassWithStaticConstructor));
|
||||
Assert.Equal(1, constructors.Length);
|
||||
object obj = constructors[0].Invoke(null, new object[] { });
|
||||
Assert.Null(obj);
|
||||
}
|
||||
@@ -71,6 +73,7 @@ namespace System.Reflection.Tests
|
||||
public void Invoke_StaticConstructor_ThrowsMemberAccessException()
|
||||
{
|
||||
ConstructorInfo[] constructors = GetConstructors(typeof(ClassWithStaticConstructor));
|
||||
Assert.Equal(1, constructors.Length);
|
||||
Assert.Throws<MemberAccessException>(() => constructors[0].Invoke(new object[0]));
|
||||
}
|
||||
|
||||
@@ -137,7 +140,7 @@ namespace System.Reflection.Tests
|
||||
public void Invoke_ParameterWrongType_ThrowsArgumentException()
|
||||
{
|
||||
ConstructorInfo[] constructors = GetConstructors(typeof(ClassWith3Constructors));
|
||||
Assert.Throws<ArgumentException>(null, () => (ClassWith3Constructors)constructors[1].Invoke(new object[] { "hello" }));
|
||||
Assert.Throws<ArgumentException>(() => (ClassWith3Constructors)constructors[1].Invoke(new object[] { "hello" }));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -227,7 +230,7 @@ namespace System.Reflection.Tests
|
||||
public string Method1(DateTime dt) => "";
|
||||
}
|
||||
|
||||
public class ClassWithStaticConstructor
|
||||
public static class ClassWithStaticConstructor
|
||||
{
|
||||
static ClassWithStaticConstructor() { }
|
||||
}
|
||||
|
@@ -147,7 +147,10 @@ namespace System.Reflection.Tests
|
||||
EventInfo eventInfo1 = GetEventInfo(type1, name1);
|
||||
EventInfo eventInfo2 = GetEventInfo(type2, name2);
|
||||
Assert.Equal(expected, eventInfo1.Equals(eventInfo2));
|
||||
Assert.Equal(expected, eventInfo1.GetHashCode().Equals(eventInfo2.GetHashCode()));
|
||||
if (expected)
|
||||
{
|
||||
Assert.Equal(eventInfo1.GetHashCode(), eventInfo2.GetHashCode());
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
@@ -366,8 +366,8 @@ namespace System.Reflection.Tests
|
||||
fieldInfo.SetValue(obj, BTypeWithAllB_Contra);
|
||||
Assert.Equal(BTypeWithAllB_Contra, fieldInfo.GetValue(obj));
|
||||
|
||||
Assert.Throws<ArgumentException>(null, () => fieldInfo.SetValue(obj, new int[] { 1, -1, 2, -2 }));
|
||||
Assert.Throws<ArgumentException>(null, () => fieldInfo.SetValue(obj, new byte[] { 2, 3, 4 }));
|
||||
Assert.Throws<ArgumentException>(() => fieldInfo.SetValue(obj, new int[] { 1, -1, 2, -2 }));
|
||||
Assert.Throws<ArgumentException>(() => fieldInfo.SetValue(obj, new byte[] { 2, 3, 4 }));
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> FieldInfoRTGenericTests_TestData()
|
||||
@@ -522,5 +522,38 @@ namespace System.Reflection.Tests
|
||||
public static FI_GenericClass<T>[] arrayField;
|
||||
public static FI_StaticGenericField<T> selfField;
|
||||
}
|
||||
|
||||
struct FieldData
|
||||
{
|
||||
public Inner inner;
|
||||
}
|
||||
|
||||
struct Inner
|
||||
{
|
||||
public object field;
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(222)]
|
||||
[InlineData("new value")]
|
||||
[InlineData('A')]
|
||||
[InlineData(false)]
|
||||
[InlineData(4.56f)]
|
||||
[InlineData(double.MaxValue)]
|
||||
[InlineData(long.MaxValue)]
|
||||
[InlineData(byte.MaxValue)]
|
||||
[InlineData(null)]
|
||||
public static void SetValueDirect_GetValueDirectRoundDataTest(object value)
|
||||
{
|
||||
FieldData testField = new FieldData { inner = new Inner() { field = -1 } };
|
||||
FieldInfo innerFieldInfo = typeof(FieldData).GetField(nameof(FieldData.inner));
|
||||
FieldInfo[] fields = { innerFieldInfo };
|
||||
FieldInfo fieldFieldInfo = typeof(Inner).GetField(nameof(Inner.field));
|
||||
TypedReference reference = TypedReference.MakeTypedReference(testField, fields);
|
||||
fieldFieldInfo.SetValueDirect(reference, value);
|
||||
object result = fieldFieldInfo.GetValueDirect(reference);
|
||||
|
||||
Assert.Equal(value, result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,37 +0,0 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Reflection.Tests
|
||||
{
|
||||
public partial class FieldInfoTests
|
||||
{
|
||||
struct FieldData
|
||||
{
|
||||
public object field;
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(222)]
|
||||
[InlineData("new value")]
|
||||
[InlineData('A')]
|
||||
[InlineData(false)]
|
||||
[InlineData(4.56f)]
|
||||
[InlineData(double.MaxValue)]
|
||||
[InlineData(long.MaxValue)]
|
||||
[InlineData(byte.MaxValue)]
|
||||
[InlineData(null)]
|
||||
public static void SetValueDirect_GetValueDirectRoundDataTest(object value)
|
||||
{
|
||||
FieldData testField = new FieldData { field = -1 };
|
||||
|
||||
FieldInfo info = testField.GetType().GetField("field");
|
||||
TypedReference reference = __makeref(testField);
|
||||
info.SetValueDirect(reference, value);
|
||||
object result = info.GetValueDirect(reference);
|
||||
Assert.Equal(value, result);
|
||||
}
|
||||
}
|
||||
}
|
@@ -26,7 +26,7 @@ namespace System.Reflection.Tests
|
||||
Assert.Null(Type.GetType(aqn, throwOnError: false));
|
||||
|
||||
Assert.Throws<TypeLoadException>(() => Type.GetType(typeName, throwOnError: true));
|
||||
Assert.Throws<ArgumentException>("typeName@0", () => Type.GetType(aqn, throwOnError: true));
|
||||
Assert.Throws<ArgumentException>(() => Type.GetType(aqn, throwOnError: true));
|
||||
|
||||
Assert.Null(Type.GetType(typeName, throwOnError: false, ignoreCase: false));
|
||||
Assert.Null(Type.GetType(typeName, throwOnError: false, ignoreCase: true));
|
||||
@@ -35,33 +35,33 @@ namespace System.Reflection.Tests
|
||||
|
||||
Assert.Throws<TypeLoadException>(() => Type.GetType(typeName, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<TypeLoadException>(() => Type.GetType(typeName, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>("typeName@0", () => Type.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>("typeName@0", () => Type.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => Type.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => Type.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
|
||||
// Assembly.GetType
|
||||
Assert.Throws<ArgumentException>(null, () => a.GetType(typeName));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(typeName));
|
||||
Assert.Null(a.GetType(aqn));
|
||||
|
||||
Assert.Throws<ArgumentException>(null, () => a.GetType(typeName, throwOnError: false, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(null, () => a.GetType(typeName, throwOnError: false, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(typeName, throwOnError: false, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(typeName, throwOnError: false, ignoreCase: true));
|
||||
Assert.Null(a.GetType(aqn, throwOnError: false, ignoreCase: false));
|
||||
Assert.Null(a.GetType(aqn, throwOnError: false, ignoreCase: true));
|
||||
|
||||
Assert.Throws<ArgumentException>(null, () => a.GetType(typeName, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(null, () => a.GetType(typeName, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>("typeName@0", () => a.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>("typeName@0", () => a.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(typeName, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(typeName, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
|
||||
// Module.GetType
|
||||
Assert.Throws<ArgumentException>(null, () => m.GetType(typeName, throwOnError: false, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(null, () => m.GetType(typeName, throwOnError: false, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(typeName, throwOnError: false, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(typeName, throwOnError: false, ignoreCase: true));
|
||||
Assert.Null(m.GetType(aqn, throwOnError: false, ignoreCase: false));
|
||||
Assert.Null(m.GetType(aqn, throwOnError: false, ignoreCase: true));
|
||||
|
||||
Assert.Throws<ArgumentException>(null, () => m.GetType(typeName, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(null, () => m.GetType(typeName, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>("typeName@0", () => m.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>("typeName@0", () => m.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(typeName, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(typeName, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> GetType_TestData()
|
||||
@@ -126,8 +126,8 @@ namespace System.Reflection.Tests
|
||||
|
||||
Assert.Throws<TypeLoadException>(() => a.GetType(typeName, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<TypeLoadException>(() => a.GetType(typeName, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(null, () => a.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(null, () => a.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
|
||||
// Module.GetType
|
||||
Assert.Null(m.GetType(typeName, throwOnError: false, ignoreCase: false));
|
||||
@@ -137,8 +137,8 @@ namespace System.Reflection.Tests
|
||||
|
||||
Assert.Throws<TypeLoadException>(() => m.GetType(typeName, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<TypeLoadException>(() => m.GetType(typeName, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(null, () => m.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(null, () => m.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
}
|
||||
else if (expectedResult.FullName == typeName)
|
||||
{
|
||||
@@ -180,8 +180,8 @@ namespace System.Reflection.Tests
|
||||
|
||||
Assert.Equal(expectedResult, a.GetType(typeName, throwOnError: true, ignoreCase: false));
|
||||
Assert.Equal(expectedName, a.GetType(typeName, throwOnError: true, ignoreCase: true).AssemblyQualifiedName, StringComparer.OrdinalIgnoreCase);
|
||||
Assert.Throws<ArgumentException>(null, () => a.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(null, () => a.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
|
||||
// Module.GetType
|
||||
Assert.Equal(expectedResult, m.GetType(typeName, throwOnError: false, ignoreCase: false));
|
||||
@@ -191,8 +191,8 @@ namespace System.Reflection.Tests
|
||||
|
||||
Assert.Equal(expectedResult, m.GetType(typeName, throwOnError: true, ignoreCase: false));
|
||||
Assert.Equal(expectedName, m.GetType(typeName, throwOnError: true, ignoreCase: true).AssemblyQualifiedName, StringComparer.OrdinalIgnoreCase);
|
||||
Assert.Throws<ArgumentException>(null, () => m.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(null, () => m.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
}
|
||||
else if (expectedResult.FullName.Equals(typeName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
@@ -234,8 +234,8 @@ namespace System.Reflection.Tests
|
||||
|
||||
Assert.Throws<TypeLoadException>(() => a.GetType(typeName, throwOnError: true, ignoreCase: false));
|
||||
Assert.Equal(expectedName, a.GetType(typeName, throwOnError: true, ignoreCase: true).AssemblyQualifiedName, StringComparer.OrdinalIgnoreCase);
|
||||
Assert.Throws<ArgumentException>(null, () => a.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(null, () => a.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => a.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
|
||||
// Module.GetType
|
||||
Assert.Null(m.GetType(typeName, throwOnError: false, ignoreCase: false));
|
||||
@@ -245,8 +245,8 @@ namespace System.Reflection.Tests
|
||||
|
||||
Assert.Throws<TypeLoadException>(() => m.GetType(typeName, throwOnError: true, ignoreCase: false));
|
||||
Assert.Equal(expectedName, m.GetType(typeName, throwOnError: true, ignoreCase: true).AssemblyQualifiedName, StringComparer.OrdinalIgnoreCase);
|
||||
Assert.Throws<ArgumentException>(null, () => m.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(null, () => m.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(aqn, throwOnError: true, ignoreCase: false));
|
||||
Assert.Throws<ArgumentException>(() => m.GetType(aqn, throwOnError: true, ignoreCase: true));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -9,6 +9,7 @@ namespace System.Reflection.Tests
|
||||
public class ManifestResourceInfoTests
|
||||
{
|
||||
[Fact]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetManifestResourceInfo() not supported on UapAot")]
|
||||
public void FileName()
|
||||
{
|
||||
Assembly assembly = typeof(ManifestResourceInfoTests).GetTypeInfo().Assembly;
|
||||
@@ -17,6 +18,7 @@ namespace System.Reflection.Tests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetManifestResourceInfo() not supported on UapAot")]
|
||||
public void ReferencedAssembly()
|
||||
{
|
||||
Assembly assembly = typeof(ManifestResourceInfoTests).GetTypeInfo().Assembly;
|
||||
@@ -25,6 +27,7 @@ namespace System.Reflection.Tests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetManifestResourceInfo() not supported on UapAot")]
|
||||
public void ResourceLocation()
|
||||
{
|
||||
Assembly assembly = typeof(ManifestResourceInfoTests).GetTypeInfo().Assembly;
|
||||
|
@@ -21,12 +21,11 @@ namespace System.Reflection.Tests
|
||||
Assert.Equal(GetMembers(new Dictionary<int, string>().GetType()), GetMembers(new Dictionary<int, int>().GetType()));
|
||||
Assert.Equal(GetMembers(typeof(int)), GetMembers(typeof(int)));
|
||||
Assert.Equal(GetMembers(typeof(Dictionary<,>)), GetMembers(typeof(Dictionary<,>)));
|
||||
Assert.NotEqual(GetMembers(new Dictionary<int, string>().GetType()), GetMembers(new HashSet<int>().GetType()));
|
||||
}
|
||||
|
||||
private IEnumerable<int> GetMembers(Type type)
|
||||
{
|
||||
return type.GetTypeInfo().GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).Select(m => m.MetadataToken);
|
||||
return type.GetTypeInfo().GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).Select(m => m.HasMetadataToken() ? m.MetadataToken : 0);
|
||||
}
|
||||
|
||||
#pragma warning disable 0067, 0169
|
||||
|
@@ -318,14 +318,14 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void MakeGenericMethod_Invalid()
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>("methodInstantiation", () => GetMethod(typeof(MI_SubClass), nameof(MI_SubClass.GenericMethod1)).MakeGenericMethod(null)); // TypeArguments is null
|
||||
Assert.Throws<ArgumentNullException>(null, () => GetMethod(typeof(MI_SubClass), nameof(MI_SubClass.GenericMethod2)).MakeGenericMethod(typeof(string), null)); // TypeArguments has null Type
|
||||
Assert.Throws<ArgumentNullException>(() => GetMethod(typeof(MI_SubClass), nameof(MI_SubClass.GenericMethod1)).MakeGenericMethod(null)); // TypeArguments is null
|
||||
Assert.Throws<ArgumentNullException>(() => GetMethod(typeof(MI_SubClass), nameof(MI_SubClass.GenericMethod2)).MakeGenericMethod(typeof(string), null)); // TypeArguments has null Type
|
||||
Assert.Throws<InvalidOperationException>(() => GetMethod(typeof(MI_SubClass), nameof(MI_SubClass.VoidMethodReturningInt)).MakeGenericMethod(typeof(int))); // Method is non generic
|
||||
|
||||
// Number of typeArguments does not match
|
||||
Assert.Throws<ArgumentException>(null, () => GetMethod(typeof(MI_SubClass), nameof(MI_SubClass.GenericMethod1)).MakeGenericMethod());
|
||||
Assert.Throws<ArgumentException>(null, () => GetMethod(typeof(MI_SubClass), nameof(MI_SubClass.GenericMethod1)).MakeGenericMethod(typeof(string), typeof(int)));
|
||||
Assert.Throws<ArgumentException>(null, () => GetMethod(typeof(MI_SubClass), nameof(MI_SubClass.GenericMethod2)).MakeGenericMethod(typeof(int)));
|
||||
Assert.Throws<ArgumentException>(() => GetMethod(typeof(MI_SubClass), nameof(MI_SubClass.GenericMethod1)).MakeGenericMethod());
|
||||
Assert.Throws<ArgumentException>(() => GetMethod(typeof(MI_SubClass), nameof(MI_SubClass.GenericMethod1)).MakeGenericMethod(typeof(string), typeof(int)));
|
||||
Assert.Throws<ArgumentException>(() => GetMethod(typeof(MI_SubClass), nameof(MI_SubClass.GenericMethod2)).MakeGenericMethod(typeof(int)));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
@@ -28,23 +28,13 @@ namespace System.Reflection.Tests
|
||||
Assert.Equal(typeInfo.Assembly, module.Assembly);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(int))]
|
||||
[InlineData(typeof(List<>))]
|
||||
[InlineData(typeof(ModuleTest))]
|
||||
public void FullyQualifiedName(TypeInfo typeInfo)
|
||||
{
|
||||
Module module = typeInfo.Module;
|
||||
Assert.Contains(typeInfo.Assembly.GetName().Name, module.FullyQualifiedName, StringComparison.CurrentCultureIgnoreCase);
|
||||
Assert.Contains(typeInfo.Assembly.GetName().Name, module.Name, StringComparison.CurrentCultureIgnoreCase);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(Attr), 77, "AttrSimple")]
|
||||
[InlineData(typeof(Int32Attr), 77, "Int32AttrSimple")]
|
||||
[InlineData(typeof(Int64Attr), (long)77, "Int64AttrSimple")]
|
||||
[InlineData(typeof(StringAttr), "hello", "StringAttrSimple")]
|
||||
[InlineData(typeof(EnumAttr), PublicEnum.Case1, "EnumAttrSimple")]
|
||||
[InlineData(typeof(EnumAttr), PublicEnum.Case1, "EnumAttrSimple")]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Custom Attributes on Modules not supported on UapAot.")]
|
||||
public void CustomAttributes<CtorArg, NamedArg>(Type attrType, CtorArg expectedCtorValue, NamedArg expectedNamedValue)
|
||||
{
|
||||
Module module = typeof(ModuleTest).GetTypeInfo().Module;
|
||||
|
@@ -151,10 +151,7 @@ namespace System.Reflection.Tests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(OptionalAttribute))]
|
||||
[InlineData(typeof(MarshalAsAttribute))]
|
||||
[InlineData(typeof(OutAttribute))]
|
||||
[InlineData(typeof(InAttribute))]
|
||||
[MemberData(nameof(s_CustomAttributesTestData))]
|
||||
public void CustomAttributesTest(Type attrType)
|
||||
{
|
||||
ParameterInfo parameterInfo = GetParameterInfo(typeof(ParameterInfoMetadata), "MethodWithOptionalDefaultOutInMarshalParam", 0);
|
||||
@@ -172,6 +169,20 @@ namespace System.Reflection.Tests
|
||||
Assert.True(prov.IsDefined(attrType, true));
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> s_CustomAttributesTestData
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new object[] { typeof(OptionalAttribute) };
|
||||
yield return new object[] { typeof(OutAttribute) };
|
||||
yield return new object[] { typeof(InAttribute) };
|
||||
if (!PlatformDetection.IsNetNative) // Native Metadata format does not expose FieldMarshal info: https://github.com/dotnet/corert/issues/3366
|
||||
{
|
||||
yield return new object[] { typeof(MarshalAsAttribute) };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(ParameterInfoMetadata), "Method1", 0, new Type[0])]
|
||||
[InlineData(typeof(ParameterInfoMetadata), "VirtualMethod", 0, new Type[0])]
|
||||
|
@@ -24,7 +24,11 @@
|
||||
<Compile Include="ReflectionContextTests.cs" />
|
||||
<Compile Include="TypeInfoTests.cs" />
|
||||
<Compile Include="ExceptionTests.cs" />
|
||||
<Compile Include="FieldInfoTests.netstandard.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="$(CommonTestPath)\System\PlatformDetection.cs">
|
||||
<Link>Common\System\PlatformDetection.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\EmbeddedImage.png">
|
||||
@@ -41,4 +45,4 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
</Project>
|
||||
|
@@ -388,8 +388,8 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void GetEnumName_Invalid()
|
||||
{
|
||||
Assert.Throws<ArgumentException>("value", () => typeof(NonGenericClassWithNoInterfaces).GetTypeInfo().GetEnumName(""));
|
||||
Assert.Throws<ArgumentNullException>("value", () => typeof(IntEnum).GetTypeInfo().GetEnumName(null));
|
||||
Assert.Throws<ArgumentException>(() => typeof(NonGenericClassWithNoInterfaces).GetTypeInfo().GetEnumName(""));
|
||||
Assert.Throws<ArgumentNullException>(() => typeof(IntEnum).GetTypeInfo().GetEnumName(null));
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> GetEnumNames_TestData()
|
||||
@@ -408,7 +408,7 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void GetEnumNames_TypeNotEnum_ThrowsArgumentException()
|
||||
{
|
||||
Assert.Throws<ArgumentException>("enumType", () => typeof(NonGenericClassWithNoInterfaces).GetTypeInfo().GetEnumNames());
|
||||
Assert.Throws<ArgumentException>(() => typeof(NonGenericClassWithNoInterfaces).GetTypeInfo().GetEnumNames());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -422,13 +422,22 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void GetEnumUnderlyingType_TypeNotEnum_ThrowsArgumentException()
|
||||
{
|
||||
Assert.Throws<ArgumentException>("enumType", () => typeof(NonGenericClassWithNoInterfaces).GetTypeInfo().GetEnumUnderlyingType());
|
||||
Assert.Throws<ArgumentException>(() => typeof(NonGenericClassWithNoInterfaces).GetTypeInfo().GetEnumUnderlyingType());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(IntEnum), new IntEnum[] { (IntEnum)1, (IntEnum)2, (IntEnum)10, (IntEnum)18, (IntEnum)45 })]
|
||||
[InlineData(typeof(UIntEnum), new UIntEnum[] { (UIntEnum)1, (UIntEnum)10 })]
|
||||
public static void GetEnumValues(Type enumType, Array expected)
|
||||
[Fact]
|
||||
public static void GetEnumValues_Int()
|
||||
{
|
||||
GetEnumValues(typeof(IntEnum), new IntEnum[] { (IntEnum)1, (IntEnum)2, (IntEnum)10, (IntEnum)18, (IntEnum)45 });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public static void GetEnumValues_UInt()
|
||||
{
|
||||
GetEnumValues(typeof(UIntEnum), new UIntEnum[] { (UIntEnum)1, (UIntEnum)10 });
|
||||
}
|
||||
|
||||
private static void GetEnumValues(Type enumType, Array expected)
|
||||
{
|
||||
Assert.Equal(expected, enumType.GetTypeInfo().GetEnumValues());
|
||||
}
|
||||
@@ -436,7 +445,7 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void GetEnumValues_TypeNotEnum_ThrowsArgumentException()
|
||||
{
|
||||
Assert.Throws<ArgumentException>("enumType", () => typeof(NonGenericClassWithNoInterfaces).GetTypeInfo().GetEnumUnderlyingType());
|
||||
Assert.Throws<ArgumentException>(() => typeof(NonGenericClassWithNoInterfaces).GetTypeInfo().GetEnumUnderlyingType());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -450,8 +459,8 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void IsEnumDefined_Invalid()
|
||||
{
|
||||
Assert.Throws<ArgumentException>("", () => typeof(NonGenericClassWithNoInterfaces).GetTypeInfo().IsEnumDefined(10));
|
||||
Assert.Throws<ArgumentNullException>("value", () => typeof(IntEnum).GetTypeInfo().IsEnumDefined(null));
|
||||
Assert.Throws<ArgumentException>(() => typeof(NonGenericClassWithNoInterfaces).GetTypeInfo().IsEnumDefined(10));
|
||||
Assert.Throws<ArgumentNullException>(() => typeof(IntEnum).GetTypeInfo().IsEnumDefined(null));
|
||||
Assert.Throws<InvalidOperationException>(() => typeof(IntEnum).GetTypeInfo().IsEnumDefined(new NonGenericClassWithNoInterfaces()));
|
||||
}
|
||||
|
||||
@@ -695,9 +704,9 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void GetMethod_Invalid()
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>("name", () => typeof(MembersClass).GetTypeInfo().GetMethod(null));
|
||||
Assert.Throws<ArgumentNullException>("types", () => typeof(MembersClass).GetTypeInfo().GetMethod("p", null));
|
||||
Assert.Throws<ArgumentNullException>("types", () => typeof(MembersClass).GetTypeInfo().GetMethod("p", new Type[] { typeof(int), null }));
|
||||
Assert.Throws<ArgumentNullException>(() => typeof(MembersClass).GetTypeInfo().GetMethod(null));
|
||||
Assert.Throws<ArgumentNullException>(() => typeof(MembersClass).GetTypeInfo().GetMethod("p", null));
|
||||
Assert.Throws<ArgumentNullException>(() => typeof(MembersClass).GetTypeInfo().GetMethod("p", new Type[] { typeof(int), null }));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -837,7 +846,7 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void GetEvent_NullName_ThrowsArgumentNullException()
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>(null, () => typeof(MembersClass).GetTypeInfo().GetEvent(null));
|
||||
Assert.Throws<ArgumentNullException>(() => typeof(MembersClass).GetTypeInfo().GetEvent(null));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -877,7 +886,7 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void GetField_NullName_ThrowsArgumentNullException()
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>(null, () => typeof(MembersClass).GetTypeInfo().GetField(null));
|
||||
Assert.Throws<ArgumentNullException>(() => typeof(MembersClass).GetTypeInfo().GetField(null));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -930,19 +939,19 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void GetDeclaredEvent_NullName_ThrowsArgumentNullException()
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>(null, () => typeof(TI_BaseClass).GetTypeInfo().GetDeclaredEvent(null));
|
||||
Assert.Throws<ArgumentNullException>(() => typeof(TI_BaseClass).GetTypeInfo().GetDeclaredEvent(null));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetDeclaredField_NullName_ThrowsArgumentNullException()
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>(null, () => typeof(TI_BaseClass).GetTypeInfo().GetDeclaredField(null));
|
||||
Assert.Throws<ArgumentNullException>(() => typeof(TI_BaseClass).GetTypeInfo().GetDeclaredField(null));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetDeclaredMethod_NullName_ThrowsArgumentNullException()
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>("name", () => typeof(TI_BaseClass).GetTypeInfo().GetDeclaredMethod(null));
|
||||
Assert.Throws<ArgumentNullException>(() => typeof(TI_BaseClass).GetTypeInfo().GetDeclaredMethod(null));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -958,7 +967,7 @@ namespace System.Reflection.Tests
|
||||
[Fact]
|
||||
public void GetDeclaredNestedType_NullName_ThrowsArgumentNullException()
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>(null, () => typeof(TI_BaseClass).GetTypeInfo().GetDeclaredNestedType(null));
|
||||
Assert.Throws<ArgumentNullException>(() => typeof(TI_BaseClass).GetTypeInfo().GetDeclaredNestedType(null));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -1008,7 +1017,6 @@ namespace System.Reflection.Tests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(string), 1)]
|
||||
[InlineData(typeof(int), 2)]
|
||||
[InlineData(typeof(char*), 3)]
|
||||
[InlineData(typeof(int), 3)]
|
||||
@@ -1019,6 +1027,15 @@ namespace System.Reflection.Tests
|
||||
Assert.Equal(rank, arrayType.GetArrayRank());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(string))]
|
||||
public void MakeArrayType_IntRank1(Type type)
|
||||
{
|
||||
Type arrayType = type.GetType().MakeArrayType(1);
|
||||
Assert.True(arrayType.IsArray);
|
||||
Assert.Equal(1, arrayType.GetArrayRank());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(int))]
|
||||
[InlineData(typeof(string))]
|
||||
|
Reference in New Issue
Block a user