-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove restrictions required by netstandard 1.x but available in 2.0 #3790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
a43207d
98680a2
0e52d7a
5d6c75b
587a396
48929a5
b25daa0
bf43ec0
8a2abe8
23a583e
bd0bd38
47a8530
71e1b68
72d6823
d0008b1
b7c7611
0740894
f6a5df8
c8c4d0b
5b584c1
3dfd0c0
6422da1
c34b2a6
d0b5302
5bb8450
e53cc2c
6e33872
bd7e10c
68cc15b
0956e76
0a196e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,6 @@ public AsyncReplayTimeoutException(string message) | |
| { | ||
| } | ||
|
|
||
| #if SERIALIZATION | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't tell you how thrilled I am to get rid of this crap @heatonmatthew - so far, according to the CI system, the compiler and the test runtimes seem pretty happy with these changes so I don't have much to add on each individual change here. |
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="AsyncReplayTimeoutException"/> class. | ||
| /// </summary> | ||
|
|
@@ -53,7 +52,6 @@ protected AsyncReplayTimeoutException(SerializationInfo info, StreamingContext c | |
| : base(info, context) | ||
| { | ||
| } | ||
| #endif | ||
| } | ||
|
|
||
| /// <summary> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,11 +19,7 @@ | |
|
|
||
| namespace Akka.MultiNodeTestRunner | ||
| { | ||
| #if CORECLR | ||
| public class Discovery : IMessageSink, IDisposable | ||
| #else | ||
| public class Discovery : MarshalByRefObject, IMessageSink, IDisposable | ||
| #endif | ||
| { | ||
| public Dictionary<string, List<NodeTest>> Tests { get; set; } | ||
| public List<ErrorMessage> Errors { get; } = new List<ErrorMessage>(); | ||
|
|
@@ -48,12 +44,8 @@ public virtual bool OnMessage(IMessageSinkMessage message) | |
| case ITestCaseDiscoveryMessage testCaseDiscoveryMessage: | ||
| var testClass = testCaseDiscoveryMessage.TestClass.Class; | ||
| if (testClass.IsAbstract) return true; | ||
| #if CORECLR | ||
| var specType = testCaseDiscoveryMessage.TestAssembly.Assembly.GetType(testClass.Name).ToRuntimeType(); | ||
| #else | ||
| var testAssembly = Assembly.LoadFrom(testCaseDiscoveryMessage.TestAssembly.Assembly.AssemblyPath); | ||
| var specType = testAssembly.GetType(testClass.Name); | ||
| #endif | ||
| var roles = RoleNames(specType); | ||
|
|
||
| var details = roles.Select((r, i) => new NodeTest | ||
|
|
@@ -106,20 +98,11 @@ internal static ConstructorInfo FindConfigConstructor(Type configUser) | |
| var current = configUser; | ||
| while (current != null) | ||
| { | ||
|
|
||
| #if CORECLR | ||
| var ctorWithConfig = current | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is probably fine, but I'll need to see the feedback from the MNTR for certain |
||
| .GetConstructors(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance) | ||
| .FirstOrDefault(c => null != c.GetParameters().FirstOrDefault(p => p.ParameterType.GetTypeInfo().IsSubclassOf(baseConfigType))); | ||
|
|
||
| current = current.GetTypeInfo().BaseType; | ||
| #else | ||
| var ctorWithConfig = current | ||
| .GetConstructors(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance) | ||
| .FirstOrDefault(c => null != c.GetParameters().FirstOrDefault(p => p.ParameterType.IsSubclassOf(baseConfigType))); | ||
|
|
||
| current = current.BaseType; | ||
| #endif | ||
| if (ctorWithConfig != null) return ctorWithConfig; | ||
| } | ||
|
|
||
|
|
@@ -131,15 +114,9 @@ private object[] ConfigConstructorParamValues(Type configType) | |
| var ctors = configType.GetConstructors(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); | ||
| var empty = ctors.FirstOrDefault(c => !c.GetParameters().Any()); | ||
|
|
||
| #if CORECLR | ||
| return empty != null | ||
| ? new object[0] | ||
| : ctors.First().GetParameters().Select(p => p.ParameterType.GetTypeInfo().IsValueType ? Activator.CreateInstance(p.ParameterType) : null).ToArray(); | ||
| #else | ||
| return empty != null | ||
| ? new object[0] | ||
| : ctors.First().GetParameters().Select(p => p.ParameterType.IsValueType ? Activator.CreateInstance(p.ParameterType) : null).ToArray(); | ||
| #endif | ||
| } | ||
|
|
||
| /// <inheritdoc/> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build.fsx changes look fine.