Skip to content

Commit a4e8598

Browse files
committed
Merge branch 'release/5.1.0' into master
OnTopic 5.1.0 is a minor release which introduces support for mapping constructor parameters (#35) and defining what model to use when mapping associations via the `[MapAs()]` attribute (#41). Primarily, however, it is focused on bug fixes, and resolves a number of priority issues, such as an exception which occurs when deleting topics with associations (#47), topics with deleted references being treated as _unresolved_ (#46), and the inability to move a first child to another parent (#76). Finally, it also includes a number of improvements, such as checking type compatibility before mapping an association (#83), migrating the unit tests to xUnit.net (#66), and establishing integration tests for ASP.NET Core (#39). For a full rollup of new features, improvements, and bug fixes, see Pull Request #85.
2 parents c27e6a2 + 34084fd commit a4e8598

241 files changed

Lines changed: 9568 additions & 2640 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<UseFullSemVerForNuGet>true</UseFullSemVerForNuGet>
1717
<NeutralLanguage>en</NeutralLanguage>
1818
<IncludeSymbols>true</IncludeSymbols>
19+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1920
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2021
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2122
<GenerateDocumentationFile>true</GenerateDocumentationFile>

OnTopic.All/OnTopic.All.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="GitVersion.MsBuild" Version="5.6.6">
14+
<PackageReference Include="GitVersion.MsBuild" Version="5.6.8">
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>
@@ -25,4 +25,4 @@
2525
<ProjectReference Include="..\OnTopic\OnTopic.csproj" />
2626
</ItemGroup>
2727

28-
</Project>
28+
</Project>

OnTopic.All/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# OnTopic Metapackage
22
The `OnTopic.All` metapackage includes a reference to the core OnTopic libraries that most implementations will require. It is recommended that implementers reference this package instead of referencing each of the OnTopic packages individually, unless they have a specific need to customize which packages are referenced.
33

4-
[![OnTopic.Data.Caching package in Internal feed in Azure Artifacts](https://igniasoftware.feeds.visualstudio.com/_apis/public/Packaging/Feeds/46d5f49c-5e1e-47bb-8b14-43be6c719ba8/Packages/3dfb3a0a-c049-407d-959e-546f714dcd0f/Badge)](https://igniasoftware.visualstudio.com/OnTopic/_packaging?_a=package&feed=46d5f49c-5e1e-47bb-8b14-43be6c719ba8&package=3dfb3a0a-c049-407d-959e-546f714dcd0f&preferRelease=true)
4+
[![OnTopic.All package in Internal feed in Azure Artifacts](https://igniasoftware.feeds.visualstudio.com/_apis/public/Packaging/Feeds/46d5f49c-5e1e-47bb-8b14-43be6c719ba8/Packages/fe6dc001-649a-4442-8bf1-2af736c03b08/Badge)](https://www.nuget.org/packages/OnTopic.All/)
55
[![Build Status](https://igniasoftware.visualstudio.com/OnTopic/_apis/build/status/OnTopic-CI-V3?branchName=master)](https://igniasoftware.visualstudio.com/OnTopic/_build/latest?definitionId=7&branchName=master)
66
![NuGet Deployment Status](https://rmsprodscussu1.vsrm.visualstudio.com/A09668467-721c-4517-8d2e-aedbe2a7d67f/_apis/public/Release/badge/bd7f03e0-6fcf-4ec6-939d-4e995668d40f/2/2)
77

@@ -26,6 +26,4 @@ Installation can be performed by providing a `<PackageReference /`> to the `OnTo
2626
<PackageReference Include="OnTopic.All" Version="5.0.0" />
2727
</ItemGroup>
2828
</Project>
29-
```
30-
31-
> *Note:* This package is currently only available on Ignia's private **NuGet** repository. For access, please contact [Ignia](http://www.ignia.com/).
29+
```

OnTopic.AspNetCore.Mvc.Host/Components/MenuViewComponent.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6+
using System.Diagnostics.CodeAnalysis;
67
using Microsoft.AspNetCore.Mvc;
78
using OnTopic.AspNetCore.Mvc.Components;
89
using OnTopic.AspNetCore.Mvc.Controllers;
@@ -28,6 +29,7 @@ namespace OnTopic.AspNetCore.Mvc.Host.Components {
2829
/// cref="TopicController"/>.
2930
/// </para>
3031
/// </remarks>
32+
[ExcludeFromCodeCoverage]
3133
public class MenuViewComponent : MenuViewComponentBase<NavigationTopicViewModel> {
3234

3335
/*==========================================================================================================================

OnTopic.AspNetCore.Mvc.Host/Components/PageLevelNavigationViewComponent.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6+
using System.Diagnostics.CodeAnalysis;
67
using Microsoft.AspNetCore.Mvc;
78
using OnTopic.AspNetCore.Mvc.Components;
89
using OnTopic.AspNetCore.Mvc.Controllers;
@@ -27,6 +28,7 @@ namespace OnTopic.AspNetCore.Mvc.Host.Components {
2728
/// />s, instead of needing to add this data to every view model returned by <see cref="TopicController"/>.
2829
/// </para>
2930
/// </remarks>
31+
[ExcludeFromCodeCoverage]
3032
public class PageLevelNavigationViewComponent : PageLevelNavigationViewComponentBase<NavigationTopicViewModel> {
3133

3234
/*==========================================================================================================================

OnTopic.AspNetCore.Mvc.Host/OnTopic.AspNetCore.Mvc.Host.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net5.0</TargetFrameworks>
4+
<TargetFramework>net5.0</TargetFramework>
55
<UserSecretsId>62eb85bf-f802-4afd-8bec-3d344e1cfc79</UserSecretsId>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

OnTopic.AspNetCore.Mvc.Host/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
| Project Sample OnTopic Site
55
\=============================================================================================================================*/
66
using System;
7+
using System.Diagnostics.CodeAnalysis;
78
using Microsoft.AspNetCore.Hosting;
89
using Microsoft.Extensions.Hosting;
910

@@ -16,6 +17,7 @@ namespace OnTopic.AspNetCore.Mvc.Host {
1617
/// The <see cref="Program"/> class—and it's <see cref="Program.Main(String[])"/> method—represent the entry point into the
1718
/// ASP.NET Core web application.
1819
/// </summary>
20+
[ExcludeFromCodeCoverage]
1921
public static class Program {
2022

2123
/*==========================================================================================================================

OnTopic.AspNetCore.Mvc.Host/SampleActivator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
| Project Sample OnTopic Site
55
\=============================================================================================================================*/
66
using System;
7+
using System.Diagnostics.CodeAnalysis;
78
using Microsoft.AspNetCore.Mvc;
89
using Microsoft.AspNetCore.Mvc.Controllers;
910
using Microsoft.AspNetCore.Mvc.ViewComponents;
@@ -27,6 +28,7 @@ namespace OnTopic.AspNetCore.Mvc.Host {
2728
/// Responsible for creating instances of factories in response to web requests. Represents the Composition Root for
2829
/// Dependency Injection.
2930
/// </summary>
31+
[ExcludeFromCodeCoverage]
3032
public class SampleActivator : IControllerActivator, IViewComponentActivator {
3133

3234
/*==========================================================================================================================

OnTopic.AspNetCore.Mvc.Host/Startup.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
| Client Ignia, LLC
44
| Project Sample OnTopic Site
55
\=============================================================================================================================*/
6+
using System.Diagnostics.CodeAnalysis;
67
using Microsoft.AspNetCore.Builder;
78
using Microsoft.AspNetCore.Hosting;
89
using Microsoft.AspNetCore.Http;
@@ -20,6 +21,7 @@ namespace OnTopic.AspNetCore.Mvc.Host {
2021
/// <summary>
2122
/// Configures the application and sets up dependencies.
2223
/// </summary>
24+
[ExcludeFromCodeCoverage]
2325
public class Startup {
2426

2527
/*==========================================================================================================================
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*==============================================================================================================================
2+
| Author Ignia, LLC
3+
| Client Ignia, LLC
4+
| Project Topics Library
5+
\=============================================================================================================================*/
6+
using System.Diagnostics.CodeAnalysis;
7+
using Microsoft.AspNetCore.Mvc;
8+
using Microsoft.AspNetCore.Routing;
9+
using OnTopic.AspNetCore.Mvc.Controllers;
10+
using OnTopic.Mapping;
11+
using OnTopic.Repositories;
12+
13+
namespace OnTopic.AspNetCore.Mvc.IntegrationTests.Areas.Area.Controllers {
14+
15+
/*============================================================================================================================
16+
| CLASS: AREA CONTROLLER
17+
\---------------------------------------------------------------------------------------------------------------------------*/
18+
/// <summary>
19+
/// The <see cref="AreaController"/> establishes a controller with the same name as the current area—i.e., <c>Area</c>—as a
20+
/// means of testing the <see cref="ServiceCollectionExtensions.MapImplicitAreaControllerRoute(IEndpointRouteBuilder)"/>
21+
/// extension method, and its underlying <see cref="TopicRouteValueTransformer"/>.
22+
/// </summary>
23+
[Area("Area")]
24+
public class AreaController: TopicController {
25+
26+
/*==========================================================================================================================
27+
| CONSTRUCTOR
28+
\-------------------------------------------------------------------------------------------------------------------------*/
29+
/// <summary>
30+
/// Initializes a new instance of a <see cref="AreaController"/> with necessary dependencies.
31+
/// </summary>
32+
/// <returns>A <see cref="AreaController"/> for loading OnTopic views.</returns>
33+
public AreaController(
34+
ITopicRepository topicRepository,
35+
ITopicMappingService topicMappingService
36+
): base(topicRepository, topicMappingService) {}
37+
38+
/*==========================================================================================================================
39+
| GET: ACCORDION
40+
\-------------------------------------------------------------------------------------------------------------------------*/
41+
/// <summary>
42+
/// Exposes a method which will, by default, be associated with views named <c>Accordion</c>.
43+
/// </summary>
44+
/// <returns>A view associated with the <c>Accordion</c> action.</returns>
45+
public IActionResult Accordion() => TopicView(new(), CurrentTopic!.View);
46+
47+
} //Class
48+
} //Namespace

0 commit comments

Comments
 (0)