Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DeviceTests/DeviceTests.Android/DeviceTests.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<RootNamespace>DeviceTests.Droid</RootNamespace>
<AssemblyName>XamarinEssentialsDeviceTestsAndroid</AssemblyName>
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
Expand Down
9,730 changes: 6,223 additions & 3,507 deletions DeviceTests/DeviceTests.Android/Resources/Resource.designer.cs

Large diffs are not rendered by default.

10 changes: 3 additions & 7 deletions DeviceTests/DeviceTests.Shared/DeviceTests.Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Project Sdk="MSBuild.Sdk.Extras/2.0.29">
<PropertyGroup>
<!--Work around so the conditions work below-->
<TargetFrameworks>
</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">Xamarin.iOS10;MonoAndroid81;uap10.0.16299</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">Xamarin.iOS10;MonoAndroid81;</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">Xamarin.iOS10;MonoAndroid90;uap10.0.16299</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">Xamarin.iOS10;MonoAndroid90;</TargetFrameworks>
<AssemblyName>XamarinEssentialsDeviceTestsShared</AssemblyName>
<RootNamespace>DeviceTests.Shared</RootNamespace>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
Expand Down Expand Up @@ -32,7 +30,6 @@
<DebugType>pdbonly</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.6.61" PrivateAssets="All" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="Xamarin.Forms" Version="3.5.0.129452" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down Expand Up @@ -64,6 +61,5 @@
<Reference Include="System.Numerics.Vectors" />
<Reference Include="OpenTK-1.0" />
</ItemGroup>
<Import Project="$(MSBuildSDKExtrasTargets)" Condition="Exists('$(MSBuildSDKExtrasTargets)')" />
<Import Project="$(MSBuildThisFileDirectory)..\..\CodeStyles.targets" />
</Project>
5 changes: 3 additions & 2 deletions Xamarin.Essentials.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2036
# Visual Studio Version 16
VisualStudioVersion = 16.0.29009.5
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{579F334C-FB7F-448A-A638-8FCB1CE53D93}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
DeviceTests\build.ps1 = DeviceTests\build.ps1
DeviceTests\build.sh = DeviceTests\build.sh
LICENSE = LICENSE
nuget.config = nuget.config
nugetreadme.txt = nugetreadme.txt
README.md = README.md
stylecop.json = stylecop.json
Expand Down
3 changes: 1 addition & 2 deletions Xamarin.Essentials/Vibration/Vibration.uwp.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using System;
using Windows.Foundation.Metadata;
using Windows.Phone.Devices.Notification;

namespace Xamarin.Essentials
{
public static partial class Vibration
{
internal static bool IsSupported
=> ApiInformation.IsTypePresent("Windows.Phone.Devices.Notification.VibrationDevice") && DefaultDevice != null;
=> Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.Devices.Notification.VibrationDevice") && DefaultDevice != null;

static VibrationDevice DefaultDevice => VibrationDevice.GetDefault();

Expand Down
12 changes: 1 addition & 11 deletions Xamarin.Essentials/Xamarin.Essentials.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Project Sdk="MSBuild.Sdk.Extras/2.0.29">
<PropertyGroup>
<!--Work around so the conditions work below-->
<TargetFrameworks></TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard1.0;netstandard2.0;Xamarin.iOS10;MonoAndroid60;MonoAndroid70;MonoAndroid71;MonoAndroid80;MonoAndroid81;MonoAndroid90;uap10.0.16299</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard1.0;netstandard2.0;Xamarin.iOS10;MonoAndroid60;MonoAndroid70;MonoAndroid71;MonoAndroid80;MonoAndroid81;MonoAndroid90;</TargetFrameworks>
<AssemblyName>Xamarin.Essentials</AssemblyName>
Expand Down Expand Up @@ -51,7 +49,6 @@
<ItemGroup>
<None Include="..\nugetreadme.txt" PackagePath="readme.txt" Pack="true" />
<PackageReference Include="mdoc" Version="5.7.4.3" PrivateAssets="All" />
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.6.61" PrivateAssets="All" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<Compile Include="**\*.shared.cs" />
<Compile Include="**\*.shared.*.cs" />
Expand All @@ -65,9 +62,6 @@
</ItemGroup>
<ItemGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) ">
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.1.5" />
<SDKReference Include="WindowsMobile, Version=10.0.16299.0">
<Name>Windows Mobile Extensions for the UWP</Name>
</SDKReference>
<Compile Include="**\*.uwp.cs" />
<Compile Include="**\*.uwp.*.cs" />
</ItemGroup>
Expand All @@ -88,10 +82,6 @@
<Reference Include="System.Numerics.Vectors" />
<Reference Include="OpenTK-1.0" />
</ItemGroup>
<ItemGroup>
<None Include="**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>
<Import Project="$(MSBuildSDKExtrasTargets)" Condition="Exists('$(MSBuildSDKExtrasTargets)')" />
<Import Project="$(MSBuildThisFileDirectory)mdoc.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\CodeStyles.targets" />
</Project>
14 changes: 7 additions & 7 deletions docs/en/FrameworksIndex/xamarin-essentials-android.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<Member Id="M:Xamarin.Essentials.ColorExtensions.AddLuminosity(System.Drawing.Color,System.Single)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.MultiplyAlpha(System.Drawing.Color,System.Single)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToInt(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToPlatformColor(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.Android.ToPlatformColor(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToSystemColor(Android.Graphics.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToUInt(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.WithAlpha(System.Drawing.Color,System.Int32)" />
Expand Down Expand Up @@ -527,8 +527,8 @@
<Member Id="M:Xamarin.Essentials.Platform.OnRequestPermissionsResult(System.Int32,System.String[],Android.Content.PM.Permission[])" />
</Type>
<Type Name="Xamarin.Essentials.PointExtensions" Id="T:Xamarin.Essentials.PointExtensions">
<Member Id="M:Xamarin.Essentials.PointExtensions.ToPlatformPoint(System.Drawing.Point)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.ToPlatformPointF(System.Drawing.PointF)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.Android.ToPlatformPoint(System.Drawing.Point)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.Android.ToPlatformPointF(System.Drawing.PointF)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.ToSystemPoint(Android.Graphics.Point)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.ToSystemPointF(Android.Graphics.PointF)" />
</Type>
Expand Down Expand Up @@ -574,8 +574,8 @@
<Member Id="M:Xamarin.Essentials.ReadOnlyFile.#ctor(Xamarin.Essentials.FileBase)" />
</Type>
<Type Name="Xamarin.Essentials.RectangleExtensions" Id="T:Xamarin.Essentials.RectangleExtensions">
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToPlatformRectangle(System.Drawing.Rectangle)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToPlatformRectangleF(System.Drawing.RectangleF)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.Android.ToPlatformRectangle(System.Drawing.Rectangle)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.Android.ToPlatformRectangleF(System.Drawing.RectangleF)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToSystemRectangle(Android.Graphics.Rect)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToSystemRectangleF(Android.Graphics.RectF)" />
</Type>
Expand Down Expand Up @@ -621,8 +621,8 @@
<Member Id="P:Xamarin.Essentials.ShareTextRequest.Uri" />
</Type>
<Type Name="Xamarin.Essentials.SizeExtensions" Id="T:Xamarin.Essentials.SizeExtensions">
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToPlatformSize(System.Drawing.Size)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToPlatformSizeF(System.Drawing.SizeF)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.Android.ToPlatformSize(System.Drawing.Size)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.Android.ToPlatformSizeF(System.Drawing.SizeF)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToSystemSize(Android.Util.Size)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToSystemSizeF(Android.Util.SizeF)" />
</Type>
Expand Down
14 changes: 7 additions & 7 deletions docs/en/FrameworksIndex/xamarin-essentials-ios.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<Member Id="M:Xamarin.Essentials.ColorExtensions.AddLuminosity(System.Drawing.Color,System.Single)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.MultiplyAlpha(System.Drawing.Color,System.Single)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToInt(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToPlatformColor(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.iOS.ToPlatformColor(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToSystemColor(UIKit.UIColor)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToUInt(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.WithAlpha(System.Drawing.Color,System.Int32)" />
Expand Down Expand Up @@ -515,8 +515,8 @@
</Type>
<Type Name="Xamarin.Essentials.Platform" Id="T:Xamarin.Essentials.Platform" />
<Type Name="Xamarin.Essentials.PointExtensions" Id="T:Xamarin.Essentials.PointExtensions">
<Member Id="M:Xamarin.Essentials.PointExtensions.ToPlatformPoint(System.Drawing.Point)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.ToPlatformPoint(System.Drawing.PointF)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.iOS.ToPlatformPoint(System.Drawing.Point)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.iOS.ToPlatformPoint(System.Drawing.PointF)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.ToSystemPoint(CoreGraphics.CGPoint)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.ToSystemPointF(CoreGraphics.CGPoint)" />
</Type>
Expand Down Expand Up @@ -562,8 +562,8 @@
<Member Id="M:Xamarin.Essentials.ReadOnlyFile.#ctor(Xamarin.Essentials.FileBase)" />
</Type>
<Type Name="Xamarin.Essentials.RectangleExtensions" Id="T:Xamarin.Essentials.RectangleExtensions">
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToPlatformRectangle(System.Drawing.Rectangle)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToPlatformRectangle(System.Drawing.RectangleF)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.iOS.ToPlatformRectangle(System.Drawing.Rectangle)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.iOS.ToPlatformRectangle(System.Drawing.RectangleF)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToSystemRectangle(CoreGraphics.CGRect)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToSystemRectangleF(CoreGraphics.CGRect)" />
</Type>
Expand Down Expand Up @@ -611,8 +611,8 @@
<Member Id="P:Xamarin.Essentials.ShareTextRequest.Uri" />
</Type>
<Type Name="Xamarin.Essentials.SizeExtensions" Id="T:Xamarin.Essentials.SizeExtensions">
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToPlatformSize(System.Drawing.Size)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToPlatformSize(System.Drawing.SizeF)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.iOS.ToPlatformSize(System.Drawing.Size)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.iOS.ToPlatformSize(System.Drawing.SizeF)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToSystemSize(CoreGraphics.CGSize)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToSystemSizeF(CoreGraphics.CGSize)" />
</Type>
Expand Down
14 changes: 7 additions & 7 deletions docs/en/FrameworksIndex/xamarin-essentials-uwp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<Member Id="M:Xamarin.Essentials.ColorExtensions.AddLuminosity(System.Drawing.Color,System.Single)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.MultiplyAlpha(System.Drawing.Color,System.Single)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToInt(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToPlatformColor(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.UWP.ToPlatformColor(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToSystemColor(Windows.UI.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.ToUInt(System.Drawing.Color)" />
<Member Id="M:Xamarin.Essentials.ColorExtensions.WithAlpha(System.Drawing.Color,System.Int32)" />
Expand Down Expand Up @@ -516,8 +516,8 @@
<Member Id="P:Xamarin.Essentials.Platform.MapServiceToken" />
</Type>
<Type Name="Xamarin.Essentials.PointExtensions" Id="T:Xamarin.Essentials.PointExtensions">
<Member Id="M:Xamarin.Essentials.PointExtensions.ToPlatformPoint(System.Drawing.Point)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.ToPlatformPoint(System.Drawing.PointF)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.UWP.ToPlatformPoint(System.Drawing.Point)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.UWP.ToPlatformPoint(System.Drawing.PointF)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.ToSystemPoint(Windows.Foundation.Point)" />
<Member Id="M:Xamarin.Essentials.PointExtensions.ToSystemPointF(Windows.Foundation.Point)" />
</Type>
Expand Down Expand Up @@ -563,8 +563,8 @@
<Member Id="M:Xamarin.Essentials.ReadOnlyFile.#ctor(Xamarin.Essentials.FileBase)" />
</Type>
<Type Name="Xamarin.Essentials.RectangleExtensions" Id="T:Xamarin.Essentials.RectangleExtensions">
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToPlatformRectangle(System.Drawing.Rectangle)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToPlatformRectangle(System.Drawing.RectangleF)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.UWP.ToPlatformRectangle(System.Drawing.Rectangle)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.UWP.ToPlatformRectangle(System.Drawing.RectangleF)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToSystemRectangle(Windows.Foundation.Rect)" />
<Member Id="M:Xamarin.Essentials.RectangleExtensions.ToSystemRectangleF(Windows.Foundation.Rect)" />
</Type>
Expand Down Expand Up @@ -610,8 +610,8 @@
<Member Id="P:Xamarin.Essentials.ShareTextRequest.Uri" />
</Type>
<Type Name="Xamarin.Essentials.SizeExtensions" Id="T:Xamarin.Essentials.SizeExtensions">
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToPlatformSize(System.Drawing.Size)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToPlatformSize(System.Drawing.SizeF)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.UWP.ToPlatformSize(System.Drawing.Size)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.UWP.ToPlatformSize(System.Drawing.SizeF)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToSystemSize(Windows.Foundation.Size)" />
<Member Id="M:Xamarin.Essentials.SizeExtensions.ToSystemSizFe(Windows.Foundation.Size)" />
</Type>
Expand Down
6 changes: 3 additions & 3 deletions docs/en/Xamarin.Essentials/ColorExtensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<Member MemberName="ToPlatformColor">
<MemberSignature Language="C#" Value="public static Android.Graphics.Color ToPlatformColor (this System.Drawing.Color color);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Android.Graphics.Color ToPlatformColor(valuetype System.Drawing.Color color) cil managed" />
<MemberSignature Language="DocId" Value="M:Xamarin.Essentials.ColorExtensions.ToPlatformColor(System.Drawing.Color)" />
<MemberSignature Language="DocId" Value="M:Xamarin.Essentials.ColorExtensions.Android.ToPlatformColor(System.Drawing.Color)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Xamarin.Essentials</AssemblyName>
Expand All @@ -112,7 +112,7 @@
<Member MemberName="ToPlatformColor">
<MemberSignature Language="C#" Value="public static UIKit.UIColor ToPlatformColor (this System.Drawing.Color color);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class UIKit.UIColor ToPlatformColor(valuetype System.Drawing.Color color) cil managed" />
<MemberSignature Language="DocId" Value="M:Xamarin.Essentials.ColorExtensions.ToPlatformColor(System.Drawing.Color)" />
<MemberSignature Language="DocId" Value="M:Xamarin.Essentials.ColorExtensions.iOS.ToPlatformColor(System.Drawing.Color)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Xamarin.Essentials</AssemblyName>
Expand All @@ -134,7 +134,7 @@
<Member MemberName="ToPlatformColor">
<MemberSignature Language="C#" Value="public static Windows.UI.Color ToPlatformColor (this System.Drawing.Color color);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Windows.UI.Color ToPlatformColor(valuetype System.Drawing.Color color) cil managed" />
<MemberSignature Language="DocId" Value="M:Xamarin.Essentials.ColorExtensions.ToPlatformColor(System.Drawing.Color)" />
<MemberSignature Language="DocId" Value="M:Xamarin.Essentials.ColorExtensions.UWP.ToPlatformColor(System.Drawing.Color)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Xamarin.Essentials</AssemblyName>
Expand Down
Loading