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

package.RequestPackageVersionAsync().Task; 这里能不能await后 可以返回 版本号,和用协程一个效果,现在返回的是null 就无法用异步方式了 #477

Open
magic373 opened this issue Feb 19, 2025 · 2 comments
Labels
invalid This doesn't seem right

Comments

@magic373
Copy link

package.RequestPackageVersionAsync().Task; 这里能不能await后 可以返回 版本号,和用协程一个效果,现在返回的是null 就无法用异步方式了

@gmhevinci
Copy link
Collaborator

Image

@gmhevinci gmhevinci added bug Something isn't working invalid This doesn't seem right and removed bug Something isn't working labels Feb 19, 2025
@gmhevinci
Copy link
Collaborator

简单写法就是:
var requestVersionOp = package.RequestPackageVersionAsync():
await requestVersionOp.Task;
string version = requestVersionOp.PackageVersion;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants