Skip to content
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

Please consider adding WriteToServer(Span<T> elements) method #10

Open
toomasz opened this issue Jan 11, 2019 · 3 comments
Open

Please consider adding WriteToServer(Span<T> elements) method #10

toomasz opened this issue Jan 11, 2019 · 3 comments

Comments

@toomasz
Copy link

toomasz commented Jan 11, 2019

It would be nice to have support for new .NET Span api.

@ErikEJ
Copy link
Owner

ErikEJ commented Jan 11, 2019

?? PRs accepted!

@toomasz
Copy link
Author

toomasz commented Jan 11, 2019

I just tried to investigate if it's easy to add it. Unfortunately it's not.
First I would have to bump C# version to 7.3 and .net framework to 4.7.1 since Span is ref struct, not sure if thats acceptable for your project.
Then one would have to copy

private void WriteToServer(ISqlCeBulkCopyInsertAdapter adapter)
as adapter implementing ISqlCeBulkCopyInsertAdapter cannot be used for Span(Span is ref struct, in can only be member of ref struct which cannot implement interface, its stack only structure)
It seems heavy refactoring would be needed here.

@ErikEJ
Copy link
Owner

ErikEJ commented Jan 11, 2019

1: You can just create a new csproj (as a copy) and target it to .NET 4.7.1

2: Since this is a private method, you can just implement using Span, no need to touch the interface or it's implementaton

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

No branches or pull requests

2 participants