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

.NET Projections should not have WinRT types in them #36

Closed
stevenbrix opened this issue Jun 21, 2019 · 6 comments
Closed

.NET Projections should not have WinRT types in them #36

stevenbrix opened this issue Jun 21, 2019 · 6 comments
Assignees

Comments

@stevenbrix
Copy link
Contributor

the winrt to .net projections were never implemented fully properly and is really confusing. sometimes you use the regular .NET types, and in other places you use the WinRT version. I think that .net developers should use the APIs they are comfortable and used to using. On top of that, I've heard from customers that it makes code re-use and sharing more difficult.

Any API that uses xLang to project into .NET should use the .NET APIs that already exist, especially those in the System.ComponentModel, System.Collections, and System.IO namespaces.

@stevenbrix stevenbrix changed the title xlang type system .NET Projections should not have WinRT types in them Jun 21, 2019
@jtorjo
Copy link

jtorjo commented Nov 6, 2019

Many thumbs up for System.IO !
I want to use System.IO in my UWP project, since creating file queries using Windows Storage is insanely slow!

Also, see https://docs.microsoft.com/answers/questions/608/please-either-allow-systemio-all-over-hdd-or-drast.html

@stevenbrix
Copy link
Contributor Author

stevenbrix commented Nov 6, 2019

I want to use System.IO in my UWP project, since creating file queries using Windows Storage is insanely slow!

@jtorjo note that this ask was more around creating a projection layer that properly "hides" the Windows Storage APIs behind a subset of the System.IO APIs, so this wouldn't fix the perf issue. There are other possible solutions, such as defining an xlang interface that is implemented by .NET and UWP, allowing for a single API surface to be used across the different platforms that WinUI is targeting.

This would have to be elegantly done for the file system APIs, since UWP doesn't allow arbitrary file system operations. But I think for things like Streams and collections, this should be relatively straightforward

@jtorjo
Copy link

jtorjo commented Nov 7, 2019

There are other possible solutions, such as defining an xlang interface that is implemented by .NET and UWP, allowing for a single API surface to be used across the different platforms that WinUI is targeting.

@stevenbrix That could probably work. As longs as it's fast, I'll put up with it. Right now, StorageFolder query speeds are beyond horrible.

@kennykerr kennykerr transferred this issue from microsoft/xlang Dec 17, 2019
@Scottj1s
Copy link
Member

Scottj1s commented Feb 7, 2020

@stevenbrix - now that we're getting into the type mapping work, can you provide an explicit list of WinRT -> .NET mappings (wrappings) you'd like to see implemented?

@stevenbrix
Copy link
Contributor Author

stevenbrix commented Feb 26, 2020

@Scottj1s #77 will track this. I think this should be closed as a duplicate, does that sound good?

@Scottj1s
Copy link
Member

dupe of #77

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

3 participants