diff --git a/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj
index 954e3f93d45b68..e7bc9f326cbd95 100644
--- a/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -239,7 +239,6 @@
-
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Array.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Array.Mono.cs
index 6fe0f5b082cbf4..00041067b23ffb 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Array.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Array.Mono.cs
@@ -534,6 +534,7 @@ private void SetGenericValueImpl(int pos, ref T value)
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern void SetValueRelaxedImpl(object? value, int pos);
+#pragma warning disable CA1822
/*
* These methods are used to implement the implicit generic interfaces
* implemented by arrays in NET 2.0.
@@ -637,5 +638,6 @@ internal void InternalArray__set_Item(int index, T item)
// Do not change this to call SetGenericValue_icall directly, due to special casing in the runtime.
SetGenericValueImpl(index, ref item);
}
+#pragma warning restore CA1822
}
}
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Diagnostics/StackFrame.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Diagnostics/StackFrame.Mono.cs
index e3912106ffb236..c4d73bb865da0a 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Diagnostics/StackFrame.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Diagnostics/StackFrame.Mono.cs
@@ -45,7 +45,7 @@ private void BuildStackFrame(int skipFrames, bool needFileInfo)
}
}
- private bool AppendStackFrameWithoutMethodBase(StringBuilder sb) => false;
+ private static bool AppendStackFrameWithoutMethodBase(StringBuilder sb) => false;
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern bool get_frame_info(int skipFrames, bool needFileInfo,
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/MulticastDelegate.cs b/src/mono/netcore/System.Private.CoreLib/src/System/MulticastDelegate.cs
index afc71ba0224182..5582c760b6c2aa 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/MulticastDelegate.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/MulticastDelegate.cs
@@ -167,7 +167,7 @@ protected sealed override Delegate CombineImpl(Delegate? follow)
}
/* Based on the Boyer-Moore string search algorithm */
- private int LastIndexOf(Delegate[] haystack, Delegate[] needle)
+ private static int LastIndexOf(Delegate[] haystack, Delegate[] needle)
{
if (haystack.Length < needle.Length)
return -1;
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs
index d0433ed0bbc662..34eaf34c90ceae 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs
@@ -419,61 +419,14 @@ public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
SetCustomAttribute(new CustomAttributeBuilder(con, binaryAttribute));
}
- private Exception not_supported()
+ private static Exception not_supported()
{
// Strange message but this is what MS.NET prints...
return new NotSupportedException("The invoked member is not supported in a dynamic module.");
}
- private string create_assembly_version(string version)
- {
- string[] parts = version.Split('.');
- int[] ver = new int[4] { 0, 0, 0, 0 };
-
- if ((parts.Length < 0) || (parts.Length > 4))
- throw new ArgumentException("The version specified '" + version + "' is invalid");
-
- for (int i = 0; i < parts.Length; ++i)
- {
- if (parts[i] == "*")
- {
- DateTime now = DateTime.Now;
-
- if (i == 2)
- {
- ver[2] = (now - new DateTime(2000, 1, 1)).Days;
- if (parts.Length == 3)
- ver[3] = (now.Second + (now.Minute * 60) + (now.Hour * 3600)) / 2;
- }
- else
- if (i == 3)
- ver[3] = (now.Second + (now.Minute * 60) + (now.Hour * 3600)) / 2;
- else
- throw new ArgumentException("The version specified '" + version + "' is invalid");
- }
- else
- {
- try
- {
- ver[i] = int.Parse(parts[i]);
- }
- catch (FormatException)
- {
- throw new ArgumentException("The version specified '" + version + "' is invalid");
- }
- }
- }
-
- return ver[0] + "." + ver[1] + "." + ver[2] + "." + ver[3];
- }
-
- private string GetCultureString(string str)
- {
- return (str == "neutral" ? string.Empty : str);
- }
-
/*Warning, @typeArguments must be a mscorlib internal array. So make a copy before passing it in*/
- internal Type MakeGenericType(Type gtd, Type[] typeArguments)
+ internal static Type MakeGenericType(Type gtd, Type[] typeArguments)
{
return new TypeBuilderInstantiation(gtd, typeArguments);
}
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorBuilder.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorBuilder.Mono.cs
index 543fedda6cba9b..9652c83847a73c 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorBuilder.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorBuilder.Mono.cs
@@ -387,17 +387,17 @@ private void RejectIfCreated()
throw new InvalidOperationException("Type definition of the method is complete.");
}
- private Exception not_supported()
+ private static Exception not_supported()
{
return new NotSupportedException("The invoked member is not supported in a dynamic module.");
}
- private Exception not_after_created()
+ private static Exception not_after_created()
{
return new InvalidOperationException("Unable to change after type has been created.");
}
- private Exception not_created()
+ private static Exception not_created()
{
return new NotSupportedException("The type is not yet created.");
}
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.Mono.cs
index c7834c104bd04c..7f26920c5e52d8 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.Mono.cs
@@ -112,7 +112,7 @@ public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs,
Initialize(con, constructorArgs, namedProperties, propertyValues, namedFields, fieldValues);
}
- private bool IsValidType(Type t)
+ private static bool IsValidType(Type t)
{
/* FIXME: Add more checks */
if (t.IsArray && t.GetArrayRank() > 1)
@@ -130,7 +130,7 @@ private bool IsValidType(Type t)
return true;
}
- private bool IsValidParam(object o, Type paramType)
+ private static bool IsValidParam(object o, Type paramType)
{
Type t = o.GetType();
if (!IsValidType(t))
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.Mono.cs
index 94645b40a2ec62..395c721ddea170 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.Mono.cs
@@ -234,7 +234,7 @@ public override void SetValue(object? obj, object? val, BindingFlags invokeAttr,
throw CreateNotSupportedException();
}
- private Exception CreateNotSupportedException()
+ private static Exception CreateNotSupportedException()
{
return new NotSupportedException("The invoked member is not supported in a dynamic module.");
}
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs
index c9109b0cee0082..875e6fdabdd9ce 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs
@@ -450,7 +450,7 @@ public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
SetCustomAttribute(new CustomAttributeBuilder(con, binaryAttribute));
}
- private Exception not_supported()
+ private static Exception not_supported()
{
return new NotSupportedException();
}
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.Mono.cs
index 55d20dff97839a..3a68f0e9064f5e 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.Mono.cs
@@ -57,18 +57,8 @@ internal struct ILExceptionBlock
internal int len;
internal int filter_offset;
#endregion
-
- internal void Debug()
- {
-#if FALSE
- System.Console.Write ("\ttype="+type.ToString()+" start="+start.ToString()+" len="+len.ToString());
- if (extype != null)
- System.Console.WriteLine (" extype="+extype.ToString());
- else
- System.Console.WriteLine (String.Empty);
-#endif
- }
}
+
internal struct ILExceptionInfo
{
#region Sync with MonoILExceptionInfo in object-internals.h
@@ -153,15 +143,6 @@ internal void PatchFilterClause(int start)
}
}
- internal void Debug(int b)
- {
-#if FALSE
- System.Console.WriteLine ("Handler {0} at {1}, len: {2}", b, start, len);
- for (int i = 0; i < handlers.Length; ++i)
- handlers [i].Debug ();
-#endif
- }
-
private void add_block(int offset)
{
if (handlers != null)
@@ -947,13 +928,9 @@ public virtual void EndExceptionBlock()
InternalEndClause();
MarkLabel(ex_handlers[cur_block].end);
ex_handlers[cur_block].End(code_len);
- ex_handlers[cur_block].Debug(cur_block);
- //System.Console.WriteLine ("End Block {0} (handlers: {1})", cur_block, ex_handlers [cur_block].NumHandlers ());
open_blocks.Pop();
if (open_blocks.Count > 0)
cur_block = (int)open_blocks.Peek()!;
- //Console.WriteLine ("curblock restored to {0}", cur_block);
- //throw new NotImplementedException ();
}
public virtual void EndScope()
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.Mono.cs
index 6f6968fc4a5949..c3eb5e2752cbd9 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.Mono.cs
@@ -534,7 +534,7 @@ internal override int get_next_table_index(object obj, int table, int count)
return type.get_next_table_index(obj, table, count);
}
- private void ExtendArray([NotNull] ref T[]? array, T elem)
+ private static void ExtendArray([NotNull] ref T[]? array, T elem)
{
if (array == null)
{
@@ -560,7 +560,7 @@ private void RejectIfCreated()
throw new InvalidOperationException("Type definition of the method is complete.");
}
- private Exception NotSupported()
+ private static Exception NotSupported()
{
return new NotSupportedException("The invoked member is not supported in a dynamic module.");
}
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.Mono.cs
index 9a4333b973d87b..34d97488d22e7e 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.Mono.cs
@@ -372,7 +372,7 @@ public EnumBuilder DefineEnum(string name, TypeAttributes visibility, Type under
return GetType(className, false, ignoreCase);
}
- private TypeBuilder? search_in_array(TypeBuilder[] arr, int validElementsInArray, ITypeName className)
+ private static TypeBuilder? search_in_array(TypeBuilder[] arr, int validElementsInArray, ITypeName className)
{
int i;
for (i = 0; i < validElementsInArray; ++i)
@@ -385,7 +385,7 @@ public EnumBuilder DefineEnum(string name, TypeAttributes visibility, Type under
return null;
}
- private TypeBuilder? search_nested_in_array(TypeBuilder[] arr, int validElementsInArray, ITypeName className)
+ private static TypeBuilder? search_nested_in_array(TypeBuilder[] arr, int validElementsInArray, ITypeName className)
{
int i;
for (i = 0; i < validElementsInArray; ++i)
@@ -396,7 +396,7 @@ public EnumBuilder DefineEnum(string name, TypeAttributes visibility, Type under
return null;
}
- private TypeBuilder? GetMaybeNested(TypeBuilder t, IEnumerable nested)
+ private static TypeBuilder? GetMaybeNested(TypeBuilder t, IEnumerable nested)
{
TypeBuilder? result = t;
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.Mono.cs
index 082900fa8cee41..d245d8bf1aa69c 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.Mono.cs
@@ -229,7 +229,7 @@ public override Module Module
}
}
- private Exception not_supported()
+ private static Exception not_supported()
{
return new NotSupportedException("The invoked member is not supported in a dynamic module.");
}
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.Mono.cs
index 86141ae32e378e..454f784e1a2211 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.Mono.cs
@@ -1121,7 +1121,7 @@ public override MemberInfo[] GetMembers(BindingFlags bindingAttr)
return created!.GetMembers(bindingAttr);
}
- private MethodInfo[] GetMethodsByName(string? name, BindingFlags bindingAttr, bool ignoreCase, Type reflected_type)
+ private MethodInfo[] GetMethodsByName(string? name, BindingFlags bindingAttr, bool ignoreCase)
{
MethodInfo[]? candidates;
bool match;
@@ -1221,7 +1221,7 @@ public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
{
check_created();
- return GetMethodsByName(null, bindingAttr, false, this);
+ return GetMethodsByName(null, bindingAttr, false);
}
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)]
@@ -1411,7 +1411,7 @@ public override Type MakeGenericType(params Type[] typeArguments)
Type[] copy = new Type[typeArguments.Length];
typeArguments.CopyTo(copy, 0);
- return pmodule.assemblyb.MakeGenericType(this, copy);
+ return AssemblyBuilder.MakeGenericType(this, copy);
}
public override Type MakePointerType()
@@ -1682,7 +1682,7 @@ internal bool is_created
}
}
- private Exception not_supported()
+ private static Exception not_supported()
{
return new NotSupportedException("The invoked member is not supported in a dynamic module.");
}
@@ -1699,7 +1699,7 @@ private void check_created()
throw not_supported();
}
- private void check_name(string argName, string name)
+ private static void check_name(string argName, string name)
{
if (name == null)
throw new ArgumentNullException(argName);
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs
index dfa028faaaebe8..aed5ad63d2e787 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs
@@ -50,14 +50,6 @@ internal class RuntimeFieldInfo : RtFieldInfo
private FieldAttributes attrs;
#pragma warning restore 649
- internal BindingFlags BindingFlags
- {
- get
- {
- return 0;
- }
- }
-
public override Module Module
{
get
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs
index 8176663873b356..47de4bd37684b6 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs
@@ -149,14 +149,6 @@ internal class RuntimeMethodInfo : MethodInfo
#endregion
private string? toString;
- internal BindingFlags BindingFlags
- {
- get
- {
- return 0;
- }
- }
-
public override Module Module
{
get
@@ -794,14 +786,6 @@ internal RuntimeModule GetRuntimeModule()
return RuntimeTypeHandle.GetModule((RuntimeType)DeclaringType);
}
- internal BindingFlags BindingFlags
- {
- get
- {
- return 0;
- }
- }
-
private RuntimeType? ReflectedTypeInternal
{
get
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
index 6449e9743dc7a0..b725f72ec60a23 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
@@ -191,7 +191,7 @@ object[] GetCustomAttributes(Type attributeType, bool inherit)
return CustomAttribute.GetCustomAttributes(this, attributeType, inherit);
}
- internal object? GetDefaultValueImpl(ParameterInfo pinfo)
+ internal static object? GetDefaultValueImpl(ParameterInfo pinfo)
{
FieldInfo field = typeof(ParameterInfo).GetField("DefaultValueImpl", BindingFlags.Instance | BindingFlags.NonPublic)!;
return field.GetValue(pinfo);
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Runtime/InteropServices/CriticalHandle.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Runtime/InteropServices/CriticalHandle.Mono.cs
deleted file mode 100644
index 1c142a0754fef3..00000000000000
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Runtime/InteropServices/CriticalHandle.Mono.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Runtime.InteropServices
-{
- public partial class CriticalHandle
- {
- private void ReleaseHandleFailed()
- {
- }
- }
-}
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/RuntimeType.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/RuntimeType.Mono.cs
index 779ef830f6f473..f3f18653d97e2c 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/RuntimeType.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/RuntimeType.Mono.cs
@@ -422,20 +422,20 @@ private static bool FilterApplyMethodInfo(
RuntimeMethodInfo method, BindingFlags bindingFlags, CallingConventions callConv, Type[]? argumentTypes)
{
// Optimization: Pre-Calculate the method binding flags to avoid casting.
- return FilterApplyMethodBase(method, method.BindingFlags, bindingFlags, callConv, argumentTypes);
+ return FilterApplyMethodBase(method, bindingFlags, callConv, argumentTypes);
}
private static bool FilterApplyConstructorInfo(
RuntimeConstructorInfo constructor, BindingFlags bindingFlags, CallingConventions callConv, Type[]? argumentTypes)
{
// Optimization: Pre-Calculate the method binding flags to avoid casting.
- return FilterApplyMethodBase(constructor, constructor.BindingFlags, bindingFlags, callConv, argumentTypes);
+ return FilterApplyMethodBase(constructor, bindingFlags, callConv, argumentTypes);
}
// Used by GetMethodCandidates/GetConstructorCandidates, InvokeMember, and CreateInstanceImpl to perform the necessary filtering.
// Should only be called by FilterApplyMethodInfo and FilterApplyConstructorInfo.
private static bool FilterApplyMethodBase(
- MethodBase methodBase, BindingFlags methodFlags, BindingFlags bindingFlags, CallingConventions callConv, Type[]? argumentTypes)
+ MethodBase methodBase, BindingFlags bindingFlags, CallingConventions callConv, Type[]? argumentTypes)
{
Debug.Assert(methodBase != null);
@@ -670,7 +670,7 @@ private ListBuilder GetEventCandidates(string? name, BindingFlags bin
MemberListType listType;
FilterHelper(bindingAttr, ref name, allowPrefixLookup, out prefixLookup, out ignoreCase, out listType);
- RuntimeEventInfo[] cache = GetEvents_internal(name, bindingAttr, listType, this);
+ RuntimeEventInfo[] cache = GetEvents_internal(name, listType, this);
bindingAttr ^= BindingFlags.DeclaredOnly;
ListBuilder candidates = new ListBuilder(cache.Length);
@@ -700,8 +700,7 @@ private ListBuilder GetFieldCandidates(string? name, BindingFlags bin
for (int i = 0; i < cache.Length; i++)
{
RuntimeFieldInfo fieldInfo = cache[i];
- if ((bindingAttr & fieldInfo.BindingFlags) == fieldInfo.BindingFlags &&
- (!prefixLookup || FilterApplyPrefixLookup(fieldInfo, name, ignoreCase)))
+ if ((!prefixLookup || FilterApplyPrefixLookup(fieldInfo, name, ignoreCase)))
{
candidates.Add(fieldInfo);
}
@@ -928,7 +927,7 @@ public override MemberInfo[] GetMembers(BindingFlags bindingAttr)
MemberListType listType;
FilterHelper(bindingAttr, ref name!, out ignoreCase, out listType);
- RuntimeEventInfo[] cache = GetEvents_internal(name, bindingAttr, listType, this);
+ RuntimeEventInfo[] cache = GetEvents_internal(name, listType, this);
EventInfo? match = null;
bindingAttr ^= BindingFlags.DeclaredOnly;
@@ -966,7 +965,6 @@ public override MemberInfo[] GetMembers(BindingFlags bindingAttr)
for (int i = 0; i < cache.Length; i++)
{
RuntimeFieldInfo fieldInfo = cache[i];
- if ((bindingAttr & fieldInfo.BindingFlags) == fieldInfo.BindingFlags)
{
if (match != null)
{
@@ -2440,7 +2438,7 @@ private RuntimeFieldInfo[] GetFields_internal(string? name, BindingFlags binding
}
}
- private RuntimeEventInfo[] GetEvents_internal(string? name, BindingFlags bindingAttr, MemberListType listType, RuntimeType reflectedType)
+ private RuntimeEventInfo[] GetEvents_internal(string? name, MemberListType listType, RuntimeType reflectedType)
{
var refh = new RuntimeTypeHandle(reflectedType);
using (var namePtr = new Mono.SafeStringMarshal(name))
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Text/Utf8Span.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Text/Utf8Span.cs
index 5ab933e8c847e1..b3ffff505534bf 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Text/Utf8Span.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Text/Utf8Span.cs
@@ -85,11 +85,6 @@ public override string ToString()
throw new PlatformNotSupportedException();
}
- internal unsafe string ToStringNoReplacement()
- {
- throw new PlatformNotSupportedException();
- }
-
public Utf8String ToUtf8String()
{
throw new PlatformNotSupportedException();
diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs
index 47b26c9dfb9f78..05fda86297391e 100644
--- a/src/mono/netcore/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs
+++ b/src/mono/netcore/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs
@@ -301,7 +301,7 @@ public static bool Yield()
return YieldInternal();
}
- private bool TrySetApartmentStateUnchecked(ApartmentState state) => state == ApartmentState.Unknown;
+ private static bool TrySetApartmentStateUnchecked(ApartmentState state) => state == ApartmentState.Unknown;
private ThreadState ValidateThreadState()
{