Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+semver:major - Revamped the interfaces and remove some extension met… #3

Merged
merged 13 commits into from
Jun 3, 2019
Merged
File renamed without changes.
19 changes: 14 additions & 5 deletions Common.Build.targets → Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
<Project>
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0' or '$(TargetFramework)'=='netcoreapp2.1'">
<PackageReference Update="Microsoft.Extensions.Hosting.Abstractions" Version="2.1.1" />
<PackageReference Update="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1" />
<PackageReference Update="Microsoft.Extensions.DependencyModel" Version="2.1.0" />
<PackageReference Update="Microsoft.Extensions.DiagnosticAdapter" Version="2.1.0" />
<PackageReference Update="Microsoft.Extensions.Logging.Abstractions" Version="2.1.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.0'">
<PackageReference Update="Microsoft.Extensions.Hosting.Abstractions" Version="3.0.0-preview5.19227.9" />
<PackageReference Update="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0-preview5.19227.9" />
<PackageReference Update="Microsoft.Extensions.DependencyModel" Version="3.0.0-preview5-27626-15" />
<PackageReference Update="Microsoft.Extensions.DiagnosticAdapter" Version="3.0.0-preview5.19227.9" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="System.Diagnostics.DiagnosticSource" Version="4.5.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Rocket.Surgery.Build.Metadata" Version="3.2.0" PrivateAssets="All" />
<PackageReference Include="Rocket.Surgery.Build.Metadata" Version="3.3.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19270-01" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Rocket.Surgery.Extensions.Testing" Version="1.0.0" />
<PackageReference Update="Rocket.Surgery.Extensions.Testing" Version="1.1.7" />
<PackageReference Update="Autofac.Extras.FakeItEasy" Version="5.0.1" />
<PackageReference Update="Bogus" Version="27.0.1" />
<PackageReference Update="coverlet.msbuild" Version="2.6.1" />
<PackageReference Update="FakeItEasy" Version="5.1.1" />
<PackageReference Update="FakeItEasy.Analyzer.CSharp" Version="5.1.1" />
<PackageReference Update="FluentAssertions" Version="5.6.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.1.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Update="xunit" Version="2.4.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Update="XunitXml.TestLogger" Version="2.1.26" />
Expand Down
1 change: 1 addition & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Cake" value="https://www.myget.org/F/cake/api/v3/index.json" protocolVersion="3" />
<add key="RocketSurgeonsGuild" value="https://www.myget.org/F/rocket-surgeons-guild/api/v3/index.json" protocolVersion="3" />

</packageSources>
<!-- used to store credentials -->
<packageSourceCredentials />
Expand Down
3 changes: 2 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resources:
- repository: rsg
type: github
name: RocketSurgeonsGuild/AzureDevopsTemplates
ref: refs/tags/v0.5.5
ref: refs/tags/v0.5.8
endpoint: github

variables:
Expand All @@ -29,6 +29,7 @@ variables:
Artifacts: $(Build.ArtifactStagingDirectory)
VstsArtifacts: "$(Artifacts)"
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "true"
CodeCovToken: '61159895-7ba0-464b-b0ab-558625c0830d'

jobs:
- template: pipeline/cake.yml@rsg
Expand Down
2 changes: 1 addition & 1 deletion cakefile.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#load "nuget:?package=Rocket.Surgery.Cake.Library&version=0.9.3";
#load "nuget:?package=Rocket.Surgery.Cake.Library&version=0.9.10";

Task("Default")
.IsDependentOn("dotnetcore");
Expand Down
2 changes: 1 addition & 1 deletion sample/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Common.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<PreserveCompilationContext>true</PreserveCompilationContext>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
Expand Down
18 changes: 12 additions & 6 deletions src/Builders/Builder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,26 @@ namespace Rocket.Surgery.Builders
/// </summary>
public abstract class Builder : IBuilder
{
private readonly IDictionary<object, object> _items;

protected Builder(IDictionary<object, object> properties)
{
_items = properties ?? new Dictionary<object, object>();
Properties = properties ?? new Dictionary<object, object>();
}

/// <summary>
/// A central location for sharing state between components during the convention building process.
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public virtual object this[object item]
{
get => _items.TryGetValue(item, out var value) ? value : null;
set => _items[item] = value;
get => Properties.TryGetValue(item, out object value) ? value : null;
set => Properties[item] = value;
}

public IDictionary<object, object> Properties => _items;
/// <summary>
/// A central location for sharing state between components during the convention building process.
/// </summary>
public IDictionary<object, object> Properties { get; }
}

/// <summary>
Expand Down
Loading