Skip to content

Commit

Permalink
Update comments and fix mistakes
Browse files Browse the repository at this point in the history
- Fix message text.
- Fix Include logic.
- Fix spelling mistakes.
- Fix leading whitespace.
- Fix casing in code and comments.
  • Loading branch information
Nirmal4G committed Oct 22, 2022
1 parent c8bd81b commit 896e417
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'">
<!-- Define the WINDOWS_UWP conditional symbol, since the Windows.Data.Xml and the Windows.UI.Notification namespaces are available -->
<!-- Define the WINDOWS_UWP conditional symbol, since the 'Windows.Data.Xml' and the 'Windows.UI.Notification' namespaces are available -->
<DefineConstants>$(DefineConstants);WINDOWS_UWP;WIN32</DefineConstants>
</PropertyGroup>

Expand Down Expand Up @@ -42,13 +42,12 @@
<None Include="Microsoft.Toolkit.Uwp.Notifications.targets" Pack="true" PackagePath="build\native" />
</ItemGroup>

<!-- Desktop Win32 apps -->
<!-- For Desktop Win32 apps' WinRT APIs support -->
<ItemGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1'">
<!-- Reference Windows SDK NuGet of correct target platform version -->
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
</ItemGroup>

<!-- The .NET Core desktop apps also need the Registry NuGet package and System.Reflection.Emit for generating COM class dynamically -->
<!-- The .NET Core desktop apps also need the Registry NuGet package and 'System.Reflection.Emit' for generating COM class dynamically -->
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'">
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
Expand All @@ -59,12 +58,15 @@
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(ExtrasUwpMetaPackageVersion)" PrivateAssets="All" IsImplicitlyDefined="true" />
</ItemGroup>

<!-- Native (C++) doesn't need 'System.ValueTuple' (plus it's incompatible with this package) -->
<!-- Native (C++) does not need 'System.ValueTuple' (plus it is incompatible with this package) -->
<ItemGroup Condition="'$(TargetFramework)' != 'native'">
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>

<!-- Set the nuspec properties. Dependent on version which isn't updated till after 'GetBuildVersion'. Condition ensures we only set once since this runs multiple times for each target. -->
<!--
Set the nuspec properties. Dependent on version which is not updated till after 'GetBuildVersion'.
Condition ensures we only set once since this runs multiple times for each target.
-->
<Target Name="SetNuspecProperties" AfterTargets="GetBuildVersion">
<PropertyGroup Condition="'$(NuspecProperties)' == ''">
<NuspecProperties>buildOutput=bin\$(Configuration);version=$(Version)</NuspecProperties>
Expand Down
8 changes: 4 additions & 4 deletions SmokeTests/SmokeTests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
Condition="'$(NuGetPackageVersion)' == ''">
<Output TaskParameter="ConsoleOutput" PropertyName="NuGetPackageVersion" />
</Exec>
<Message Text="Got GitBank Version... $(NuGetPackageVersion)" Importance="High" />
<Message Text="Got NuGet Package Version... $(NuGetPackageVersion)" Importance="High" />
</Target>

<Target Name="Build"
Expand All @@ -44,7 +44,7 @@
<Message Importance="High" Text="Building project %(ProjectsToBuild.Identity): (%(ProjectsToBuild.Configuration)|%(ProjectsToBuild.Platform))" />

<MSBuild Projects="SmokeTest.csproj"
Targets="restore;build"
Targets="Restore;Build"
Properties="CurrentProject=%(ProjectsToBuild.Identity);Configuration=%(ProjectsToBuild.Configuration);Platform=%(ProjectsToBuild.Platform);NuGetPackageVersion=$(NuGetPackageVersion)" />
</Target>

Expand Down Expand Up @@ -77,10 +77,10 @@

<Target Name="CheckNuGetPackages">
<PropertyGroup>
<NuGetOutputPath>$(MSBuildThisFileDirectory)..\bin\nupkg</NuGetOutputPath>
<NuGetOutputPath>$(MSBuildThisFileDirectory)..\bin\nupkg\</NuGetOutputPath>
</PropertyGroup>
<ItemGroup>
<NuGetPackage Include="$(NuGetOutputPath)\*.nupkg" />
<NuGetPackage Include="$(NuGetOutputPath)*.nupkg" />
</ItemGroup>
<Error Condition="'@(NuGetPackage)' == ''" Text="Directory '$(NuGetOutputPath)' is empty" />
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class ColorPickerButtonTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ConstrainedBoxTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion UITests/UITests.Tests.Shared/Controls/GridSplitterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class GridSplitterTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion UITests/UITests.Tests.Shared/Controls/RangeSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class RangeSelectorTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class RichSuggestBoxTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion UITests/UITests.Tests.Shared/Controls/TextBoxMaskTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class TextBoxMaskTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion UITests/UITests.Tests.Shared/Examples/SimpleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SimpleTest : UITestBase
[TestProperty("Platform", "Any")]
public static void ClassInitialize(TestContext testContext)
{
TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp);
TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp);
}

[TestMethod]
Expand Down
8 changes: 4 additions & 4 deletions UITests/UITests.Tests.Shared/TestAssembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public static void AssemblyInitialize(TestContext testContext)
[AssemblyCleanup]
public static void AssemblyCleanup()
{
TestEnvironment.AssemblyCleanupWorker(UITestBase.WinUICsUWPSampleApp);
TestEnvironment.AssemblyCleanupWorker(UITestBase.WinUICSharpUWPSampleApp);
}

private static async Task InitalizeComService()
private static async Task InitializeComService()
{
CommunicationService = new AppServiceConnection();

Expand Down Expand Up @@ -84,7 +84,7 @@ internal static async Task<AppServiceResponse> SendCustomMessageToApp(ValueSet m
{
if (CommunicationService is null)
{
await InitalizeComService();
await InitializeComService();
}

return await CommunicationService.SendMessageAsync(message);
Expand All @@ -94,7 +94,7 @@ private static async Task<bool> SendMessageToApp(ValueSet message)
{
if (CommunicationService is null)
{
await InitalizeComService();
await InitializeComService();
}

var response = await CommunicationService.SendMessageAsync(message);
Expand Down
8 changes: 4 additions & 4 deletions UITests/UITests.Tests.Shared/UITestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public abstract class UITestBase
{
private TestSetupHelper helper;

internal static TestApplicationInfo WinUICsUWPSampleApp
internal static TestApplicationInfo WinUICSharpUWPSampleApp
{
get
{
Expand Down Expand Up @@ -132,13 +132,13 @@ private static string GetPageForTest(TestContext testContext)

Log.Comment($"Found {testMethodString}.");

var testpageAttributeString = $"\"{typeof(TestPageAttribute)}\" on {testMethodString}";
var testPageAttributeString = $"\"{typeof(TestPageAttribute)}\" on {testMethodString}";
if (method.GetCustomAttribute(typeof(TestPageAttribute), true) is not TestPageAttribute attribute)
{
throw new Exception($"Could not find {testpageAttributeString}.");
throw new Exception($"Could not find {testPageAttributeString}.");
}

Log.Comment($"Found {testpageAttributeString}. {nameof(TestPageAttribute.XamlFile)}: {attribute.XamlFile}.");
Log.Comment($"Found {testPageAttributeString}. {nameof(TestPageAttribute.XamlFile)}: {attribute.XamlFile}.");

return attribute.XamlFile;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace UnitTests.Extensions
{
[TestClass]
[Ignore("Ignored until issue on .Net Native is fixed. These are working.")]
[Ignore("Ignored until issue on .NET Native is fixed. These are working.")]
public class Test_DispatcherQueueExtensions
{
private const int TIME_OUT = 5000;
Expand Down
2 changes: 1 addition & 1 deletion build/Windows.Toolkit.VisualStudio.Design.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<ItemGroup>
<AppDesigner Include="Properties\"/>
<!-- The 'LogicalName' metadata changes the default manifest naming scheme -->
<!-- The 'LogicalName' metadata changes the default manifest naming scheme -->
<EmbeddedResource Include="Icons\*.icon.png" LogicalName="$(ParentProjectRootNamespace).%(Filename)%(Extension)"/>
<EmbeddedResource Include="$(ParentProjectOutputPath)$(ParentProjectName).xml" LinkBase="Properties\" LogicalName="%(Filename)%(Extension)"/>
</ItemGroup>
Expand Down

0 comments on commit 896e417

Please sign in to comment.