Skip to content

Commit ef23c1f

Browse files
committed
Merge branch 'release/5.2.0' into master
OnTopic Editor 5.2.0 is a very minor update, which doesn't introduce any new public-facing features, but does make a number of performance improvements, such as reducing the amount of mapping that needs to be performed for each topic by relying on the new lightweight `PermittedContentType` view model (#50) and supporting the new `AttributeDictionary` constructor for view models (#49). In addition, it also includes a number of internal code improvements, such as adoption of new C# 10 capabilities (#52), including global using directives (#53). See Pull Request #57 for details.
2 parents 3b468d3 + 12ea593 commit ef23c1f

113 files changed

Lines changed: 9207 additions & 7602 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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<Project>
22

33
<PropertyGroup>
4-
<LangVersion>9.0</LangVersion>
4+
<LangVersion>10.0</LangVersion>
55
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
66
<Nullable>enable</Nullable>
77
<AnalysisLevel>latest</AnalysisLevel>
88
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
9+
<ImplicitUsings>enable</ImplicitUsings>
910
<NoWarn>NU5118</NoWarn>
1011
</PropertyGroup>
1112

1213
<PropertyGroup>
1314
<Product>OnTopic</Product>
1415
<Authors>Ignia</Authors>
1516
<Company>Ignia</Company>
16-
<Copyright2021 Ignia, LLC</Copyright>
17+
<Copyright2022 Ignia, LLC</Copyright>
1718
<PackageProjectUrl>https://github.com/Ignia/Topic-Editor-MVC/</PackageProjectUrl>
1819
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1920
<UseFullSemVerForNuGet>true</UseFullSemVerForNuGet>

OnTopic.Editor.AspNetCore.All/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System;
76
using System.Runtime.InteropServices;
87

98
/*==============================================================================================================================

OnTopic.Editor.AspNetCore.Attributes/BooleanAttribute/BooleanAttributeBindingModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using OnTopic.Editor.AspNetCore.Models;
76

87
namespace OnTopic.Editor.AspNetCore.Attributes.BooleanAttribute {
98

OnTopic.Editor.AspNetCore.Attributes/BooleanAttribute/BooleanAttributeDescriptor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using OnTopic.Metadata;
76

87
namespace OnTopic.Editor.AspNetCore.Attributes.BooleanAttribute {
98

OnTopic.Editor.AspNetCore.Attributes/BooleanAttribute/BooleanAttributeDescriptorViewModel.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using OnTopic.Editor.AspNetCore.Models.Metadata;
76

87
namespace OnTopic.Editor.AspNetCore.Attributes.BooleanAttribute {
98

@@ -15,6 +14,19 @@ namespace OnTopic.Editor.AspNetCore.Attributes.BooleanAttribute {
1514
/// </summary>
1615
public record BooleanAttributeDescriptorViewModel: AttributeDescriptorViewModel {
1716

17+
/*==========================================================================================================================
18+
| CONSTRUCTOR
19+
\-------------------------------------------------------------------------------------------------------------------------*/
20+
/// <summary>
21+
/// Initializes a new <see cref="BooleanAttributeDescriptorViewModel"/> with an <paramref name="attributes"/> dictionary.
22+
/// </summary>
23+
/// <param name="attributes">An <see cref="AttributeDictionary"/> of attribute values.</param>
24+
public BooleanAttributeDescriptorViewModel(AttributeDictionary attributes): base(attributes) { }
25+
26+
/// <summary>
27+
/// Initializes a new instance of the <see cref="BooleanAttributeDescriptorViewModel"/> class.
28+
/// </summary>
29+
public BooleanAttributeDescriptorViewModel(): base() {}
1830

1931
} //Class
2032
} //Namespace

OnTopic.Editor.AspNetCore.Attributes/BooleanAttribute/BooleanAttributeViewModel.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System;
76
using System.Diagnostics.CodeAnalysis;
8-
using OnTopic.Editor.AspNetCore.Models;
9-
using OnTopic.Editor.AspNetCore.Models.Metadata;
107

118
namespace OnTopic.Editor.AspNetCore.Attributes.BooleanAttribute {
129

OnTopic.Editor.AspNetCore.Attributes/BooleanAttribute/BooleanViewComponent.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using Microsoft.AspNetCore.Mvc;
76
using OnTopic.AspNetCore.Mvc.Components;
8-
using OnTopic.Editor.AspNetCore.Models;
97

108
namespace OnTopic.Editor.AspNetCore.Attributes.BooleanAttribute {
119

OnTopic.Editor.AspNetCore.Attributes/DateTimeAttribute/DateTimeAttributeDescriptor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using OnTopic.Metadata;
76

87
namespace OnTopic.Editor.AspNetCore.Attributes.DateTimeAttribute {
98

OnTopic.Editor.AspNetCore.Attributes/DateTimeAttribute/DateTimeAttributeDescriptorViewModel.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using OnTopic.Editor.AspNetCore.Models.Metadata;
76

87
namespace OnTopic.Editor.AspNetCore.Attributes.DateTimeAttribute {
98

@@ -15,6 +14,27 @@ namespace OnTopic.Editor.AspNetCore.Attributes.DateTimeAttribute {
1514
/// </summary>
1615
public record DateTimeAttributeDescriptorViewModel: AttributeDescriptorViewModel {
1716

17+
/*==========================================================================================================================
18+
| CONSTRUCTOR
19+
\-------------------------------------------------------------------------------------------------------------------------*/
20+
/// <summary>
21+
/// Initializes a new <see cref="DateTimeAttributeDescriptorViewModel"/> with an <paramref name="attributes"/> dictionary.
22+
/// </summary>
23+
/// <param name="attributes">An <see cref="AttributeDictionary"/> of attribute values.</param>
24+
public DateTimeAttributeDescriptorViewModel(AttributeDictionary attributes): base(attributes) {
25+
Contract.Requires(attributes, nameof(attributes));
26+
IncludeDatePicker = attributes.GetBoolean(nameof(IncludeDatePicker));
27+
IncludeTimePicker = attributes.GetBoolean(nameof(IncludeTimePicker));
28+
DateTimeOffset = attributes.GetInteger(nameof(DateTimeOffset));
29+
DateTimeOffsetUnits = attributes.GetValue(nameof(DateTimeOffsetUnits))?? DateTimeOffsetUnits;
30+
31+
}
32+
33+
/// <summary>
34+
/// Initializes a new instance of the <see cref="DateTimeAttributeDescriptorViewModel"/> class.
35+
/// </summary>
36+
public DateTimeAttributeDescriptorViewModel() : base() { }
37+
1838
/*==========================================================================================================================
1939
| INCLUDE DATE PICKER?
2040
\-------------------------------------------------------------------------------------------------------------------------*/

OnTopic.Editor.AspNetCore.Attributes/DateTimeAttribute/DateTimeAttributeViewModel.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System;
76
using System.Globalization;
8-
using OnTopic.Editor.AspNetCore.Models;
9-
using OnTopic.Editor.AspNetCore.Models.Metadata;
107

118
namespace OnTopic.Editor.AspNetCore.Attributes.DateTimeAttribute {
129

0 commit comments

Comments
 (0)