什么是 WinRT 语言投影? [英] What are WinRT language projections?

查看:65
本文介绍了什么是 WinRT 语言投影?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是 WinRT 语言投影及其用途?

What are WinRT language projections and what are they used for?

推荐答案

Windows 运行时投影是在每种语言中公开 Windows 运行时 API 的方式.这可能在编译时(如在 C++ 中)或在运行时(如在 JavaScript 中)或组合(如在 C# 中).每种语言都决定了如何最好地呈现 WinRT API.大多数时候它是直接暴露,但其他时候可能会发生包装或重定向.代表和事件就是一个很好的例子.在 C# 中,它们显示为 C# 委托/事件,而不是 WinRT 特定类型.字符串同样被重新映射为本地语言字符串类型,而不是底层的 hstring 类型.

Windows Runtime Projections are the way that the Windows Runtime APIs are exposed in each language. This may be at compile time (as in C++) or at runtime (as in JavaScript) or a combination (as in C#). Each language decides how to present the WinRT APIs best. Most of the time it is a direct exposure, but other times there are wrappers or redirections that may take place. Delegates and events are a good example. In C# they show up as C# delegates/events and not as WinRT-specific types. Strings likewise are remapped to be the native language string type and not the underlying hstring type.

这篇关于什么是 WinRT 语言投影?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆