Windows-universal-samples学习笔记系列四:Data

Data
Blobs Compression Content indexer
Form validation (HTML) IndexedDB Logging
Serializing and deserializing data x:Bind x:DeferLoadStrategy
XML DOM XmlLite

 Blobs sample (仅用于JS)

Compression sample (压缩,与之前的有何区别?)

This sample demonstrates how to read structured data from a file and write compressed data to a new file and how to read compressed data and write decompressed data to a new file.

Note  This sample was created using one of the universal app templates available in Visual Studio. It shows how its solution is structured so it can run on both mobile and desktop Windows 10. For more info about how to build a Windows 10 universal app, see Build a Windows 10 universal app.

Many apps need to compress and decompress data. The Windows.Storage.Compression namespace simplifies this task by providing a unified interface that exposes the MSZIP, XPRESS, XPRESS_HUFF, and LZMS compression algorithms. This lets you manage versions, service, and extend the exposed compression algorithms and frees you from responsibility for managing block sizes, compression parameters, and other details that the native Compression API requires. A subset of Win32 and COM for apps can be used by apps to support scenarios not already covered by the Windows Runtime, HTML/Cascading Style Sheets (CSS), or other supported languages or standards. For this purpose, you can also use the native Compression API to develop apps.

Content indexer sample (将app文件加索引)

This sample shows how to add, update, and retrieve items and properties from the indexer. Two methods of doing so are demonstrated. The first is using the ContentIndexer APIs to directly interface with the indexer. The second is writing .appcontent-ms files, which contain information to be indexed that the indexer will pick up once the file has been written.

Form validation (HTML) sample (仅用于JS)

IndexedDB sample (仅用于JS)

Logging sample (日志,但仅在客户端保存吗?)

This sample shows how to use the Logging APIs in the Windows.Foundation.Diagnostics namespace, including LoggingChannel, LoggingActivity, LoggingSession, and FileLoggingSession. These classes are designed for diagnostic logging within a modern application. These APIs were added in Windows 8.1. The LoggingChannel and LoggingActivity APIs have been extended in Windows 10 to support writing complex events using TraceLogging event encoding.

Serializing and deserializing data sample(序列化和反序列化,但能跨平台吗?如ios.)

x:Bind sample (编译时绑定)

This sample shows how to use x:Bind for data binding in XAML apps. x:Bind is a new compile time binding mechanism for XAML in windows 10, which is faster and provides more developer feedback in the form of compile errors and generated code that can be inspected.

x:DeferLoadStrategy sample (XAML元素的惰性加载特性)

This sample shows how to reduce your app's startup time by deferring the creation of elements defined in your markup until you really need them.

XML DOM sample (能动态加载XML?)

This sample demonstrates common XML API use scenarios for the Windows.Data.Xml.Dom and Windows.Data.Xml.Xsl namespaces in the Windows Runtime.

XmlLite sample (仅用于c++)

This sample demonstrates how to use XmlLite Reader and Writer.

原文地址:https://www.cnblogs.com/qianblue/p/4862523.html