Merge pull request #1 from unoplatform/dev/jela/samples-wasm
Add wasm sample app
This commit is contained in:
Коммит
04b25426a3
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -53,7 +53,7 @@ namespace Samples.UWP
|
|||
|
||||
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
|
||||
{
|
||||
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
|
||||
throw new Exception($"Failed to load Page {e.SourcePageType}: {e.Exception}");
|
||||
}
|
||||
|
||||
void OnSuspending(object sender, SuspendingEventArgs e)
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
<HasSharedItems>true</HasSharedItems>
|
||||
<SharedGUID>6279c845-92f8-4333-ab99-3d213163593c</SharedGUID>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration">
|
||||
<Import_RootNamespace>Samples.Shared</Import_RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="$(MSBuildThisFileDirectory)App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</ApplicationDefinition>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)MainPage.xaml.cs">
|
||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="$(MSBuildThisFileDirectory)MainPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\LockScreenLogo.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\SplashScreen.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square150x150Logo.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.scale-200.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\StoreLogo.png" />
|
||||
<Content Include="$(MSBuildThisFileDirectory)Assets\Wide310x150Logo.scale-200.png" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>6279c845-92f8-4333-ab99-3d213163593c</ProjectGuid>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
|
||||
<PropertyGroup />
|
||||
<Import Project="Samples.Shared.projitems" Label="Shared" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,10 @@
|
|||
<linker>
|
||||
<assembly fullname="Samples.Wasm" />
|
||||
<assembly fullname="Samples" />
|
||||
<assembly fullname="Uno.UI" />
|
||||
|
||||
<assembly fullname="System.Core">
|
||||
<!-- This is required by JSon.NET and any expression.Compile caller -->
|
||||
<type fullname="System.Linq.Expressions*" />
|
||||
</assembly>
|
||||
</linker>
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Windows.UI.Xaml;
|
||||
|
||||
namespace Samples.Wasm
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
static int Main(string[] args)
|
||||
{
|
||||
ConfigureFilters(Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory);
|
||||
|
||||
Windows.UI.Xaml.Application.Start(_ => new Samples.UWP.App());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ConfigureFilters(ILoggerFactory factory)
|
||||
{
|
||||
#if DEBUG
|
||||
factory
|
||||
.WithFilter(new FilterLoggerSettings
|
||||
{
|
||||
{ "Uno", LogLevel.Warning },
|
||||
{ "Windows", LogLevel.Warning },
|
||||
|
||||
// Generic Xaml events
|
||||
// { "Windows.UI.Xaml", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.Shapes", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.VisualStateGroup", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.StateTriggerBase", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.UIElement", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.Setter", LogLevel.Debug },
|
||||
|
||||
// Layouter specific messages
|
||||
// { "Windows.UI.Xaml.Controls", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.Controls.Layouter", LogLevel.Debug },
|
||||
// { "Windows.UI.Xaml.Controls.Panel", LogLevel.Debug },
|
||||
|
||||
// Binding related messages
|
||||
// { "Windows.UI.Xaml.Data", LogLevel.Debug },
|
||||
|
||||
// Binder memory references tracking
|
||||
// { "ReferenceHolder", LogLevel.Debug },
|
||||
}
|
||||
)
|
||||
.AddConsole(LogLevel.Trace);
|
||||
#else
|
||||
factory
|
||||
.AddConsole(LogLevel.Error);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<WasmHead>true</WasmHead>
|
||||
<DefineConstants>$(DefineConstants);__WASM__</DefineConstants>
|
||||
<NoWarn>NU1701</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<MonoRuntimeDebuggerEnabled>true</MonoRuntimeDebuggerEnabled>
|
||||
<DefineConstants>$(DefineConstants);TRACE;DEBUG</DefineConstants>
|
||||
<DebugType>portable</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="..\Samples.UWP\Assets\*.png" Link="Assets\%(FileName)%(Extension)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="WasmCSS\Fonts.css" />
|
||||
<EmbeddedResource Include="WasmScripts\AppManifest.js" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<LinkerDescriptor Include="LinkerConfig.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!--
|
||||
This item group is required by the project template because of the
|
||||
new SDK-Style project, otherwise some files are not aded automatically.
|
||||
|
||||
You can safely remove this ItemGroup completely.
|
||||
-->
|
||||
<None Include="Program.cs" />
|
||||
<None Include="LinkerConfig.xml" />
|
||||
<None Include="wwwroot\web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- Note that for WebAssembly version 1.1.1 of the console logger required -->
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
|
||||
<PackageReference Include="Uno.UI" Version="2.1.0-dev.1173" />
|
||||
<PackageReference Include="Uno.UI.RemoteControl" Version="2.0.532" Condition="'$(Configuration)'=='Debug'" />
|
||||
<PackageReference Include="Uno.Wasm.Bootstrap" Version="1.0.10" />
|
||||
<PackageReference Include="Uno.Xamarin.Forms.Platform" Version="4.3.4" />
|
||||
<DotNetCliToolReference Include="Uno.Wasm.Bootstrap.Cli" Version="1.0.10" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Xamarin.Essentials\Xamarin.Essentials.csproj" />
|
||||
<ProjectReference Include="..\Samples\Samples.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\Samples.UWP\Samples.Shared.projitems" Label="Shared" Condition="Exists('..\Samples.UWP\Samples.Shared.projitems')" />
|
||||
</Project>
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -0,0 +1,7 @@
|
|||
var UnoAppManifest = {
|
||||
|
||||
splashScreenImage: "Assets/SplashScreen.scale-200.png",
|
||||
splashScreenColor: "#00f",
|
||||
displayName: "Samples"
|
||||
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.web>
|
||||
<customErrors mode="Off"/>
|
||||
</system.web>
|
||||
|
||||
<system.webServer>
|
||||
|
||||
<!-- Disable compression as we're doing it through pre-compressed files -->
|
||||
<urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" />
|
||||
|
||||
<staticContent>
|
||||
<remove fileExtension=".dll" />
|
||||
<remove fileExtension=".wasm" />
|
||||
<remove fileExtension=".woff" />
|
||||
<remove fileExtension=".woff2" />
|
||||
<mimeMap fileExtension=".wasm" mimeType="application/wasm" />
|
||||
<mimeMap fileExtension=".clr" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".pdb" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
|
||||
<mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
|
||||
|
||||
<!-- Required for PWAs -->
|
||||
<mimeMap fileExtension=".json" mimeType="application/octet-stream" />
|
||||
</staticContent>
|
||||
|
||||
<rewrite>
|
||||
<rules>
|
||||
<rule name="Lookup for pre-compressed brotli file" stopProcessing="true">
|
||||
<match url="(.*)$"/>
|
||||
<conditions>
|
||||
<!-- Match brotli requests -->
|
||||
<add input="{HTTP_ACCEPT_ENCODING}" pattern="br" />
|
||||
|
||||
<!-- Match all but pre-compressed files -->
|
||||
<add input="{REQUEST_URI}" pattern="^(?!/_compressed_br/)(.*)$" />
|
||||
|
||||
<!-- Check if the pre-compressed file exists on the disk -->
|
||||
<add input="{DOCUMENT_ROOT}/_compressed_br/{C:0}" matchType="IsFile" negate="false" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="/_compressed_br{C:0}" />
|
||||
</rule>
|
||||
|
||||
<rule name="Lookup for pre-compressed gzip file" stopProcessing="true">
|
||||
<match url="(.*)$"/>
|
||||
<conditions>
|
||||
<!-- Match gzip requests -->
|
||||
<add input="{HTTP_ACCEPT_ENCODING}" pattern="gzip" />
|
||||
|
||||
<!-- Match all but pre-compressed files -->
|
||||
<add input="{REQUEST_URI}" pattern="^(?!/_compressed_gz/)(.*)$" />
|
||||
|
||||
<!-- Check if the pre-compressed file exists on the disk -->
|
||||
<add input="{DOCUMENT_ROOT}/_compressed_gz/{C:0}" matchType="IsFile" negate="false" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="/_compressed_gz{C:0}" />
|
||||
</rule>
|
||||
</rules>
|
||||
|
||||
<outboundRules>
|
||||
<rule name="Adjust content encoding for gzip pre-compressed files" enabled="true" stopProcessing="true">
|
||||
<match serverVariable="RESPONSE_CONTENT_ENCODING" pattern="" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_URI}" pattern="/_compressed_gz/.*$" />
|
||||
</conditions>
|
||||
<action type="Rewrite" value="gzip"/>
|
||||
</rule>
|
||||
<rule name="Adjust content encoding for brotli pre-compressed files" enabled="true" stopProcessing="true">
|
||||
<match serverVariable="RESPONSE_CONTENT_ENCODING" pattern="" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_URI}" pattern="/_compressed_br/.*$" />
|
||||
</conditions>
|
||||
<action type="Rewrite" value="br"/>
|
||||
</rule>
|
||||
</outboundRules>
|
||||
</rewrite>
|
||||
</system.webServer>
|
||||
</configuration>
|
|
@ -47,7 +47,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeviceTests.Shared", "Devic
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.Tizen", "Samples\Samples.Tizen\Samples.Tizen.csproj", "{4B1850CF-C568-4C16-8B42-3E9977DE5F56}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.Wasm", "Samples\Samples.Wasm\Samples.Wasm.csproj", "{CBC60B0B-1685-4B45-8A47-DE17916F059C}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Samples.Shared", "Samples\Samples.UWP\Samples.Shared.shproj", "{6279C845-92F8-4333-AB99-3D213163593C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
Samples\Samples.UWP\Samples.Shared.projitems*{6279c845-92f8-4333-ab99-3d213163593c}*SharedItemsImports = 13
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
|
@ -664,6 +671,54 @@ Global
|
|||
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Samples|x64.Build.0 = Release|Any CPU
|
||||
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Samples|x86.ActiveCfg = Release|Any CPU
|
||||
{4B1850CF-C568-4C16-8B42-3E9977DE5F56}.Samples|x86.Build.0 = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|ARM.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|ARM.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|iPhone.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|x64.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|x64.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|x86.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Docs|x86.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|x64.Build.0 = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Release|x86.Build.0 = Release|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|ARM.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|ARM.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|iPhone.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|x64.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|x64.Build.0 = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|x86.ActiveCfg = Debug|Any CPU
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C}.Samples|x86.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -680,6 +735,8 @@ Global
|
|||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B} = {EA9AC363-45BC-4959-BD17-FE3A1B724529}
|
||||
{BE0DE9A3-D92C-47C5-9EC4-DFB546BBDF77} = {EA9AC363-45BC-4959-BD17-FE3A1B724529}
|
||||
{4B1850CF-C568-4C16-8B42-3E9977DE5F56} = {706C0487-6930-4E55-8720-C17D9FE6CA91}
|
||||
{CBC60B0B-1685-4B45-8A47-DE17916F059C} = {706C0487-6930-4E55-8720-C17D9FE6CA91}
|
||||
{6279C845-92F8-4333-AB99-3D213163593C} = {706C0487-6930-4E55-8720-C17D9FE6CA91}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {105B0052-C7EA-44D0-8697-37A45E1392AF}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Windows.Storage;
|
||||
using Windows.Foundation.Metadata;
|
||||
using Windows.Storage;
|
||||
|
||||
namespace Xamarin.Essentials
|
||||
{
|
||||
|
@ -73,10 +74,17 @@ namespace Xamarin.Essentials
|
|||
if (string.IsNullOrWhiteSpace(sharedName))
|
||||
return localSettings;
|
||||
|
||||
if (!localSettings.Containers.ContainsKey(sharedName))
|
||||
localSettings.CreateContainer(sharedName, ApplicationDataCreateDisposition.Always);
|
||||
if (ApiInformation.IsPropertyPresent("Windows.Storage.ApplicationDataContainer", "Containers"))
|
||||
{
|
||||
if (!localSettings.Containers.ContainsKey(sharedName))
|
||||
localSettings.CreateContainer(sharedName, ApplicationDataCreateDisposition.Always);
|
||||
|
||||
return localSettings.Containers[sharedName];
|
||||
return localSettings.Containers[sharedName];
|
||||
}
|
||||
else
|
||||
{
|
||||
return localSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<PropertyGroup>
|
||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;Xamarin.iOS10;Xamarin.TVOS10;Xamarin.WatchOS10;MonoAndroid60;MonoAndroid70;MonoAndroid71;MonoAndroid80;MonoAndroid81;MonoAndroid90;uap10.0.16299;tizen40;</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;Xamarin.iOS10;Xamarin.TVOS10;Xamarin.WatchOS10;MonoAndroid60;MonoAndroid70;MonoAndroid71;MonoAndroid80;MonoAndroid81;MonoAndroid90;tizen40;</TargetFrameworks>
|
||||
<!-- Uncomment to debug a single platform <TargetFrameworks>netstandard2.0</TargetFrameworks>-->
|
||||
<AssemblyName>Xamarin.Essentials</AssemblyName>
|
||||
<RootNamespace>Xamarin.Essentials</RootNamespace>
|
||||
<PackageId>Uno.Xamarin.Essentials</PackageId>
|
||||
|
@ -15,8 +16,8 @@
|
|||
<AssemblyFileVersion>1.0.0.0</AssemblyFileVersion>
|
||||
<Version>1.0.0</Version>
|
||||
<PackageVersion>$(Version)$(VersionSuffix)</PackageVersion>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Owners>microsoft,Xamarin,XamarinNuGet</Owners>
|
||||
<Authors>Microsoft,nventive</Authors>
|
||||
<Owners>nventive</Owners>
|
||||
<NeutralLanguage>en</NeutralLanguage>
|
||||
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
|
||||
<RepositoryUrl>https://github.com/xamarin/Essentials</RepositoryUrl>
|
||||
|
|
Загрузка…
Ссылка в новой задаче