Skip to content

Commit

Permalink
Use Arcade (dotnet/extensions#586)
Browse files Browse the repository at this point in the history
Use arcade
\n\nCommit migrated from dotnet/extensions@f045899
  • Loading branch information
ryanbrandenburg committed Jan 29, 2019
1 parent 6bd15d8 commit 32f0ad6
Show file tree
Hide file tree
Showing 48 changed files with 206 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Description>Configuration provider that uses files in a directory for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<EnableApiCheck>false</EnableApiCheck>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />

<PropertyGroup>
<GenerateDocumentationFile Condition=" '$(IsTestProject)' != 'true' AND '$(IsSampleProject)' != 'true' ">true</GenerateDocumentationFile>
<GenerateDocumentationFile Condition=" '$(IsUnitTestProject)' != 'true' AND '$(IsSampleProject)' != 'true' ">true</GenerateDocumentationFile>
<PackageTags>configuration</PackageTags>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/FileProviders/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />

<PropertyGroup>
<GenerateDocumentationFile Condition=" '$(IsTestProject)' != 'true' ">true</GenerateDocumentationFile>
<GenerateDocumentationFile Condition=" '$(IsUnitTestProject)' != 'true' ">true</GenerateDocumentationFile>
<PackageTags>files;filesystem</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
<Description>File provider for files in embedded resources for Microsoft.Extensions.FileProviders.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.FileProviders.Embedded.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.FileProviders.Abstractions" />
<ProjectReference Include="..\..\Manifest.MSBuildTask\src\Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.csproj" PrivateAssets="All" ReferenceOutputAssembly="false" />
Expand All @@ -18,7 +23,6 @@
</ItemGroup>

<Target Name="PopulateNuspec" BeforeTargets="GenerateNuspec" DependsOnTargets="BuiltProjectOutputGroup;DocumentationProjectOutputGroup;DebugSymbolsProjectOutputGroup;">

<PropertyGroup>
<NuspecProperties>
id=$(PackageId);
Expand All @@ -40,10 +44,9 @@
OutputDocumentation=@(DocumentationProjectOutputGroupOutput);

<!-- Include the assembly and symbols from the tasks project -->
TaskAssemblyNetStandard=..\..\Manifest.MSBuildTask\src\bin\$(Configuration)\netstandard2.0\$(AssemblyName).Manifest.Task.dll;
TaskSymbolNetStandard=..\..\Manifest.MSBuildTask\src\bin\$(Configuration)\netstandard2.0\$(AssemblyName).Manifest.Task.pdb;
TaskAssemblyNetStandard=$(ArtifactsDir)bin\$(AssemblyName).Manifest.Task\$(Configuration)\netstandard2.0\$(AssemblyName).Manifest.Task.dll;
TaskSymbolNetStandard=$(ArtifactsDir)bin\$(AssemblyName).Manifest.Task\$(Configuration)\netstandard2.0\$(AssemblyName).Manifest.Task.pdb;
</NuspecProperties>
</PropertyGroup>
</Target>

</Project>
4 changes: 0 additions & 4 deletions src/FileProviders/Embedded/src/Properties/AssemblyInfo.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>diagnostics;healthchecks</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ Microsoft.Extensions.Diagnostics.HealthChecks.IHealthChecksBuilder
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>diagnostics;healthchecks</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Diagnostics.HealthChecks.Tests" />
</ItemGroup>

<ItemGroup>
<Compile Include="$(SharedSourceRoot)NonCapturingTimer\**\*.cs" />
<Compile Include="$(SharedSourceRoot)ValueStopwatch\**\*.cs" />
Expand Down
3 changes: 0 additions & 3 deletions src/HealthChecks/HealthChecks/src/Properties/AssemblyInfo.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.JSInterop.Tests" />
</ItemGroup>

</Project>

This file was deleted.

17 changes: 9 additions & 8 deletions src/JSInterop/Microsoft.JSInterop/test/DotNetDispatcherTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Threading.Tasks;
using Xunit;

namespace Microsoft.JSInterop.Test
namespace Microsoft.JSInterop.Tests
{
public class DotNetDispatcherTest
{
Expand Down Expand Up @@ -73,7 +73,7 @@ public void CannotInvokeUnsuitableMethods(string methodIdentifier)
Assert.Equal($"The assembly '{thisAssemblyName}' does not contain a public method with [JSInvokableAttribute(\"{methodIdentifier}\")].", ex.Message);
}

[Fact]
[Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")]
public Task CanInvokeStaticVoidMethod() => WithJSRuntime(jsRuntime =>
{
// Arrange/Act
Expand Down Expand Up @@ -109,7 +109,7 @@ public void CannotInvokeUnsuitableMethods(string methodIdentifier)
Assert.Equal(456, result.IntVal);
});

[Fact]
[Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")]
public Task CanInvokeStaticWithParams() => WithJSRuntime(jsRuntime =>
{
// Arrange: Track a .NET object to use as an arg
Expand Down Expand Up @@ -140,7 +140,7 @@ public void CannotInvokeUnsuitableMethods(string methodIdentifier)
Assert.Equal(1299, resultDto2.IntVal);
});

[Fact]
[Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")]
public Task CanInvokeInstanceVoidMethod() => WithJSRuntime(jsRuntime =>
{
// Arrange: Track some instance
Expand All @@ -155,7 +155,7 @@ public void CannotInvokeUnsuitableMethods(string methodIdentifier)
Assert.True(targetInstance.DidInvokeMyInvocableInstanceVoid);
});

[Fact]
[Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")]
public Task CanInvokeBaseInstanceVoidMethod() => WithJSRuntime(jsRuntime =>
{
// Arrange: Track some instance
Expand Down Expand Up @@ -206,7 +206,7 @@ public void CannotInvokeUnsuitableMethods(string methodIdentifier)
Assert.StartsWith("There is no tracked object with id '1'.", ex.Message);
});

[Fact]
[Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")]
public Task CanInvokeInstanceMethodWithParams() => WithJSRuntime(jsRuntime =>
{
// Arrange: Track some instance plus another object we'll pass as a param
Expand Down Expand Up @@ -242,7 +242,7 @@ public void CannotInvokeWithIncorrectNumberOfParams()
Assert.Equal("In call to 'InvocableStaticWithParams', expected 3 parameters but received 4.", ex.Message);
}

[Fact]
[Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")]
public Task CanInvokeAsyncMethod() => WithJSRuntime(async jsRuntime =>
{
// Arrange: Track some instance plus another object we'll pass as a param
Expand Down Expand Up @@ -320,7 +320,8 @@ public class SomePublicType
protected static void StaticMethodWithoutAttribute() { }
protected static void InstanceMethodWithoutAttribute() { }

[JSInvokable("InvocableStaticVoid")] public static void MyInvocableVoid()
[JSInvokable("InvocableStaticVoid")]
public static void MyInvocableVoid()
{
DidInvokeMyInvocableStaticVoid = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Threading.Tasks;
using Xunit;

namespace Microsoft.JSInterop.Test
namespace Microsoft.JSInterop.Tests
{
public class DotNetObjectRefTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Linq;
using Xunit;

namespace Microsoft.JSInterop.Test
namespace Microsoft.JSInterop.Tests
{
public class JSInProcessRuntimeBaseTest
{
Expand All @@ -21,7 +21,7 @@ public void DispatchesSyncCallsAndDeserializesResults()
};

// Act
var syncResult = runtime.Invoke<TestDTO>("test identifier 1", "arg1", 123, true );
var syncResult = runtime.Invoke<TestDTO>("test identifier 1", "arg1", 123, true);
var call = runtime.InvokeCalls.Single();

// Assert
Expand Down
4 changes: 2 additions & 2 deletions src/JSInterop/Microsoft.JSInterop/test/JSRuntimeBaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Linq;
using Xunit;

namespace Microsoft.JSInterop.Test
namespace Microsoft.JSInterop.Tests
{
public class JSRuntimeBaseTest
{
Expand All @@ -18,7 +18,7 @@ public void DispatchesAsyncCallsWithDistinctAsyncHandles()
var runtime = new TestJSRuntime();

// Act
runtime.InvokeAsync<object>("test identifier 1", "arg1", 123, true );
runtime.InvokeAsync<object>("test identifier 1", "arg1", 123, true);
runtime.InvokeAsync<object>("test identifier 2", "some other arg");

// Assert
Expand Down
2 changes: 1 addition & 1 deletion src/JSInterop/Microsoft.JSInterop/test/JSRuntimeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Threading.Tasks;
using Xunit;

namespace Microsoft.JSInterop.Test
namespace Microsoft.JSInterop.Tests
{
public class JSRuntimeTest
{
Expand Down
12 changes: 6 additions & 6 deletions src/JSInterop/Microsoft.JSInterop/test/JsonUtilTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Generic;
using Xunit;

namespace Microsoft.JSInterop.Test
namespace Microsoft.JSInterop.Tests
{
public class JsonUtilTest
{
Expand Down Expand Up @@ -124,10 +124,10 @@ public void CanSerializeStructToJson()
BoolProperty = true,
NullableIntProperty = 1
};

// Act
var result = Json.Serialize(commandResult);

// Assert
Assert.Equal("{\"stringProperty\":\"Test\",\"boolProperty\":true,\"nullableIntProperty\":1}", result);
}
Expand Down Expand Up @@ -222,12 +222,12 @@ public void NonEmptyConstructorThrowsUsefulException()
// Act
var exception = Assert.Throws<InvalidOperationException>(() =>
{
Json.Deserialize<NonEmptyConstructorPoco>(json);
Json.Deserialize<NonEmptyConstructorPoco>(json);
});

// Assert
Assert.Equal(
$"Cannot deserialize JSON into type '{type.FullName}' because it does not have a public parameterless constructor.",
$"Cannot deserialize JSON into type '{type.FullName}' because it does not have a public parameterless constructor.",
exception.Message);
}

Expand Down Expand Up @@ -277,7 +277,7 @@ public void MemberNameToCamelCase_Invalid(string input)

class NonEmptyConstructorPoco
{
public NonEmptyConstructorPoco(int parameter) {}
public NonEmptyConstructorPoco(int parameter) { }

public int Property { get; set; }
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../src/Microsoft.JSInterop.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

</Project>
3 changes: 3 additions & 0 deletions src/JSInterop/Microsoft.JSInterop/test/xunit.runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"shadowCopy": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Microsoft.Extensions.Localization.IStringLocalizer&lt;T&gt;</Description>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>localization</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>localization</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand All @@ -16,4 +17,8 @@
<Reference Include="Microsoft.Extensions.Logging.Abstractions" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Localization.Tests" />
</ItemGroup>

</Project>
6 changes: 0 additions & 6 deletions src/Localization/Localization/src/Properties/AssemblyInfo.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/ObjectPool/perf/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

[assembly: BenchmarkDotNet.Attributes.AspNetCoreBenchmark]
1 change: 1 addition & 0 deletions src/ObjectPool/src/Microsoft.Extensions.ObjectPool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>pooling</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)..\ParameterDefaultValue\ParameterDefaultValue.cs">
<Pack>true</Pack>
<PackagePath>$(ContentTargetFolders)\cs\netstandard1.0\</PackagePath>
</Compile>
</ItemGroup>

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
4 changes: 4 additions & 0 deletions src/Shared/src/ActivatorUtilities/sharedsources.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<Project>
<PropertyGroup>
<IsShipping>false</IsShipping>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)..\ParameterDefaultValue\ParameterDefaultValue.cs">
<Pack>true</Pack>
Expand Down
8 changes: 0 additions & 8 deletions src/Shared/src/BenchmarkRunner/Directory.Build.props

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Loading

0 comments on commit 32f0ad6

Please sign in to comment.