通过Windows(Phone) Runtime Component来分享你的代码
来源:互联网 发布:ubuntu重新安装vim 编辑:程序博客网 时间:2024/06/08 07:43
A Windows Runtime Component, sometimes referred to as a 3rd-party Windows Runtime Component, is a component you build to expose functionality to all supported languages. By using the Windows Runtime, which is supported on Windows Phone 8 and Windows 8, you can create components and call them in a simple and natural way from the language of your choice. The component is built using the Windows Runtime Component template in Visual Studio. Its functionality is output as a .winmd file, which contains the metadata needed to project the functionality automatically into C#, C++, VB and JavaScript.
The following list describes when you should consider sharing functionality of your app in Windows Runtime Component.
Harnessing the power of C++(驾驭C++强大的力量的时候): If your app carries out computationally intensive operations, you might opt to write that code in C++ to achieve optimal performance. If the code that uses this functionality is written in C# or VB, you can package the functionality as a Windows Runtime Component and call the component from your managed code.
Crossing language boundaries(跨语言编程的时候): In general, using a Windows Runtime Component is a great way to expose your code to all supported languages. This is not necessary if your app is written in one language and you don’t intend to expose any of your functionality to other languages. Instead you can compose your app of regular class libraries, Portable Class Libraries or, depending on the size and complexity of your app, just write the whole app in the same project.
Using Direct3D, Win32 or COM APIs(使用系统提供的只能使用C++调用的接口的时候): Windows Phone 8 delivers native API to enable powerful gaming scenarios, native networking and access to camera API from native code. To use these API from managed code, you can wrap this functionality in a Windows Runtime Component. For more info, see Supported Win32 APIs for Windows Phone 8 and Games for Windows Phone.
Using 3rd party libraries(使用第三方库的时候): In the past, it was difficult to consume a 3rd-party library, written in one language, if your app written in another language. With Windows Runtime Components, it is possible to grab a library, wrap it in a Windows Runtime Component and expose the functionality to your app written in any supported language.
The preceding list is some of the scenarios where writing a Windows Runtime Component is a very useful way of sharing code. However, a Windows Runtime Component is not a standard DLL or assembly. There are very specific requirements you must follow when creating a Windows Runtime Component. These requirements include using only allowed data types, handling collections, creating only sealed classes and many more. Visual Studio will help at compile time, and indicate clearly when something goes wrong.
- 通过Windows(Phone) Runtime Component来分享你的代码
- Windows Phone Runtime Component 中的类型转换
- Windows Phone 通过相应的进度条来绑定
- 使用Marketplace Deeplinking来推广你的Windows Phone应用
- Windows Runtime Component理解
- 无代码生成你的Windows Phone 7应用
- 【分享笔记】使用lint来改善你的代码
- 来Godeye分享你的代码,你的经验,你的生活
- python sharing your code windows下分享你的代码
- ArcGIS Runtime SDK for Windows Phone 3.0正式版发布啦,赶快来体验!
- 通过Intent的Component属性来启动另一个Activity
- Windows Phone 7 开发 31 日谈——第26日:与其他开发人员(免费)分享你的程序
- Windows Phone代码混淆
- 技术分享 - Windows Phone 的数据存储方式总结
- Windows Phone 时代来了~
- 通过PowerShell开源社区的Win32-OpenSSH来管理你的Windows服务器
- 告诉你一个事实 缓冲区也是windows的一种资源 必须通过句柄来间接Access
- 把你的Windows Phone 6.x也打扮成Windows Phone 7
- 软件工程之十一——软件管理
- Ganglia 和 Nagios,第 1 部分: 用 Ganglia 监视企业集群
- 利用c模块代码,提升python代码执行效率
- linux目录文件介绍
- MVC3+CodeFirst
- 通过Windows(Phone) Runtime Component来分享你的代码
- Make理解-GNU Make
- SQL Server日期操作
- 如何子类化(SubclassWindow)窗体
- 数据结构之 链表-Double-Ended List(2)
- GNU-ld链接脚本浅析
- Select模型 详解 (转)
- How to Find a Blank Cell in Excel Using Vba
- libevent 的安装