Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 50f8ab7

Browse files
committed
Update CoreRT for changes in shared partition
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
1 parent 9ddc4cf commit 50f8ab7

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/System.Private.CoreLib/shared/System/Delegate.cs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ namespace System
1111
{
1212
public abstract partial class Delegate : ICloneable, ISerializable
1313
{
14-
private Delegate()
15-
{
16-
}
17-
1814
public virtual object Clone() => MemberwiseClone();
1915

2016
public static Delegate? Combine(Delegate? a, Delegate? b)
@@ -37,8 +33,6 @@ private Delegate()
3733
return d;
3834
}
3935

40-
protected virtual Delegate CombineImpl(Delegate? d) => throw new MulticastNotSupportedException(SR.Multicast_Combine);
41-
4236
// V2 api: Creates open or closed delegates to static or instance methods - relaxed signature checking allowed.
4337
public static Delegate CreateDelegate(Type type, object? firstArgument, MethodInfo method) => CreateDelegate(type, firstArgument, method, throwOnBindFailure: true)!;
4438

@@ -53,19 +47,23 @@ private Delegate()
5347
public static Delegate CreateDelegate(Type type, Type target, string method) => CreateDelegate(type, target, method, ignoreCase: false, throwOnBindFailure: true)!;
5448
public static Delegate CreateDelegate(Type type, Type target, string method, bool ignoreCase) => CreateDelegate(type, target, method, ignoreCase, throwOnBindFailure: true)!;
5549

50+
#if !CORERT
51+
protected virtual Delegate CombineImpl(Delegate? d) => throw new MulticastNotSupportedException(SR.Multicast_Combine);
52+
53+
protected virtual Delegate? RemoveImpl(Delegate d) => d.Equals(this) ? null : this;
54+
55+
public virtual Delegate[] GetInvocationList() => new Delegate[] { this };
56+
5657
public object? DynamicInvoke(params object?[]? args)
5758
{
5859
return DynamicInvokeImpl(args);
5960
}
60-
61-
public virtual Delegate[] GetInvocationList() => new Delegate[] { this };
61+
#endif
6262

6363
public virtual void GetObjectData(SerializationInfo info, StreamingContext context) => throw new PlatformNotSupportedException();
6464

6565
public MethodInfo Method => GetMethodImpl();
6666

67-
protected virtual Delegate? RemoveImpl(Delegate d) => d.Equals(this) ? null : this;
68-
6967
public static Delegate? Remove(Delegate? source, Delegate? value)
7068
{
7169
if (source == null)

0 commit comments

Comments
 (0)