Skip to content

Modernize ConnectionFactoryBase.cs#45

Open
rklec wants to merge 1 commit intomadhatter22:feature/drop-support-pre-netstandard2.0from
rklec:patch-8
Open

Modernize ConnectionFactoryBase.cs#45
rklec wants to merge 1 commit intomadhatter22:feature/drop-support-pre-netstandard2.0from
rklec:patch-8

Conversation

@rklec
Copy link

@rklec rklec commented Jun 4, 2024

Note the constructor of ConnectionFactoryBase is still quite heavy and does a lot of things. I've left it for now, but maybe needs adjustments. Also you may want to use https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces for the whole project.

* use nullable assertion, you may probably want to set `<Nullable>enable</Nullable>` in your project https://learn.microsoft.com/en-us/dotnet/csharp/nullable-migration-strategies
* merged many things into a pattern, see https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/patterns (suggested by Resharper)
* use new switch expression https://learn.microsoft.com/en-US/dotnet/csharp/language-reference/operators/switch-expression

Note zthe constructor of `ConnectionFactoryBase` is still quite heavy and does a lot of things. I've left it for now, but maybe needs adjustments.
Also you may want to use https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces for the whole project.
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.

1 participant