Fixed notifications library WinRT data binding

WinRT doesn't allow implicit type converters, so had to fork the data
binding implementation. C# gets the elegant solution, and WinRT gets the
less elegant solution. WinRT is only used by C++ and JavaScript, so the
code developers write is different anyways.
This commit is contained in:
Andrew Bares 2017-01-27 11:44:12 -08:00
Родитель 0f2ade90a4
Коммит 0b551c5a76
27 изменённых файлов: 911 добавлений и 21 удалений

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

@ -10,6 +10,9 @@
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************
#if WINRT
using System.Collections.Generic;
#endif
using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
namespace Microsoft.Toolkit.Uwp.Notifications
@ -19,25 +22,56 @@ namespace Microsoft.Toolkit.Uwp.Notifications
/// </summary>
public sealed class AdaptiveProgressBar : IToastBindingGenericChild
{
#if WINRT
/// <summary>
/// Gets a dictionary of the current data bindings, where you can assign new bindings.
/// </summary>
public IDictionary<AdaptiveProgressBarBindableProperty, string> Bindings { get; private set; } = new Dictionary<AdaptiveProgressBarBindableProperty, string>();
#endif
/// <summary>
/// Gets or sets an optional title string. Supports data binding.
/// </summary>
public BindableString Title { get; set; }
public
#if WINRT
string
#else
BindableString
#endif
Title { get; set; }
/// <summary>
/// Gets or sets the value of the progress bar. Supports data binding. Defaults to 0.
/// </summary>
public BindableProgressBarValue Value { get; set; } = AdaptiveProgressBarValue.FromValue(0);
public
#if WINRT
AdaptiveProgressBarValue
#else
BindableProgressBarValue
#endif
Value { get; set; } = AdaptiveProgressBarValue.FromValue(0);
/// <summary>
/// Gets or sets an optional string to be displayed instead of the default percentage string. If this isn't provided, something like "70%" will be displayed.
/// </summary>
public BindableString ValueStringOverride { get; set; }
public
#if WINRT
string
#else
BindableString
#endif
ValueStringOverride { get; set; }
/// <summary>
/// Gets or sets an optional status string, which is displayed underneath the progress bar. If provided, this string should reflect the status of the download, like "Downloading..." or "Installing..."
/// </summary>
public BindableString Status { get; set; }
public
#if WINRT
string
#else
BindableString
#endif
Status { get; set; }
internal Element_AdaptiveProgressBar ConvertToElement()
{
@ -48,13 +82,21 @@ namespace Microsoft.Toolkit.Uwp.Notifications
val = AdaptiveProgressBarValue.FromValue(0);
}
return new Element_AdaptiveProgressBar()
{
Title = Title?.ToXmlString(),
Value = val.ToXmlString(),
ValueStringOverride = ValueStringOverride?.ToXmlString(),
Status = Status?.ToXmlString()
};
var answer = new Element_AdaptiveProgressBar();
#if WINRT
answer.Title = XmlWriterHelper.GetBindingOrAbsoluteXmlValue(Bindings, AdaptiveProgressBarBindableProperty.Title, Title);
answer.Value = XmlWriterHelper.GetBindingOrAbsoluteXmlValue(Bindings, AdaptiveProgressBarBindableProperty.Value, val.ToXmlString());
answer.ValueStringOverride = XmlWriterHelper.GetBindingOrAbsoluteXmlValue(Bindings, AdaptiveProgressBarBindableProperty.ValueStringOverride, ValueStringOverride);
answer.Status = XmlWriterHelper.GetBindingOrAbsoluteXmlValue(Bindings, AdaptiveProgressBarBindableProperty.Status, Status);
#else
answer.Title = Title?.ToXmlString();
answer.Value = val.ToXmlString();
answer.ValueStringOverride = ValueStringOverride?.ToXmlString();
answer.Status = Status?.ToXmlString();
#endif
return answer;
}
}
}

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

@ -0,0 +1,44 @@
// ******************************************************************
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************
// Note that this code is only compiled for WinRT. It is not compiled in any of the other projects.
#if WINRT
namespace Microsoft.Toolkit.Uwp.Notifications
{
/// <summary>
/// An enumeration of the properties that support data binding on <see cref="AdaptiveProgressBar"/> .
/// </summary>
public enum AdaptiveProgressBarBindableProperty
{
/// <summary>
/// An optional title string
/// </summary>
Title,
/// <summary>
/// The value of the progress bar.
/// </summary>
Value,
/// <summary>
/// An optional string to be displayed instead of the default percentage string. If this isn't provided, something like "70%" will be displayed.
/// </summary>
ValueStringOverride,
/// <summary>
/// An optional status string, which is displayed underneath the progress bar. If provided, this string should reflect the status of the download, like "Downloading..." or "Installing...".
/// </summary>
Status
}
}
#endif

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

@ -10,6 +10,9 @@
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************
#if WINRT
using System.Collections.Generic;
#endif
using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
namespace Microsoft.Toolkit.Uwp.Notifications
@ -23,10 +26,23 @@ namespace Microsoft.Toolkit.Uwp.Notifications
ITileBindingContentAdaptiveChild,
IToastBindingGenericChild
{
#if WINRT
/// <summary>
/// Gets a dictionary of the current data bindings, where you can assign new bindings.
/// </summary>
public IDictionary<AdaptiveTextBindableProperty, string> Bindings { get; private set; } = new Dictionary<AdaptiveTextBindableProperty, string>();
#endif
/// <summary>
/// The text to display. Data binding support added in Creators Update, only works for toast top-level text elements.
/// </summary>
public BindableString Text { get; set; }
public
#if WINRT
string
#else
BindableString
#endif
Text { get; set; }
/// <summary>
/// The target locale of the XML payload, specified as a BCP-47 language tags such as "en-US" or "fr-FR". The locale specified here overrides any other specified locale, such as that in binding or visual. If this value is a literal string, this attribute defaults to the user's UI language. If this value is a string reference, this attribute defaults to the locale chosen by Windows Runtime in resolving the string.
@ -96,9 +112,8 @@ namespace Microsoft.Toolkit.Uwp.Notifications
internal Element_AdaptiveText ConvertToElement()
{
return new Element_AdaptiveText()
var answer = new Element_AdaptiveText()
{
Text = Text?.ToXmlString(),
Lang = Language,
Style = HintStyle,
Wrap = HintWrap,
@ -106,6 +121,14 @@ namespace Microsoft.Toolkit.Uwp.Notifications
MinLines = HintMinLines,
Align = HintAlign
};
#if WINRT
answer.Text = XmlWriterHelper.GetBindingOrAbsoluteXmlValue(Bindings, AdaptiveTextBindableProperty.Text, Text);
#else
answer.Text = Text?.ToXmlString();
#endif
return answer;
}
/// <summary>

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

@ -0,0 +1,29 @@
// ******************************************************************
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************
// Note that this code is only compiled for WinRT. It is not compiled in any of the other projects.
#if WINRT
namespace Microsoft.Toolkit.Uwp.Notifications
{
/// <summary>
/// An enumeration of the properties that support data binding on <see cref="AdaptiveText"/> .
/// </summary>
public enum AdaptiveTextBindableProperty
{
/// <summary>
/// The text to display. Added in Creators Update only for toast top-level elements.
/// </summary>
Text
}
}
#endif

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

@ -10,6 +10,9 @@
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************
// Note that this code is NOT compiled for WinRT.
// WinRT uses a different binding system since it doesn't support implicit type converters.
#if !WINRT
namespace Microsoft.Toolkit.Uwp.Notifications
{
/// <summary>
@ -90,3 +93,4 @@ namespace Microsoft.Toolkit.Uwp.Notifications
}
}
}
#endif

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

@ -10,6 +10,9 @@
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************
// Note that this code is NOT compiled for WinRT.
// WinRT uses a different binding system since it doesn't support implicit type converters.
#if !WINRT
namespace Microsoft.Toolkit.Uwp.Notifications
{
/// <summary>
@ -70,3 +73,4 @@ namespace Microsoft.Toolkit.Uwp.Notifications
}
}
}
#endif

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

@ -216,5 +216,26 @@ namespace Microsoft.Toolkit.Uwp.Notifications
return propertyInfo.GetCustomAttributes(true).OfType<Attribute>();
#endif
}
/// <summary>
/// Gets the provided binding value, if it exists. Otherwise, falls back to the absolute value.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="bindings"></param>
/// <param name="bindableProperty"></param>
/// <param name="absoluteValue"></param>
/// <returns></returns>
internal static string GetBindingOrAbsoluteXmlValue<T>(IDictionary<T, string> bindings, T bindableProperty, string absoluteValue)
{
// If a binding is provided, use the binding value
string bindingValue;
if (bindings.TryGetValue(bindableProperty, out bindingValue))
{
return "{" + bindingValue + "}";
}
// Otherwise fallback to the absolute value
return absoluteValue;
}
}
}

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

@ -14,10 +14,12 @@
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveImage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveImageEnums.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveProgressBar.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveProgressBarBindableProperty.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveProgressBarValue.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveSubgroup.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveSubgroupEnums.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveText.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveTextBindableProperty.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveTextEnums.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\BaseImageHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Adaptive\BaseTextHelper.cs" />

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

@ -24,7 +24,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@ -33,14 +33,14 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\Microsoft.Toolkit.Uwp.Notifications.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Publish|AnyCPU'">
<OutputPath>bin\Publish\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<DocumentationFile>bin\Release\Microsoft.Toolkit.Uwp.Notifications.xml</DocumentationFile>
<Optimize>true</Optimize>
<NoStdLib>true</NoStdLib>

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

@ -41,6 +41,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests.Notifications.Por
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests.Notifications.UWP", "UnitTests\UnitTests.Notifications.UWP\UnitTests.Notifications.UWP.csproj", "{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests.Notifications.WinRT", "UnitTests\UnitTests.Notifications.WinRT\UnitTests.Notifications.WinRT.csproj", "{EFA96B3C-857E-4659-B942-6BEF7719F4CA}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Notifications\Microsoft.Toolkit.Uwp.Notifications.Shared\Microsoft.Toolkit.Uwp.Notifications.Shared.projitems*{52f9acf2-55e7-4415-92bd-902cf85ce3da}*SharedItemsImports = 4
@ -48,7 +50,6 @@ Global
Notifications\Microsoft.Toolkit.Uwp.Notifications.Shared\Microsoft.Toolkit.Uwp.Notifications.Shared.projitems*{8bacd7a9-b205-4adf-bda9-763b30a66576}*SharedItemsImports = 13
UnitTests\UnitTests.Notifications.Shared\UnitTests.Notifications.Shared.projitems*{982cc826-aacd-4855-9075-430bb6ce40a9}*SharedItemsImports = 13
Notifications\Microsoft.Toolkit.Uwp.Notifications.Shared\Microsoft.Toolkit.Uwp.Notifications.Shared.projitems*{b63c8a9a-e8f5-4759-8526-9b0d65c4bdb5}*SharedItemsImports = 4
UnitTests\UnitTests.Notifications.Shared\UnitTests.Notifications.Shared.projitems*{bab1caf4-c400-4a7f-a987-c576de63cffd}*SharedItemsImports = 4
Notifications\Microsoft.Toolkit.Uwp.Notifications.Shared\Microsoft.Toolkit.Uwp.Notifications.Shared.projitems*{fb381278-f4ad-4703-a12a-c43ee0b231bd}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -387,6 +388,38 @@ Global
{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD}.Release|x86.ActiveCfg = Release|x86
{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD}.Release|x86.Build.0 = Release|x86
{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD}.Release|x86.Deploy.0 = Release|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Debug|Any CPU.ActiveCfg = Debug|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Debug|ARM.ActiveCfg = Debug|ARM
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Debug|ARM.Build.0 = Debug|ARM
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Debug|ARM.Deploy.0 = Debug|ARM
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Debug|x64.ActiveCfg = Debug|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Debug|x64.Build.0 = Debug|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Debug|x64.Deploy.0 = Debug|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Debug|x86.ActiveCfg = Debug|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Debug|x86.Build.0 = Debug|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Debug|x86.Deploy.0 = Debug|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|Any CPU.ActiveCfg = Release|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|Any CPU.Build.0 = Release|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|Any CPU.Deploy.0 = Release|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|ARM.ActiveCfg = Release|ARM
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|ARM.Build.0 = Release|ARM
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|ARM.Deploy.0 = Release|ARM
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|x64.ActiveCfg = Release|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|x64.Build.0 = Release|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|x64.Deploy.0 = Release|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|x86.ActiveCfg = Release|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|x86.Build.0 = Release|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Publish|x86.Deploy.0 = Release|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|Any CPU.ActiveCfg = Release|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|ARM.ActiveCfg = Release|ARM
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|ARM.Build.0 = Release|ARM
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|ARM.Deploy.0 = Release|ARM
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|x64.ActiveCfg = Release|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|x64.Build.0 = Release|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|x64.Deploy.0 = Release|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|x86.ActiveCfg = Release|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|x86.Build.0 = Release|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -405,5 +438,6 @@ Global
{982CC826-AACD-4855-9075-430BB6CE40A9} = {9333C63A-F64F-4797-82B3-017422668A5D}
{4DE12890-5423-43F0-91EE-83ACE11C1F8C} = {9333C63A-F64F-4797-82B3-017422668A5D}
{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD} = {9333C63A-F64F-4797-82B3-017422668A5D}
{EFA96B3C-857E-4659-B942-6BEF7719F4CA} = {9333C63A-F64F-4797-82B3-017422668A5D}
EndGlobalSection
EndGlobal

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

@ -40,7 +40,14 @@ namespace UnitTests.Notifications
// Data binding should work
AssertAdaptiveChild("<text>{title}</text>", new AdaptiveText()
{
#if WINRT
Bindings =
{
{ AdaptiveTextBindableProperty.Text, "title" }
}
#else
Text = new BindableString("title")
#endif
});
}

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

@ -1526,10 +1526,15 @@ namespace UnitTests.Notifications
public void Test_Toast_ProgressBar_Value()
{
AssertProgressBar("<progressBar value='0'/>", new AdaptiveProgressBar());
// Only non-WinRT supports implicit converters
#if !WINRT
AssertProgressBar("<progressBar value='0.3'/>", new AdaptiveProgressBar()
{
Value = 0.3
});
#endif
AssertProgressBar("<progressBar value='0.3'/>", new AdaptiveProgressBar()
{
Value = AdaptiveProgressBarValue.FromValue(0.3)
@ -1540,14 +1545,21 @@ namespace UnitTests.Notifications
});
AssertProgressBar("<progressBar value='{progressValue}'/>", new AdaptiveProgressBar()
{
#if WINRT
Bindings =
{
{ AdaptiveProgressBarBindableProperty.Value, "progressValue" }
}
#else
Value = new BindableProgressBarValue("progressValue")
#endif
});
try
{
new AdaptiveProgressBar()
{
Value = -4
Value = AdaptiveProgressBarValue.FromValue(-4)
};
Assert.Fail("Exception should have been thrown, only values 0-1 allowed");
}
@ -1557,7 +1569,7 @@ namespace UnitTests.Notifications
{
new AdaptiveProgressBar()
{
Value = 1.3
Value = AdaptiveProgressBarValue.FromValue(1.3)
};
Assert.Fail("Exception should have been thrown, only values 0-1 allowed");
}
@ -1580,7 +1592,7 @@ namespace UnitTests.Notifications
{
AssertProgressBar("<progressBar value='0.3' title='Katy Perry' valueStringOverride='3/10 songs' status='Downloading...'/>", new AdaptiveProgressBar()
{
Value = 0.3,
Value = AdaptiveProgressBarValue.FromValue(0.3),
Title = "Katy Perry",
ValueStringOverride = "3/10 songs",
Status = "Downloading..."
@ -1588,10 +1600,20 @@ namespace UnitTests.Notifications
AssertProgressBar("<progressBar value='{progressValue}' title='{progressTitle}' valueStringOverride='{progressValueOverride}' status='{progressStatus}'/>", new AdaptiveProgressBar()
{
#if WINRT
Bindings =
{
{ AdaptiveProgressBarBindableProperty.Value, "progressValue" },
{ AdaptiveProgressBarBindableProperty.Title, "progressTitle" },
{ AdaptiveProgressBarBindableProperty.ValueStringOverride, "progressValueOverride" },
{ AdaptiveProgressBarBindableProperty.Status, "progressStatus" }
}
#else
Value = new BindableProgressBarValue("progressValue"),
Title = new BindableString("progressTitle"),
ValueStringOverride = new BindableString("progressValueOverride"),
Status = new BindableString("progressStatus")
#endif
});
AssertProgressBar("<progressBar value='0'/>", new AdaptiveProgressBar()

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.5 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.9 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Двоичные данные
UnitTests/UnitTests.Notifications.WinRT/Assets/StoreLogo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.1 KiB

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

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">
<Identity Name="d8486166-24f7-4a4d-b35a-501dc0687c7b"
Publisher="CN=admin"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="d8486166-24f7-4a4d-b35a-501dc0687c7b" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>UnitTests.Notifications.WinRT</DisplayName>
<PublisherDisplayName>admin</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="vstest.executionengine.universal.App"
Executable="$targetnametoken$.exe"
EntryPoint="UnitTests.Notifications.WinRT.App">
<uap:VisualElements
DisplayName="UnitTests.Notifications.WinRT"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="UnitTests.Notifications.WinRT"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

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

@ -0,0 +1,30 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("UnitTests.Notifications.WinRT")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("UnitTests.Notifications.WinRT")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyMetadata("TargetPlatform","UAP")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

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

@ -0,0 +1,29 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Seralize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>

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

@ -0,0 +1,8 @@
<Application
x:Class="UnitTests.Notifications.WinRT.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UnitTests.Notifications.WinRT"
RequestedTheme="Light">
</Application>

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

@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace UnitTests.Notifications.WinRT
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
#if DEBUG
if (System.Diagnostics.Debugger.IsAttached)
{
this.DebugSettings.EnableFrameRateCounter = true;
}
#endif
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.CreateDefaultUI();
// Ensure the current window is active
Window.Current.Activate();
Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.Run(e.Arguments);
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}

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

@ -0,0 +1,192 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{EFA96B3C-857E-4659-B942-6BEF7719F4CA}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UnitTests.Notifications.WinRT</RootNamespace>
<AssemblyName>UnitTests.Notifications.WinRT</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageCertificateKeyFile>UnitTests.Notifications.WinRT_TemporaryKey.pfx</PackageCertificateKeyFile>
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">14.0</UnitTestPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<CodeAnalysisRuleSet>UnitTests.Notifications.WinRT.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
<CodeAnalysisRuleSet>UnitTests.Notifications.WinRT.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<CodeAnalysisRuleSet>UnitTests.Notifications.WinRT.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
<CodeAnalysisRuleSet>UnitTests.Notifications.WinRT.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<CodeAnalysisRuleSet>UnitTests.Notifications.WinRT.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
<CodeAnalysisRuleSet>UnitTests.Notifications.WinRT.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Publish|x86'">
<OutputPath>bin\x86\Publish\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;WINRT</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>UnitTests.Notifications.WinRT.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Publish|ARM'">
<OutputPath>bin\ARM\Publish\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;WINRT</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>UnitTests.Notifications.WinRT.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Publish|x64'">
<OutputPath>bin\x64\Publish\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;WINRT</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>UnitTests.Notifications.WinRT.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<!--A reference to the entire .Net Framework and Windows SDK are automatically included-->
<None Include="project.json" />
<SDKReference Include="MSTestFramework.Universal, Version=$(UnitTestPlatformVersion)" />
<SDKReference Include="TestPlatform.Universal, Version=$(UnitTestPlatformVersion)" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UnitTestApp.xaml.cs">
<DependentUpon>UnitTestApp.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="UnitTestApp.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="UnitTests.Notifications.WinRT.ruleset" />
<None Include="UnitTests.Notifications.WinRT_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Content Include="Properties\UnitTestApp.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Notifications\Microsoft.Toolkit.Uwp.Notifications.WinRT\Microsoft.Toolkit.Uwp.Notifications.WinRT.csproj">
<Project>{b63c8a9a-e8f5-4759-8526-9b0d65c4bdb5}</Project>
<Name>Microsoft.Toolkit.Uwp.Notifications.WinRT</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\UnitTests.Notifications.Shared\UnitTests.Notifications.Shared.projitems" Label="Shared" />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

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

@ -0,0 +1,236 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects." ToolsVersion="14.0">
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
<Name Resource="MinimumRecommendedRules_Name" />
<Description Resource="MinimumRecommendedRules_Description" />
</Localization>
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1001" Action="Warning" />
<Rule Id="CA1009" Action="Warning" />
<Rule Id="CA1016" Action="Warning" />
<Rule Id="CA1033" Action="Warning" />
<Rule Id="CA1049" Action="Warning" />
<Rule Id="CA1060" Action="Warning" />
<Rule Id="CA1061" Action="Warning" />
<Rule Id="CA1063" Action="Warning" />
<Rule Id="CA1065" Action="Warning" />
<Rule Id="CA1301" Action="Warning" />
<Rule Id="CA1400" Action="Warning" />
<Rule Id="CA1401" Action="Warning" />
<Rule Id="CA1403" Action="Warning" />
<Rule Id="CA1404" Action="Warning" />
<Rule Id="CA1405" Action="Warning" />
<Rule Id="CA1410" Action="Warning" />
<Rule Id="CA1415" Action="Warning" />
<Rule Id="CA1821" Action="Warning" />
<Rule Id="CA1900" Action="Warning" />
<Rule Id="CA1901" Action="Warning" />
<Rule Id="CA2002" Action="Warning" />
<Rule Id="CA2100" Action="Warning" />
<Rule Id="CA2101" Action="Warning" />
<Rule Id="CA2108" Action="Warning" />
<Rule Id="CA2111" Action="Warning" />
<Rule Id="CA2112" Action="Warning" />
<Rule Id="CA2114" Action="Warning" />
<Rule Id="CA2116" Action="Warning" />
<Rule Id="CA2117" Action="Warning" />
<Rule Id="CA2122" Action="Warning" />
<Rule Id="CA2123" Action="Warning" />
<Rule Id="CA2124" Action="Warning" />
<Rule Id="CA2126" Action="Warning" />
<Rule Id="CA2131" Action="Warning" />
<Rule Id="CA2132" Action="Warning" />
<Rule Id="CA2133" Action="Warning" />
<Rule Id="CA2134" Action="Warning" />
<Rule Id="CA2137" Action="Warning" />
<Rule Id="CA2138" Action="Warning" />
<Rule Id="CA2140" Action="Warning" />
<Rule Id="CA2141" Action="Warning" />
<Rule Id="CA2146" Action="Warning" />
<Rule Id="CA2147" Action="Warning" />
<Rule Id="CA2149" Action="Warning" />
<Rule Id="CA2200" Action="Warning" />
<Rule Id="CA2202" Action="Warning" />
<Rule Id="CA2207" Action="Warning" />
<Rule Id="CA2212" Action="Warning" />
<Rule Id="CA2213" Action="Warning" />
<Rule Id="CA2214" Action="Warning" />
<Rule Id="CA2216" Action="Warning" />
<Rule Id="CA2220" Action="Warning" />
<Rule Id="CA2229" Action="Warning" />
<Rule Id="CA2231" Action="Warning" />
<Rule Id="CA2232" Action="Warning" />
<Rule Id="CA2235" Action="Warning" />
<Rule Id="CA2236" Action="Warning" />
<Rule Id="CA2237" Action="Warning" />
<Rule Id="CA2238" Action="Warning" />
<Rule Id="CA2240" Action="Warning" />
<Rule Id="CA2241" Action="Warning" />
<Rule Id="CA2242" Action="Warning" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1000" Action="None" />
<Rule Id="SA1001" Action="None" />
<Rule Id="SA1002" Action="None" />
<Rule Id="SA1003" Action="None" />
<Rule Id="SA1004" Action="None" />
<Rule Id="SA1005" Action="None" />
<Rule Id="SA1006" Action="None" />
<Rule Id="SA1007" Action="None" />
<Rule Id="SA1008" Action="None" />
<Rule Id="SA1009" Action="None" />
<Rule Id="SA1010" Action="None" />
<Rule Id="SA1011" Action="None" />
<Rule Id="SA1012" Action="None" />
<Rule Id="SA1013" Action="None" />
<Rule Id="SA1014" Action="None" />
<Rule Id="SA1015" Action="None" />
<Rule Id="SA1016" Action="None" />
<Rule Id="SA1017" Action="None" />
<Rule Id="SA1018" Action="None" />
<Rule Id="SA1019" Action="None" />
<Rule Id="SA1020" Action="None" />
<Rule Id="SA1021" Action="None" />
<Rule Id="SA1022" Action="None" />
<Rule Id="SA1023" Action="None" />
<Rule Id="SA1024" Action="None" />
<Rule Id="SA1025" Action="None" />
<Rule Id="SA1026" Action="None" />
<Rule Id="SA1027" Action="None" />
<Rule Id="SA1028" Action="None" />
<Rule Id="SA1100" Action="None" />
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1102" Action="None" />
<Rule Id="SA1103" Action="None" />
<Rule Id="SA1104" Action="None" />
<Rule Id="SA1105" Action="None" />
<Rule Id="SA1106" Action="None" />
<Rule Id="SA1107" Action="None" />
<Rule Id="SA1108" Action="None" />
<Rule Id="SA1110" Action="None" />
<Rule Id="SA1111" Action="None" />
<Rule Id="SA1112" Action="None" />
<Rule Id="SA1113" Action="None" />
<Rule Id="SA1114" Action="None" />
<Rule Id="SA1115" Action="None" />
<Rule Id="SA1116" Action="None" />
<Rule Id="SA1117" Action="None" />
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1119" Action="None" />
<Rule Id="SA1120" Action="None" />
<Rule Id="SA1121" Action="None" />
<Rule Id="SA1122" Action="None" />
<Rule Id="SA1123" Action="None" />
<Rule Id="SA1124" Action="None" />
<Rule Id="SA1125" Action="None" />
<Rule Id="SA1127" Action="None" />
<Rule Id="SA1128" Action="None" />
<Rule Id="SA1129" Action="None" />
<Rule Id="SA1130" Action="None" />
<Rule Id="SA1131" Action="None" />
<Rule Id="SA1132" Action="None" />
<Rule Id="SA1133" Action="None" />
<Rule Id="SA1134" Action="None" />
<Rule Id="SA1200" Action="None" />
<Rule Id="SA1201" Action="None" />
<Rule Id="SA1202" Action="None" />
<Rule Id="SA1203" Action="None" />
<Rule Id="SA1204" Action="None" />
<Rule Id="SA1205" Action="None" />
<Rule Id="SA1206" Action="None" />
<Rule Id="SA1207" Action="None" />
<Rule Id="SA1208" Action="None" />
<Rule Id="SA1209" Action="None" />
<Rule Id="SA1210" Action="None" />
<Rule Id="SA1211" Action="None" />
<Rule Id="SA1212" Action="None" />
<Rule Id="SA1213" Action="None" />
<Rule Id="SA1214" Action="None" />
<Rule Id="SA1216" Action="None" />
<Rule Id="SA1217" Action="None" />
<Rule Id="SA1300" Action="None" />
<Rule Id="SA1302" Action="None" />
<Rule Id="SA1303" Action="None" />
<Rule Id="SA1304" Action="None" />
<Rule Id="SA1306" Action="None" />
<Rule Id="SA1307" Action="None" />
<Rule Id="SA1308" Action="None" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1310" Action="None" />
<Rule Id="SA1311" Action="None" />
<Rule Id="SA1312" Action="None" />
<Rule Id="SA1313" Action="None" />
<Rule Id="SA1400" Action="None" />
<Rule Id="SA1401" Action="None" />
<Rule Id="SA1402" Action="None" />
<Rule Id="SA1403" Action="None" />
<Rule Id="SA1404" Action="None" />
<Rule Id="SA1405" Action="None" />
<Rule Id="SA1406" Action="None" />
<Rule Id="SA1407" Action="None" />
<Rule Id="SA1408" Action="None" />
<Rule Id="SA1410" Action="None" />
<Rule Id="SA1411" Action="None" />
<Rule Id="SA1500" Action="None" />
<Rule Id="SA1501" Action="None" />
<Rule Id="SA1502" Action="None" />
<Rule Id="SA1503" Action="None" />
<Rule Id="SA1504" Action="None" />
<Rule Id="SA1505" Action="None" />
<Rule Id="SA1506" Action="None" />
<Rule Id="SA1507" Action="None" />
<Rule Id="SA1508" Action="None" />
<Rule Id="SA1509" Action="None" />
<Rule Id="SA1510" Action="None" />
<Rule Id="SA1511" Action="None" />
<Rule Id="SA1512" Action="None" />
<Rule Id="SA1513" Action="None" />
<Rule Id="SA1514" Action="None" />
<Rule Id="SA1515" Action="None" />
<Rule Id="SA1516" Action="None" />
<Rule Id="SA1517" Action="None" />
<Rule Id="SA1518" Action="None" />
<Rule Id="SA1519" Action="None" />
<Rule Id="SA1520" Action="None" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1601" Action="None" />
<Rule Id="SA1602" Action="None" />
<Rule Id="SA1604" Action="None" />
<Rule Id="SA1605" Action="None" />
<Rule Id="SA1606" Action="None" />
<Rule Id="SA1607" Action="None" />
<Rule Id="SA1608" Action="None" />
<Rule Id="SA1610" Action="None" />
<Rule Id="SA1611" Action="None" />
<Rule Id="SA1612" Action="None" />
<Rule Id="SA1613" Action="None" />
<Rule Id="SA1614" Action="None" />
<Rule Id="SA1615" Action="None" />
<Rule Id="SA1616" Action="None" />
<Rule Id="SA1617" Action="None" />
<Rule Id="SA1618" Action="None" />
<Rule Id="SA1619" Action="None" />
<Rule Id="SA1620" Action="None" />
<Rule Id="SA1621" Action="None" />
<Rule Id="SA1622" Action="None" />
<Rule Id="SA1623" Action="None" />
<Rule Id="SA1624" Action="None" />
<Rule Id="SA1625" Action="None" />
<Rule Id="SA1626" Action="None" />
<Rule Id="SA1627" Action="None" />
<Rule Id="SA1633" Action="None" />
<Rule Id="SA1634" Action="None" />
<Rule Id="SA1635" Action="None" />
<Rule Id="SA1636" Action="None" />
<Rule Id="SA1637" Action="None" />
<Rule Id="SA1638" Action="None" />
<Rule Id="SA1640" Action="None" />
<Rule Id="SA1641" Action="None" />
<Rule Id="SA1642" Action="None" />
<Rule Id="SA1643" Action="None" />
<Rule Id="SA1648" Action="None" />
<Rule Id="SA1649" Action="None" />
<Rule Id="SA1651" Action="None" />
<Rule Id="SA1652" Action="None" />
</Rules>
</RuleSet>

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

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