Share Contract Overview
We all know that Windows 8 contains 3 classes of different Contract:search Contract, Share Contract, Setting Contract. These three kinds of application contract provide a consistent programming model for consolidating the Windows 8 experience.
Now Weibo, everyone is a very hot platform, and many of us are willing to share what we saw and heard on these platforms. There may be a number of different applications on our computer, including social classes.
So how do we share these application information with social applications? Windows 8 provides us with a powerful share Contract that allows information to be shared between two applications.
Share contract provides a lightweight, context-related shared experience.
Windows 8 completes the heavy work of allowing cross application sharing, while shared source applications should contain as many data formats as possible, and shared goals should also support more formats.
Realization principle of Share contract
Windows 8 has done a lot of work to make it easier for developers to implement share contract in applications, and developers don't need to be able to share protocols that are shared between different applications. Developers only need to declare in their own applications that something can be shared, or that it can accept content shared by other applications.
The structure that Windows 8 constructs for share contract contains "source program" and "Target program", and the transport link between source program and Target program is "packet" and "packet" exists in "source program".
So how do you implement sharing from source program to target program?