Cleanup windows and touch names (#2605)

This commit is contained in:
Martijn van Dijk 2018-02-11 18:57:55 +01:00 коммит произвёл Tomasz Cielecki
Родитель 4485e59fd1
Коммит 96a7c8efc4
11 изменённых файлов: 15 добавлений и 97 удалений

Просмотреть файл

@ -9,7 +9,7 @@ using MvvmCross.Exceptions;
namespace MvvmCross.Plugin.Accelerometer.Platform.Uap namespace MvvmCross.Plugin.Accelerometer.Platform.Uap
{ {
public class MvxWindowsCommonAccelerometer : IMvxAccelerometer public class MvxWindowsAccelerometer : IMvxAccelerometer
{ {
private bool _started; private bool _started;
private Windows.Devices.Sensors.Accelerometer _accelerometer; private Windows.Devices.Sensors.Accelerometer _accelerometer;

Просмотреть файл

@ -12,7 +12,7 @@ namespace MvvmCross.Plugin.Accelerometer.Platform.Uap
{ {
public void Load() public void Load()
{ {
Mvx.RegisterSingleton<IMvxAccelerometer>(new MvxWindowsCommonAccelerometer()); Mvx.RegisterSingleton<IMvxAccelerometer>(new MvxWindowsAccelerometer());
} }
} }
} }

Просмотреть файл

@ -7,7 +7,7 @@ using MvvmCross.UI;
namespace MvvmCross.Plugin.Color.Platform.Uap namespace MvvmCross.Plugin.Color.Platform.Uap
{ {
public class MvxWindowsCommonColor : IMvxNativeColor public class MvxWindowsColor : IMvxNativeColor
{ {
public object ToNative(MvxColor mvxColor) public object ToNative(MvxColor mvxColor)
{ {

Просмотреть файл

@ -13,7 +13,7 @@ namespace MvvmCross.Plugin.Color.Platform.Uap
{ {
public void Load() public void Load()
{ {
Mvx.RegisterSingleton<IMvxNativeColor>(new MvxWindowsCommonColor()); Mvx.RegisterSingleton<IMvxNativeColor>(new MvxWindowsColor());
} }
} }
} }

Просмотреть файл

@ -15,7 +15,7 @@ using MvvmCross.Platform.Uap.Base.Platform;
namespace MvvmCross.Plugin.File.Platform.Uap namespace MvvmCross.Plugin.File.Platform.Uap
{ {
// note that we use the full WindowsStore name here deliberately to avoid 'Store' naming confusion // note that we use the full WindowsStore name here deliberately to avoid 'Store' naming confusion
public class MvxWindowsCommonFileStore : MvxFileStoreBase public class MvxWindowsFileStore : MvxFileStoreBase
{ {
public override Stream OpenRead(string path) public override Stream OpenRead(string path)
{ {

Просмотреть файл

@ -12,8 +12,8 @@ namespace MvvmCross.Plugin.File.Platform.Uap
{ {
public void Load() public void Load()
{ {
Mvx.RegisterType<IMvxFileStore, MvxWindowsCommonFileStore>(); Mvx.RegisterType<IMvxFileStore, MvxWindowsFileStore>();
Mvx.RegisterType<IMvxFileStoreAsync, MvxWindowsCommonFileStore>(); Mvx.RegisterType<IMvxFileStoreAsync, MvxWindowsFileStore>();
} }
} }
} }

Просмотреть файл

@ -17,15 +17,15 @@ namespace MvvmCross.Platform.Tvos.Base.Platform
private static bool ReadIsTvosVersionOrHigher(int target, bool defaultValue) private static bool ReadIsTvosVersionOrHigher(int target, bool defaultValue)
{ {
IMvxTvosSystem touchSystem; IMvxTvosSystem tvosSystem;
Mvx.TryResolve<IMvxTvosSystem>(out touchSystem); Mvx.TryResolve<IMvxTvosSystem>(out tvosSystem);
if (touchSystem == null) if (tvosSystem == null)
{ {
MvxLog.Instance.Warn("IMvxTvosSystem not found - so assuming we {1} on tvOS {0} or later", target, defaultValue ? "are" : "are not"); MvxLog.Instance.Warn("IMvxTvosSystem not found - so assuming we {1} on tvOS {0} or later", target, defaultValue ? "are" : "are not");
return defaultValue; return defaultValue;
} }
return touchSystem.Version.Major >= target; return tvosSystem.Version.Major >= target;
} }
} }
} }

Просмотреть файл

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains Runtime Directives, specifications about types your application accesses
through reflection and other dynamic code patterns. Runtime Directives are used to control the
.NET Native optimizer and ensure that it does not remove code accessed by your library. If your
library does not do any reflection, then you generally do not need to edit this file. However,
if your library reflects over types, especially types passed to it or derived from its types,
then you should write Runtime Directives.
The most common use of reflection in libraries is to discover information about types passed
to the library. Runtime Directives have three ways to express requirements on types passed to
your library.
1. Parameter, GenericParameter, TypeParameter, TypeEnumerableParameter
Use these directives to reflect over types passed as a parameter.
2. SubTypes
Use a SubTypes directive to reflect over types derived from another type.
3. AttributeImplies
Use an AttributeImplies directive to indicate that your library needs to reflect over
types or methods decorated with an attribute.
For more information on writing Runtime Directives for libraries, please visit
https://go.microsoft.com/fwlink/?LinkID=391919
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Library Name="MvvmCross.Platform.Uwp">
<!-- add directives for your library here -->
</Library>
</Directives>

Просмотреть файл

@ -1,16 +0,0 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}

Просмотреть файл

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains Runtime Directives, specifications about types your application accesses
through reflection and other dynamic code patterns. Runtime Directives are used to control the
.NET Native optimizer and ensure that it does not remove code accessed by your library. If your
library does not do any reflection, then you generally do not need to edit this file. However,
if your library reflects over types, especially types passed to it or derived from its types,
then you should write Runtime Directives.
The most common use of reflection in libraries is to discover information about types passed
to the library. Runtime Directives have three ways to express requirements on types passed to
your library.
1. Parameter, GenericParameter, TypeParameter, TypeEnumerableParameter
Use these directives to reflect over types passed as a parameter.
2. SubTypes
Use a SubTypes directive to reflect over types derived from another type.
3. AttributeImplies
Use an AttributeImplies directive to indicate that your library needs to reflect over
types or methods decorated with an attribute.
For more information on writing Runtime Directives for libraries, please visit
https://go.microsoft.com/fwlink/?LinkID=391919
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Library Name="MvvmCross.Binding.UWP">
<!-- add directives for your library here -->
</Library>
</Directives>

Просмотреть файл

@ -17,15 +17,15 @@ namespace MvvmCross.Platform.Ios.Base.Platform
private static bool ReadIsIosVersionOrHigher(int target, bool defaultValue) private static bool ReadIsIosVersionOrHigher(int target, bool defaultValue)
{ {
IMvxIosSystem touchSystem; IMvxIosSystem iosSystem;
Mvx.TryResolve<IMvxIosSystem>(out touchSystem); Mvx.TryResolve<IMvxIosSystem>(out iosSystem);
if (touchSystem == null) if (iosSystem == null)
{ {
MvxLog.Instance.Warn("IMvxIosSystem not found - so assuming we {1} on iOS {0} or later", target, defaultValue ? "are" : "are not"); MvxLog.Instance.Warn("IMvxIosSystem not found - so assuming we {1} on iOS {0} or later", target, defaultValue ? "are" : "are not");
return defaultValue; return defaultValue;
} }
return touchSystem.Version.Major >= target; return iosSystem.Version.Major >= target;
} }
} }
} }