\d+))?(\-(?[0-9A-Za-z\-\.]+))?(\+(?\d+))?" | Out-Null
8 |
9 | if ($matches -eq $null) {
10 | return "1.0.0-build"
11 | }
12 |
13 | # Extract the build metadata
14 | $BuildRevision = [uint64]$matches['build']
15 | # Extract the pre-release tag
16 | $PreReleaseTag = [string]$matches['pre']
17 | # Extract the patch
18 | $Patch = [uint64]$matches['patch']
19 | # Extract the minor
20 | $Minor = [uint64]$matches['minor']
21 | # Extract the major
22 | $Major = [uint64]$matches['major']
23 |
24 | $Version = [string]$Major + '.' + [string]$Minor + '.' + [string]$Patch;
25 | if ($PreReleaseTag -ne [string]::Empty) {
26 | $Version = $Version + '-' + $PreReleaseTag
27 | }
28 |
29 | if ($BuildRevision -ne 0) {
30 | $Version = $Version + '.' + [string]$BuildRevision
31 | }
32 |
33 | return $Version
34 | }
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | ###############
2 | # folder #
3 | ###############
4 | /**/DROP/
5 | /**/TEMP/
6 | /**/packages/
7 | /**/bin/
8 | /**/obj/
9 | _site
10 |
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | # XPlat Documentation
2 |
3 | This folder contains source code for the generation of XPlat's documentation.
4 |
5 | ## Contributing to the docs
6 |
7 | ### Install dependencies
8 |
9 | Download and install docfx on your computer.
10 |
11 | #### MacOS
12 |
13 | ```
14 | brew install docfx
15 | ```
16 |
17 | #### Windows
18 |
19 | ```
20 | choco install docfx
21 | ```
22 |
23 | ### Running locally
24 |
25 | ```
26 | docfx .\docfx.json --serve
27 | ```
28 |
29 | This will run the docs on `http://localhost:8080`
--------------------------------------------------------------------------------
/docs/api/.gitignore:
--------------------------------------------------------------------------------
1 | ###############
2 | # temp file #
3 | ###############
4 | *.yml
5 | .manifest
6 |
--------------------------------------------------------------------------------
/docs/api/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: api-docs
3 | title: Explore the APIs
4 | ---
5 |
6 | # Explore the APIs
7 |
8 | Here you'll find all of the generated code documentation for the XPlat Windows APIs projects, similar to what you might find on Microsoft Docs!
9 |
10 | This documentation is designed to show you how each component of XPlat Windows APIs is constructed and provide a reference for you when building your projects.
11 |
--------------------------------------------------------------------------------
/docs/articles/intro.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: xplat-intro
3 | title: Overview
4 | ---
5 |
6 |
7 |
8 | # XPlat Windows APIs
9 |
10 | XPlat Windows APIs are designed to make it easier for developers adjusted to developing with the Windows Runtime APIs (UWP) to take those skills cross-platform with their applications in .NET.
11 |
12 | As each application platform offers their own unique platform-specific APIs, XPlat attempts to bring all of those APIs under one umbrella using a UWP like API, allowing a developer to learn a single API which works with any application built for Windows and Xamarin for Android and iOS.
13 |
14 | For a Windows developer, this is appealing as it allows you to easily migrate your existing Windows code to Xamarin shared code with minimal changes through the use of XPlat Windows APIs which mimic the UWP API alternatives.
15 |
16 | ## Why should I use this project?
17 |
18 | You've spent years developing Windows applications and you've been using the Windows Runtime APIs (UWP) to build modern app experiences. Now you want to take your existing apps and skills cross-platform with Xamarin, but you don't know where to start because you don't know what APIs to use!
19 |
20 | I had this same problem!
21 |
22 | That's where XPlat Windows APIs started, a set of APIs which mimic those Windows APIs but that are cross-platform, supporting both Android and iOS.
23 |
24 | Use your existing skills and build epic cross-platform applications.
--------------------------------------------------------------------------------
/docs/articles/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Overview
2 | topicHref: intro.md
3 | - name: Get started
4 | items:
5 | - name: Available packages
6 | href: available-packages.md
7 |
--------------------------------------------------------------------------------
/docs/docfx.json:
--------------------------------------------------------------------------------
1 | {
2 | "metadata": [
3 | {
4 | "src": [
5 | {
6 | "src": "../",
7 | "files": [
8 | "src/**.csproj"
9 | ],
10 | "exclude": [
11 | "**/bin/**",
12 | "**/obj/**",
13 | "_site/**"
14 | ]
15 | }
16 | ],
17 | "dest": "api",
18 | "disableGitFeatures": false,
19 | "disableDefaultFilter": false,
20 | "properties": {
21 | "TargetFramework": "netstandard2.0"
22 | }
23 | }
24 | ],
25 | "build": {
26 | "content": [
27 | {
28 | "files": [
29 | "api/**.yml",
30 | "api/index.md"
31 | ]
32 | },
33 | {
34 | "files": [
35 | "articles/**.md",
36 | "articles/**/toc.yml",
37 | "toc.yml",
38 | "*.md"
39 | ]
40 | }
41 | ],
42 | "resource": [
43 | {
44 | "files": [
45 | "images/**"
46 | ]
47 | }
48 | ],
49 | "overwrite": [
50 | {
51 | "files": [
52 | "apidoc/**.md"
53 | ],
54 | "exclude": [
55 | "obj/**",
56 | "_site/**"
57 | ]
58 | }
59 | ],
60 | "dest": "_site",
61 | "globalMetadataFiles": [],
62 | "fileMetadataFiles": [],
63 | "template": [
64 | "default",
65 | "templates/material"
66 | ],
67 | "postProcessors": [],
68 | "markdownEngineName": "markdig",
69 | "noLangKeyword": false,
70 | "keepFileLink": false,
71 | "cleanupCacheHistory": false,
72 | "disableGitFeatures": false,
73 | "globalMetadata": {
74 | "_appLogoPath": "images/Logo.png",
75 | "_appFaviconPath": "images/Logo.png",
76 | "_appTitle": "XPlat Windows APIs",
77 | "_appFooter": "Copyright (c) XPlat Apps",
78 | "_enableSearch": true,
79 | "_enableNewTab": true
80 | }
81 | }
82 | }
--------------------------------------------------------------------------------
/docs/images/Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XPlat-Apps/XPlat-Windows-APIs/6bae7026dc2466e13f319759d70cc237ce9989e3/docs/images/Logo.png
--------------------------------------------------------------------------------
/docs/images/ProjectBanner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XPlat-Apps/XPlat-Windows-APIs/6bae7026dc2466e13f319759d70cc237ce9989e3/docs/images/ProjectBanner.png
--------------------------------------------------------------------------------
/docs/templates/material/partials/head.tmpl.partial:
--------------------------------------------------------------------------------
1 | {{!Copyright (c) Oscar Vasquez. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
2 |
3 |
4 |
5 |
6 | {{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}
7 |
8 |
9 |
10 | {{#_description}}{{/_description}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {{#_noindex}}{{/_noindex}}
19 | {{#_enableSearch}}{{/_enableSearch}}
20 | {{#_enableNewTab}}{{/_enableNewTab}}
21 |
--------------------------------------------------------------------------------
/docs/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Docs
2 | href: docs/
3 | homepage: articles/intro.md
4 | - name: APIs
5 | href: api/
--------------------------------------------------------------------------------
/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "msbuild-sdks": {
3 | "MSBuild.Sdk.Extras": "3.0.44"
4 | }
5 | }
--------------------------------------------------------------------------------
/src/XPlat.ApplicationModel.DataTransfer/Clipboard.Windows.cs:
--------------------------------------------------------------------------------
1 | // XPlat Apps licenses this file to you under the MIT license.
2 | // See the LICENSE file in the project root for more information.
3 |
4 | #if WINDOWS_UWP
5 | namespace XPlat.ApplicationModel.DataTransfer
6 | {
7 | using System;
8 | using System.Threading.Tasks;
9 |
10 | /// Gets and sets information from the clipboard object.
11 | public static class Clipboard
12 | {
13 | /// Occurs when the data stored in the Clipboard changes.
14 | public static event EventHandler