Skip to content

[WIP] Moving towards .NET Standard/.NET Core compatibility - #2134

Closed
alexvaluyskiy wants to merge 1 commit into
akkadotnet:devfrom
alexvaluyskiy:netcore
Closed

alexvaluyskiy wants to merge 1 commit into
akkadotnet:devfrom
alexvaluyskiy:netcore

Conversation

@alexvaluyskiy

@alexvaluyskiy alexvaluyskiy commented Jul 5, 2016

Copy link
Copy Markdown
Contributor

!Important! This PR is not about introducing NET CLI or xproj/project.json in the source code. It makes the source code easier to introduce .NET Platform compatibility in the future.

I used some ideas from this thread #992

Right now the sources match NetStandard 1.5, but it possible to achieve 1.3 in the future

foreach (var typeName in typeNames)
{
var rebalanceEnabled = string.Equals(typeName, "rebalancing", StringComparison.InvariantCultureIgnoreCase);
var rebalanceEnabled = string.Equals(typeName, "rebalancing", StringComparison.OrdinalIgnoreCase);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MS recommends to replace InvariantCultureIgnoreCase to OrdinalIgnoreCase in many cases

@alexvaluyskiy alexvaluyskiy added this to the 1.5.0 milestone Jul 5, 2016
@alexvaluyskiy alexvaluyskiy changed the title [WIP] Moving towards .NET Standard compatibility [WIP] Moving towards .NET Standard/.NET Core compatibility Jul 5, 2016
@alexvaluyskiy alexvaluyskiy modified the milestones: 1.2.0, 1.5.0 Jul 6, 2016
@alexvaluyskiy

alexvaluyskiy commented Jul 7, 2016

Copy link
Copy Markdown
Contributor Author

@akkadotnet/developers So, the main question. What should we do with BinarySerialization in exceptions, and with SerializableAttribute? We could just remove it, as many projects did. Or we can add compilation directives, as I did here

Akka.Net doesn't use BinarySerialization. So, why we are using these attributes?

@Aaronontheweb

Copy link
Copy Markdown
Member

paging @JeffCyr - questions about unsafe threading on .NET Core :p

@alexvaluyskiy
alexvaluyskiy force-pushed the netcore branch 4 times, most recently from 8c465ae to 0e95adf Compare July 7, 2016 20:56
{
if (CurrentInterpreter.Value[0] == null)
throw new ApplicationException("Something went terribly wrong!");
throw new InvalidOperationException("Something went terribly wrong!");

@alexvaluyskiy alexvaluyskiy Jul 7, 2016

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NetCore doesn't have ApplicationException, changed to InvalidOperationException

throw new ArgumentOutOfRangeException("numThreads", string.Format("numThreads must be at least 1. Was {0}", numThreads));
}
#else
public DedicatedThreadPoolSettings(int numThreads, string name = null, TimeSpan? deadlockTimeout = null)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a different constructor for NetCore version, without ApartmentState

@adamhathcock

Copy link
Copy Markdown

Say it ain't so!

@alexvaluyskiy

Copy link
Copy Markdown
Contributor Author

We should create a feature branch here instead of this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants