Skip to content

Release/5.2.0 #108

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

Merged
merged 263 commits into from
Jun 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
263 commits
Select commit Hold shift + click to select a range
e006258
Retrofitted `MemberDispatcher` to work with `TypeAccessor`
JeremyCaney Dec 5, 2021
56792e9
Updated exception type
JeremyCaney Dec 5, 2021
5f5e511
Ensure member names are unique
JeremyCaney Dec 5, 2021
2067599
Allow `attributeFlag` to be specified as method parameter
JeremyCaney Dec 5, 2021
5484490
Migrated `MemberDispatcher` to `TypeAccessor` extensions
JeremyCaney Dec 5, 2021
d1a8b41
Added generic type shortcut for `GetTypeAccessor()`
JeremyCaney Dec 5, 2021
d79cbc7
Updated services to use new `TypeAccessor` extensions
JeremyCaney Dec 5, 2021
08cd648
Updated unit tests to account for new `TypeAccessor` extensions
JeremyCaney Dec 6, 2021
5a850fc
Added explicit exception type in XML doc for clarity
JeremyCaney Dec 6, 2021
ee5db7d
Renamed `IsGettable` and `IsSettable` to `CanRead`, `CanWrite`
JeremyCaney Dec 6, 2021
5cd1dcb
Introduced required `allowConversion` parameter for `Set*Value()` met…
JeremyCaney Dec 6, 2021
a43434d
Moved conversion logic to `SetValue()`, `GetValue()`
JeremyCaney Dec 6, 2021
315529e
Reverted expected exception back to `ArgumentException`
JeremyCaney Dec 6, 2021
1ac634a
Picked up missing `allowConversion` in unit test.
JeremyCaney Dec 6, 2021
f773dfd
Used existing `MemberInfo` reference to call `SetValue()`
JeremyCaney Dec 6, 2021
2a5d702
Simplified `SetPropertyAsync()` logic
JeremyCaney Dec 6, 2021
44ead0e
Ensured member types are validated by `Has*ettable*()` methods
JeremyCaney Dec 6, 2021
b5f976d
Extended member type validation into `Set*Value()` methods
JeremyCaney Dec 6, 2021
35446ca
Removed unused `targetType`, `attributeFlag` overloads
JeremyCaney Dec 6, 2021
63f1be8
Remove legacy `TypeMemberInfoCollection`
JeremyCaney Dec 6, 2021
98b71d4
Removed legacy `MemberInfoCollection`
JeremyCaney Dec 7, 2021
2984a87
Introduced `GetPrimaryConstructor()` convenience method
JeremyCaney Dec 7, 2021
68f582d
Removed legacy `GetMembers<T>()` overload
JeremyCaney Dec 7, 2021
05e2c54
Fixed indentation
JeremyCaney Dec 7, 2021
c85de0a
(Re)Introduced `GetMembers<T>()` as a convenience method
JeremyCaney Dec 7, 2021
624e388
Removed dependency on `MemberInfoCollection<T>` in tests
JeremyCaney Dec 7, 2021
eec245b
Removed legacy `MemberInfoCollection<T>` class
JeremyCaney Dec 7, 2021
98df8d3
In preparation for merge, temporarily delete `TypeAccessor(Test)`
JeremyCaney Dec 7, 2021
792e383
Reorganized order of `TypeAccessor` extension methods
JeremyCaney Dec 7, 2021
3da45c6
Merge `TypeAccessor` extensions into `TypeAccessor`
JeremyCaney Dec 7, 2021
dacf9a1
Reorganized order of `TypeAccessor` extension tests
JeremyCaney Dec 7, 2021
7269731
Merge `TypeAccessor` extensions into `TypeAccessor`
JeremyCaney Dec 7, 2021
13ea0a3
Ensured outside references to `TypeAccessorExtensions` migrated
JeremyCaney Dec 7, 2021
0ed72cf
Prepare for merging of `TypeAccessor` extensions
JeremyCaney Dec 7, 2021
c76ea55
Merge branch 'merge-TypeAccessor' into feature/MemberAccessor
JeremyCaney Dec 7, 2021
51a72ac
Consolidated logic into `GetValue()`, `SetValue()`
JeremyCaney Dec 7, 2021
d8a236c
Centralized `IsSettable()` on `MemberAccessor`
JeremyCaney Dec 7, 2021
2ce90d6
Updated parameter names to be more consistent
JeremyCaney Dec 7, 2021
1a08ccd
Fixed line wrapping issue
JeremyCaney Dec 7, 2021
0ac42dc
Fixed XML Doc reference
JeremyCaney Dec 7, 2021
c084fe5
Removed unnecessary casts
JeremyCaney Dec 8, 2021
a82f7e6
Merge branch 'feature/MemberAccessor' into develop
JeremyCaney Dec 8, 2021
f785055
Upgraded projects to C# 10.0
JeremyCaney Dec 8, 2021
479f293
Upgraded Code Analysis to latest .NET 6.0 versions
JeremyCaney Dec 8, 2021
14df2b4
CA1849: Ensured use of `await`
JeremyCaney Dec 8, 2021
89900d4
CA1847: Prefer `Contains(char)` when evaluating a single character
JeremyCaney Dec 8, 2021
32f85b9
CA1841: Prefer `ContainsKey()` over `Contains()` for dictionary lookups
JeremyCaney Dec 8, 2021
995bba9
CA1825: Avoid unnecessary zero-length array allocations
JeremyCaney Dec 8, 2021
e89a090
CA1307: Ensure use of `StringComparison` when evaluating strings
JeremyCaney Dec 8, 2021
2c92d84
Suppress CA1024, CA1044, CA1822 in test model
JeremyCaney Dec 8, 2021
6d43ea7
CA1801: Removed unnecessary suppression
JeremyCaney Dec 8, 2021
dca0c47
IDE0017: Moved initializer inline, per editor preferences
JeremyCaney Dec 8, 2021
bcf4c55
Simplified empty checks
JeremyCaney Dec 8, 2021
6aca48c
Rely on compiler-detected generic types for XUnit tests
JeremyCaney Dec 8, 2021
bf469db
Implemented `IsType<>()` method in place of explicit type checking
JeremyCaney Dec 8, 2021
e6bd2b7
Prefer `is` for type checking, where possible
JeremyCaney Dec 8, 2021
5852d10
IDE0038: Prefer pattern matching over casting
JeremyCaney Dec 8, 2021
427959b
Migrated `[Obsolete()]` statements to use `nameof()` for members
JeremyCaney Dec 9, 2021
5eaa417
Merge branch 'improvement/C#-10' into develop
JeremyCaney Dec 9, 2021
2be3b51
Enable implicit usings
JeremyCaney Dec 9, 2021
b073c9f
Rely on implicit usings for `Microsoft.NET.Sdk`
JeremyCaney Dec 9, 2021
3b17bcc
Rely on implicit usings for `Microsoft.NET.Sdk.Web`
JeremyCaney Dec 9, 2021
4fb22c5
Introduced global using directives for `OnTopic`
JeremyCaney Dec 9, 2021
1129fbd
Introduced global using directives for `OnTopic.AspNetCore.Mvc`
JeremyCaney Dec 9, 2021
789faa6
Introduced global using directives for ASP.NET Core integration tests
JeremyCaney Dec 9, 2021
66770c0
Introduced global using directives for ASP.NET Core integration host
JeremyCaney Dec 9, 2021
9523c21
Introduced global using directives for ASP.NET Core unit tests
JeremyCaney Dec 9, 2021
1dcb21b
Introduced global using directives for the `OnTopic.Data.SQL` library
JeremyCaney Dec 9, 2021
25be63e
Introduced global using directives for the `OnTopic.TestDoubles` library
JeremyCaney Dec 9, 2021
15070aa
Introduced global using directives for the `OnTopic.Tests` library
JeremyCaney Dec 9, 2021
112c534
Introduced global using directives for the `OnTopic.ViewModels` library
JeremyCaney Dec 9, 2021
c9f6b17
Merge branch 'improvement/C#10-implicit-usings' into develop
JeremyCaney Dec 9, 2021
e03cd1a
Removed `Xunit` namespace from global using directives
JeremyCaney Dec 9, 2021
ebdd23d
Merge branch 'bugfix/C#10-implicit-usings' into develop
JeremyCaney Dec 9, 2021
6edabca
Migrated all `Host` projects to ASP.NET Core 6.0
JeremyCaney Dec 9, 2021
995a19e
Migrated all `Test` projects to ASP.NET Core 6.0
JeremyCaney Dec 9, 2021
ab18ef9
Delete `Program` in preparation for ASP.NET Core 6.0 Hosting Model
JeremyCaney Dec 11, 2021
0678d34
Move `Startup` to `Program` as part of ASP.NET Core 6.0 Hosting Model
JeremyCaney Dec 11, 2021
cda5bbb
Elevated `Startup` to top-level statements
JeremyCaney Dec 11, 2021
2eb2098
Rooted statements directly to `builder`` and `app` objects
JeremyCaney Dec 11, 2021
c284285
Fixed indentation with `Program`
JeremyCaney Dec 11, 2021
2e6e2b5
CA1812: Suppress warning about uninstantiated internal class
JeremyCaney Dec 11, 2021
b413a4c
Configured application to run
JeremyCaney Dec 11, 2021
8e842d8
Fixed spelling error in method
JeremyCaney Dec 11, 2021
c2e229e
Merge branch 'improvement/ASP.NET-Core-6-hosting-model' into improvem…
JeremyCaney Dec 11, 2021
79e440f
Merge branch 'improvement/ASP.NET-Core-6-hosts' into develop
JeremyCaney Dec 11, 2021
e7fe64f
Established new `ErrorController`
JeremyCaney Dec 13, 2021
4796340
Established new `MapTopicErrors()` extension method
JeremyCaney Dec 13, 2021
99ddeb3
Updated `README` to account for `ErrorController`, `MapTopicErrors()`
JeremyCaney Dec 13, 2021
9e3f0b4
Updated documentation to account for ASP.NET Core 6
JeremyCaney Dec 13, 2021
ddba7c9
Established new `FakeControllerContext` to simplify testing
JeremyCaney Dec 13, 2021
9f8bd21
Integrated new `FakeControllerContext` into `TopicControllerTest`
JeremyCaney Dec 13, 2021
e30c998
Moved sitemap tests to a new `SitemapControllerTest`
JeremyCaney Dec 13, 2021
f27a6ef
Added `Error` pages in preparation for unit testing `ErrorController`
JeremyCaney Dec 13, 2021
b9f58b1
Introduced unit tests for `ErrorController`
JeremyCaney Dec 13, 2021
75d110d
Register `ErrorController` with composition root of integration tests
JeremyCaney Dec 13, 2021
525f65b
Introduce routes for `ErrorController`
JeremyCaney Dec 13, 2021
ed77981
Introduced ASP.NET Core status code error handling
JeremyCaney Dec 13, 2021
a0b1100
Added minimal `Page` view
JeremyCaney Dec 13, 2021
38b9a01
Introduced new topics of relevance to the `ErrorController` tests
JeremyCaney Dec 13, 2021
3230687
Consolidated existing routing tests into new `[Theory]`
JeremyCaney Dec 13, 2021
6910c23
Extended integration test to validate routing to `ErrorController`
JeremyCaney Dec 13, 2021
e92dd1e
Added integration tests for `UseStatusCodePages()`
JeremyCaney Dec 13, 2021
e52409f
Register `ErrorController` with composition root of `Host` site
JeremyCaney Dec 13, 2021
bf46877
Introduce routes for `ErrorController`
JeremyCaney Dec 13, 2021
8ab1d77
Introduced ASP.NET Core status code error handling
JeremyCaney Dec 13, 2021
5140a7e
Updated `UseExceptionHandler()` to use the new `ErrorController`
JeremyCaney Dec 13, 2021
40d0b57
Removed explicit configuration of `UseDeveloperExceptionPage()`
JeremyCaney Dec 13, 2021
be25b3e
Added disclaimer about ASP.NET Core 6's new minimal hosting model
JeremyCaney Dec 13, 2021
e853ebc
Added route hints to `Program` configuration for clarity
JeremyCaney Dec 13, 2021
38694c4
Introduced area-based routes
JeremyCaney Dec 13, 2021
4819c7e
Explicitly included `rootTopic` parameter name
JeremyCaney Dec 13, 2021
3e184d4
Merge branch 'feature/ErrorController' into develop
JeremyCaney Dec 13, 2021
9bc5797
Introduced new `[TopicResponseCache]` attribute
JeremyCaney Dec 17, 2021
837096b
Moved `TopicRepository` property to `protected internal`
JeremyCaney Dec 17, 2021
1a5994d
Applied the new `[TopicResponseCache]` attribute to `TopicController`
JeremyCaney Dec 17, 2021
8506658
Moved `[ValidateTopic]` attribute to `_filters` for consistency
JeremyCaney Dec 17, 2021
5e03dbf
Documented filter attributes, including new `[TopicResponseCache]` at…
JeremyCaney Dec 17, 2021
59895e0
Added ASP.NET Core Response Cache Middleware to `Host` sites
JeremyCaney Dec 17, 2021
19b7c05
Added trailing slash to `/Error/` path
JeremyCaney Dec 17, 2021
8cbf7da
Established stub data for evaluating response caching
JeremyCaney Dec 17, 2021
ea40bbb
Established new `Counter` view for the `Page` content type
JeremyCaney Dec 17, 2021
08db830
Established integration tests for the new `[TopicResponseCache]` attr…
JeremyCaney Dec 17, 2021
dd783d6
Establish a `CacheProfile` topic view model, if needed
JeremyCaney Dec 17, 2021
1b4b94e
Throw exception is `[TopicResponseCache]` not applied to `TopicContro…
JeremyCaney Dec 17, 2021
a30b85f
Merge branch 'feature/cache-profiles' into develop
JeremyCaney Dec 17, 2021
9986ea5
Updated `GitVersion` to latest minor release
JeremyCaney Dec 17, 2021
f7e68df
Updated integration testing framework to major release
JeremyCaney Dec 17, 2021
aa56b58
Updated test SDK to major release
JeremyCaney Dec 17, 2021
43bfb19
Updated Visual Studio validation attributes to major release
JeremyCaney Dec 17, 2021
1e6021f
Updated Source Link to latest minor release
JeremyCaney Dec 17, 2021
6b827de
Merge branch 'maintenance/update-dependencies' into develop
JeremyCaney Dec 17, 2021
476a695
CS8602: Dereference of a possibly null reference
JeremyCaney Dec 17, 2021
22a24ab
CS8620: Differences in the nullability of reference types
JeremyCaney Dec 17, 2021
1fed75b
IDE0019: Use pattern matching
JeremyCaney Dec 18, 2021
7cfa5ca
Merge branch 'maintenance/code-analysis' into develop
JeremyCaney Dec 18, 2021
ab71a69
Removed content response from `NotFound` condition
JeremyCaney Dec 18, 2021
812cf98
Extended integration test to validate `TopicController.NotFound`
JeremyCaney Dec 18, 2021
7a7b72e
Merge branch 'bugfix/NotFound' into develop
JeremyCaney Dec 18, 2021
4ff3713
Fixed specific type of `NotFoundResult` in unit test
JeremyCaney Dec 18, 2021
30f5641
Merge branch 'bugfix/NotFoundTest' into develop
JeremyCaney Dec 18, 2021
af4067c
Prioritize faster condition at top of `GetParameter()`, `SetProperty()`
JeremyCaney Dec 20, 2021
60ce1e6
Only `GetValue()` once it's needed. No need if `[MapToParent]`
JeremyCaney Dec 20, 2021
241775d
Standardized comments in `GetParameter()`, `SetProperty()`
JeremyCaney Dec 20, 2021
565fa6f
Prioritized `if`/`else if` statements in `GetValue()`
JeremyCaney Dec 20, 2021
07094e5
Defer retrieving topic references until needed
JeremyCaney Dec 20, 2021
9f1f677
Ensure `IsConvertible()` isn't checked for `IsList()` or `getTopicRef…
JeremyCaney Dec 20, 2021
76f1e6f
Only check for `null` within `GetScalarValue()`
JeremyCaney Dec 20, 2021
b745768
Avoid unnecessarily defensive `IsList()` checks
JeremyCaney Dec 20, 2021
eec0d42
Optimize `IsList()` check to only call `GetGenericTypeDefinition()` once
JeremyCaney Dec 20, 2021
e93d1f6
Remove guard clauses for parameters on `internal`, `private` methods
JeremyCaney Dec 20, 2021
5b4aeee
Move expensive `SatisfiesAttributeFilters()` call to end of loop
JeremyCaney Dec 20, 2021
a0b0a96
Removed duplicate null check
JeremyCaney Dec 20, 2021
cba12e0
Removed unnecessary null check
JeremyCaney Dec 20, 2021
ee312b2
Merge branch 'improvement/TopicMappingService-refactoring' into develop
JeremyCaney Dec 20, 2021
31ee953
Introduced specialized `AttributeDictionary`
JeremyCaney Dec 21, 2021
a781356
Introduced `AsAttributeDictionary()` convenience method
JeremyCaney Dec 21, 2021
72ca032
Introduced `AttributeDictionary` support into `TopicMappingService`
JeremyCaney Dec 21, 2021
30bd3e5
Introduced `GetUri()` and `SetUri()` to `AttributeCollection` extensions
JeremyCaney Dec 21, 2021
8e09fc5
Added strongly types conveniences methods to `AttributeDictionary`
JeremyCaney Dec 21, 2021
f137ca1
Added `AttributeDictionary` constructors to each of the view models
JeremyCaney Dec 21, 2021
49c2cde
Ensured `CacheProfileTopicViewModel` is correctly registered
JeremyCaney Dec 21, 2021
4f587df
Exposed `CustomAttributes` property on `MemberAccessor`
JeremyCaney Dec 21, 2021
2de2399
For clarity, renamed `property` parameter to `propertyAccessor`
JeremyCaney Dec 21, 2021
49ffd61
Updated `PropertyConfiguration` to accept `MemberAccessor`
JeremyCaney Dec 21, 2021
385bfec
Updated `SetCollectionValueAsync()` to use `MemberAccessor()`
JeremyCaney Dec 21, 2021
3d4c9c4
Updated `ReverseTopicMappingService` to use `MemberAccessor`
JeremyCaney Dec 21, 2021
825bb8b
Updated `BindingModelValidator` to use `MemberAccessor`
JeremyCaney Dec 21, 2021
9705824
Updated `ItemConfiguration` to operate off of `List<Attribute>`
JeremyCaney Dec 21, 2021
ed688f9
Update exception to use `MemberAccessor`
JeremyCaney Dec 21, 2021
39d1703
Update `Validate()` to use `CustomAttributes`
JeremyCaney Dec 21, 2021
7604d15
Remove legacy `Property` property on `PropertyConfiguration`
JeremyCaney Dec 22, 2021
caddffd
Ensured unit tests for `GetUri()`, `SetUri()`
JeremyCaney Dec 22, 2021
11894b7
Introduced unit tests for the new `AttributeDictionary`
JeremyCaney Dec 22, 2021
d4b77c1
Introduced unit tests for the new `AsAttributeDictionary()` method
JeremyCaney Dec 22, 2021
6b8ed99
Introduced unit test for mapping constructors with an `AttributeDicti…
JeremyCaney Dec 22, 2021
bec7123
Established new `ItemMetadata` abstract class
JeremyCaney Dec 23, 2021
37eeb3c
Introduced new `ParameterMetadata` class
JeremyCaney Dec 23, 2021
863b618
Introduced new `ConstructorParameters` property to `TypeAccessor`
JeremyCaney Dec 23, 2021
3659828
Updated `TopicMappingService` to use new `ParameterMetadata`
JeremyCaney Dec 23, 2021
63d32a2
Update `ItemConfiguration` to depend on new `ItemMetadata`
JeremyCaney Dec 23, 2021
d0fb8a4
Moved `IsList` and `IsConvertible` to `ItemMetadata` properties
JeremyCaney Dec 23, 2021
0539c8d
Established cached version of `TypeAccessor` for `Topic`
JeremyCaney Dec 23, 2021
83d5c3d
Restrict topic reference lookups to classes
JeremyCaney Dec 23, 2021
8f80333
Reorder `GetValue()` based on how common each condition is
JeremyCaney Dec 23, 2021
a701089
IDE0017: Simplified object initialization with inline properties
JeremyCaney Dec 23, 2021
df86a0e
Ensured use of `IsConvertible` property in `SetValue()`
JeremyCaney Dec 24, 2021
5b68add
Optimized `AsAttributeDictionary()` method
JeremyCaney Dec 24, 2021
a82a06b
Merge branch 'improvement/AttributeDictionary` into develop
JeremyCaney Dec 24, 2021
d5530ed
Merge branch 'improvement/MemberAccess-integration' into develop
JeremyCaney Dec 24, 2021
ac2b534
Merge branch 'improvement/AttributeDictionary-unit-tests' into develop
JeremyCaney Dec 24, 2021
afd6c87
Merge branch 'improvement/ItemMetadata' into develop
JeremyCaney Dec 24, 2021
3ecfa06
Established basic load test for `TopicMappingService`
JeremyCaney Dec 25, 2021
7b529dc
Established basic test for evaluating thresholds on `TopicMappingServ…
JeremyCaney Dec 25, 2021
2e157e5
Established initial threshold for `AttributeDictionary` mapping
JeremyCaney Dec 25, 2021
e1abb1d
Merge branch 'improvement/AttributeDictionary-performance' into develop
JeremyCaney Dec 26, 2021
83f4691
Conditionally restrict static files from `ErrorController`
JeremyCaney Dec 26, 2021
b591bd7
Expose `includeStaticFiles` configuration option to `MapTopicErrors()`
JeremyCaney Dec 26, 2021
240d47f
Inferred new `includeStaticFiles` in documentation
JeremyCaney Dec 26, 2021
74b7cc8
Updated `Host` sites to disable `includeStaticFiles`
JeremyCaney Dec 26, 2021
6fbe387
Introduced integration test for new `includeStaticFiles` parameter
JeremyCaney Dec 26, 2021
65f6414
Merge branch 'improvement/ErrorController-static-files' into develop
JeremyCaney Dec 26, 2021
74cb817
Add `ItemConfiguration` as property to `ItemMetadata`
JeremyCaney Dec 28, 2021
3a16de4
Move `Validate()` method to `MemberAccessor`
JeremyCaney Dec 28, 2021
2f482b1
Migrate mapping services to use `ItemMetadata.Configuration`
JeremyCaney Dec 28, 2021
84735fb
Remove `attributePrefix` from `ItemConfiguration`
JeremyCaney Dec 28, 2021
fe39302
Relay `ItemMetadata`, `attributePrefix` instead of `ItemConfiguration`
JeremyCaney Dec 28, 2021
7eb55f4
Introduced new `GetCompositeAttributeKey()` method
JeremyCaney Dec 28, 2021
7c2a790
Fixed XML Doc references
JeremyCaney Dec 28, 2021
4b3a6d6
Removed legacy `PropertyConfiguration` class
JeremyCaney Dec 28, 2021
6662e18
Introduce `MaybeCompatible` property to `ItemMetadata`
JeremyCaney Dec 29, 2021
359eaae
Introduce `SetItemCompatibility()` method in `TypeAccessor`
JeremyCaney Dec 29, 2021
1e2dc53
Integrate `MaybeCompatible` into `TopicMappingService`
JeremyCaney Dec 29, 2021
5310655
Introduced a new `CustomTopicTopicViewModel` for testing
JeremyCaney Dec 29, 2021
c6bb730
Exclude members of `Object` from `TypeAccessor`
JeremyCaney Dec 29, 2021
fabeb82
Introduced unit test for `MaybeCompatible`
JeremyCaney Dec 29, 2021
a68d459
Introduced specialized `AttributeDictionary` view model for unit tests
JeremyCaney Dec 29, 2021
b0ba64d
Exclude `record` members from `TypeAccessor`
JeremyCaney Dec 29, 2021
3a6820b
Used `MaybeCompatible` for `AttributeDictionary` constructor threshold
JeremyCaney Dec 29, 2021
78e5536
Merge branch 'improvement/ItemConfiguration-refactoring' into develop
JeremyCaney Dec 29, 2021
c718adc
Merge branch 'improvement/ItemMetadata.MaybeCompatible' into develop
JeremyCaney Dec 29, 2021
eb32513
Fixed circular reference
JeremyCaney Jun 24, 2022
8fab56b
Fixed errant usage of `<code />` in favor of `<c />`
JeremyCaney Jun 24, 2022
68d330e
Merge branch 'maintenance/XMLDoc-fixes' into develop
JeremyCaney Jun 24, 2022
b605ad4
Ensured that View Model defaults aren't repeated in constructor
JeremyCaney Jun 24, 2022
274bc9b
Merge branch 'maintenance/ViewModels-defaults' into develop
JeremyCaney Jun 24, 2022
b0ca6fa
Removed implicit `Attribute` extension from `GuidAttribute`
JeremyCaney Jun 24, 2022
5f0748a
Prefer `is` over `==` when working with constant values
JeremyCaney Jun 24, 2022
ba60f54
Renamed unit test from `Bulk` to `LoadTesting`
JeremyCaney Jun 24, 2022
36b1c23
Merge branch 'maintenance/miscellaneous-cleanup' into develop
JeremyCaney Jun 24, 2022
4626c08
Bumped date to 2022
JeremyCaney Jun 24, 2022
420a50a
Updated `GitVersion` to minor version
JeremyCaney Jun 24, 2022
e83ab30
Update Microsoft Test SDK to minor version
JeremyCaney Jun 24, 2022
dc3d0e3
Updated ASP.NET Core test framework to latest patch
JeremyCaney Jun 24, 2022
9af9a1f
Updated the xUnit test runner to latest patch
JeremyCaney Jun 24, 2022
29697df
Updated Visual Studio Validation to latest patch
JeremyCaney Jun 24, 2022
b62daf9
Merge branch 'maintenance/update-dependencies' into develop
JeremyCaney Jun 24, 2022
f0cc9ab
Add unique constraint for `TopicKey` and `ParentID`
JeremyCaney Jun 24, 2022
c627336
Merge branch 'improvement/SQL-topic-constraint' into develop
JeremyCaney Jun 24, 2022
38c54c3
Renamed `AttributeDictionary` to `AttributeValueDictionary`
JeremyCaney Jun 25, 2022
4a7b9d8
Renamed the view model for testing the `AttributeValueDictionary`
JeremyCaney Jun 25, 2022
0b62fe0
Merge branch 'improvement/AttributeValueDictionary' into develop
JeremyCaney Jun 25, 2022
95b8276
Introduce `OnTopic.Attributes` as a global using directive
JeremyCaney Jun 25, 2022
07d46ec
Remove local using directives for `OnTopic.Attributes`
JeremyCaney Jun 25, 2022
e73f71c
Merge branch 'maintenance/global-using-Attributes' into develop
JeremyCaney Jun 25, 2022
c0152cc
Revert: Renamed `AttributeDictionary` to `AttributeValueDictionary`
JeremyCaney Jun 25, 2022
9d7b228
Revert: Renamed the view model for testing the `AttributeValueDiction…
JeremyCaney Jun 25, 2022
6cdc39f
Merge branch 'revert/AttributeValueDictionary' into develop
JeremyCaney Jun 26, 2022
285ec1f
Introduced documentation for the `AttributeDictionary`
JeremyCaney Jun 26, 2022
e4d5545
Merge branch 'maintenance/AttributeDictionary-documentation' into dev…
JeremyCaney Jun 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<Project>

<PropertyGroup>
<LangVersion>9.0</LangVersion>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup>
<Company>Ignia</Company>
<Product>OnTopic</Product>
<Copyright>©2021 Ignia, LLC</Copyright>
<Copyright>©2022 Ignia, LLC</Copyright>
<Authors>Ignia</Authors>
<PackageProjectUrl>https://github.com/Ignia/Topics-Library</PackageProjectUrl>
<UseFullSemVerForNuGet>true</UseFullSemVerForNuGet>
Expand Down
2 changes: 1 addition & 1 deletion OnTopic.All/OnTopic.All.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.6.8">
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
1 change: 0 additions & 1 deletion OnTopic.All/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
| Client Ignia, LLC
| Project Topics Library
\=============================================================================================================================*/
using System;
using System.Runtime.InteropServices;

/*==============================================================================================================================
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<UserSecretsId>62eb85bf-f802-4afd-8bec-3d344e1cfc79</UserSecretsId>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
128 changes: 88 additions & 40 deletions OnTopic.AspNetCore.Mvc.Host/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,91 @@
| Client Ignia, LLC
| Project Sample OnTopic Site
\=============================================================================================================================*/
using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;

namespace OnTopic.AspNetCore.Mvc.Host {

/*============================================================================================================================
| CLASS: PROGRAM
\---------------------------------------------------------------------------------------------------------------------------*/
/// <summary>
/// The <see cref="Program"/> class—and it's <see cref="Program.Main(String[])"/> method—represent the entry point into the
/// ASP.NET Core web application.
/// </summary>
[ExcludeFromCodeCoverage]
public static class Program {

/*==========================================================================================================================
| METHOD: MAIN
\-------------------------------------------------------------------------------------------------------------------------*/
/// <summary>
/// Responsible for bootstrapping the web application.
/// </summary>
public static void Main(string[] args) => CreateHostBuilder(args).Build().Run();

/*==========================================================================================================================
| METHOD: CREATE WEB HOST BUILDER
\-------------------------------------------------------------------------------------------------------------------------*/
/// <summary>
/// Configures a new <see cref="IWebHostBuilder"/> with the default options.
/// </summary>
public static IHostBuilder CreateHostBuilder(string[] args) =>
Microsoft.Extensions.Hosting.Host
.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder => {
webBuilder.UseStartup<Startup>();
});

} //Class
} //Namespace
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.AspNetCore.Mvc.ViewComponents;
using OnTopic.AspNetCore.Mvc;
using OnTopic.AspNetCore.Mvc.Host;

#pragma warning disable CA1812 // Avoid uninstantiated internal classes

/*==============================================================================================================================
| CONFIGURE SERVICES
\-----------------------------------------------------------------------------------------------------------------------------*/
var builder = WebApplication.CreateBuilder(args);

/*------------------------------------------------------------------------------------------------------------------------------
| Configure: Cookie Policy
\-----------------------------------------------------------------------------------------------------------------------------*/
builder.Services.Configure<CookiePolicyOptions>(options => {
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
options.CheckConsentNeeded = context => true;
options.MinimumSameSitePolicy = SameSiteMode.None;
});

/*------------------------------------------------------------------------------------------------------------------------------
| Configure: Output Caching
\-----------------------------------------------------------------------------------------------------------------------------*/
builder.Services.AddResponseCaching();

/*------------------------------------------------------------------------------------------------------------------------------
| Configure: MVC
\-----------------------------------------------------------------------------------------------------------------------------*/
builder.Services.AddControllersWithViews()

//Add OnTopic support
.AddTopicSupport();

/*------------------------------------------------------------------------------------------------------------------------------
| Register: Activators
\-----------------------------------------------------------------------------------------------------------------------------*/
var activator = new SampleActivator(builder.Configuration.GetConnectionString("OnTopic"));

builder.Services.AddSingleton<IControllerActivator>(activator);
builder.Services.AddSingleton<IViewComponentActivator>(activator);

/*==============================================================================================================================
| CONFIGURE APPLICATION
\-----------------------------------------------------------------------------------------------------------------------------*/
var app = builder.Build();

/*------------------------------------------------------------------------------------------------------------------------------
| Configure: Error Pages
\-----------------------------------------------------------------------------------------------------------------------------*/
app.UseStatusCodePagesWithReExecute("/Error/{0}/");
if (!app.Environment.IsDevelopment()) {
app.UseExceptionHandler("/Error/500/");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

/*------------------------------------------------------------------------------------------------------------------------------
| Configure: Server defaults
\-----------------------------------------------------------------------------------------------------------------------------*/
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseCookiePolicy();
app.UseRouting();
app.UseCors("default");
app.UseResponseCaching();

/*------------------------------------------------------------------------------------------------------------------------------
| Configure: MVC
\-----------------------------------------------------------------------------------------------------------------------------*/
app.MapImplicitAreaControllerRoute(); // {area:exists}/{action=Index}
app.MapDefaultAreaControllerRoute(); // {area:exists}/{controller}/{action=Index}/{id?}
app.MapTopicAreaRoute(); // {area:exists}/{**path}

app.MapTopicErrors(includeStaticFiles: false); // Error/{statusCode}
app.MapDefaultControllerRoute(); // {controller=Home}/{action=Index}/{id?}
app.MapTopicRoute(rootTopic: "Web"); // Web/{**path}
app.MapTopicRoute(rootTopic: "Error"); // Error/{**path}
app.MapTopicSitemap(); // Sitemap
app.MapTopicRedirect(); // Topic/{topicId}
app.MapControllers();

/*------------------------------------------------------------------------------------------------------------------------------
| Run application
\-----------------------------------------------------------------------------------------------------------------------------*/
app.Run();

#pragma warning restore CA1812 // Avoid uninstantiated internal classes
1 change: 0 additions & 1 deletion OnTopic.AspNetCore.Mvc.Host/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
| Client Ignia, LLC
| Project Topics Library
\=============================================================================================================================*/
using System;
using System.Runtime.InteropServices;

/*==============================================================================================================================
Expand Down
3 changes: 2 additions & 1 deletion OnTopic.AspNetCore.Mvc.Host/SampleActivator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
| Client Ignia, LLC
| Project Sample OnTopic Site
\=============================================================================================================================*/
using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Controllers;
Expand Down Expand Up @@ -118,6 +117,8 @@ public object Create(ControllerContext context) {
return type.Name switch {
nameof(TopicController) =>
new TopicController(_topicRepository, _topicMappingService),
nameof(ErrorController) =>
new ErrorController(_topicRepository, _topicMappingService),
nameof(SitemapController) =>
new SitemapController(_topicRepository),
nameof(RedirectController) =>
Expand Down
126 changes: 0 additions & 126 deletions OnTopic.AspNetCore.Mvc.Host/Startup.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
| Client Ignia, LLC
| Project Topics Library
\=============================================================================================================================*/
using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
using OnTopic.AspNetCore.Mvc.Controllers;
using OnTopic.Mapping;
using OnTopic.Repositories;

namespace OnTopic.AspNetCore.Mvc.IntegrationTests.Areas.Area.Controllers {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 0 additions & 4 deletions OnTopic.AspNetCore.Mvc.IntegrationTests.Host/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
| Client Ignia, LLC
| Project Integration Tests Host
\=============================================================================================================================*/
using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;

namespace OnTopic.AspNetCore.Mvc.IntegrationTests.Host {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@
| Client Ignia, LLC
| Project Topics Library
\=============================================================================================================================*/
using System;
using System.Diagnostics.CodeAnalysis;

/*==============================================================================================================================
| USING DIRECTIVES (GLOBAL)
\-----------------------------------------------------------------------------------------------------------------------------*/
global using System.Diagnostics.CodeAnalysis;
global using OnTopic.Internal.Diagnostics;
global using OnTopic.Repositories;

/*==============================================================================================================================
| USING DIRECTIVES (LOCAL)
\-----------------------------------------------------------------------------------------------------------------------------*/
using System.Runtime.InteropServices;

/*==============================================================================================================================
Expand Down
Loading