Pages

Monday, 3 September 2012

Transhipment - A WinRT library for structured data sharing

WinRT library for structured data sharing (via Share Contract) using Schema.org data formats.

How To Install Via NuGet

PM> Install-Package Transhipment
Usage In C#


void DataRequested(DataTransferManager sender, DataRequestedEventArgs args)
{
    var request = args.Request;

    var geo = SchemaFactory.Create(Schema.GeoCoordinates) as IGeoCoordinates;
    geo.Name = "Polar Bear Provincial Park";
    geo.Latitude = "54.596931";
    geo.Longitude = "-83.283978";

    request.Data.Properties.Title = "Sample data";
    request.Data.Properties.Description = "data for " + geo.Type;
    request.Data.SetStructuredData(geo);
}

Check it in GitHub

No comments:

Post a Comment

Web Informer Button