Skip to content

Commit 2fa9e45

Browse files
committed
Introduce OnTopic 4.0.0 code
2 parents fd76e74 + c01fd12 commit 2fa9e45

253 files changed

Lines changed: 22830 additions & 0 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.

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# All files
2+
[*]
3+
indent_style = space
4+
indent_size = 2
5+
6+
[*.sql]
7+
indent_style = tab
8+
indent_size = 16

.gitignore

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# Archive data (generated by app)
5+
[Ww]ebsite/[Aa]rchives/*/
6+
[Ww]ebsite/[Ss]cripts/
7+
[Ww]ebsite/[Dd]ebug/
8+
9+
# User-specific files
10+
*.suo
11+
*.user
12+
*.sln.docstates
13+
14+
# Build results
15+
[Dd]ebug/
16+
[Dd]ebugPublic/
17+
[Rr]elease/
18+
x64/
19+
build/
20+
bld/
21+
[Bb]in/
22+
[Oo]bj/
23+
*.nupkg
24+
25+
# Roslyn cache directories
26+
*.ide/
27+
28+
# MSTest test Results
29+
[Tt]est[Rr]esult*/
30+
[Bb]uild[Ll]og.*
31+
32+
#NUNIT
33+
*.VisualState.xml
34+
TestResult.xml
35+
36+
# Build Results of an ATL Project
37+
[Dd]ebugPS/
38+
[Rr]eleasePS/
39+
dlldata.c
40+
41+
*_i.c
42+
*_p.c
43+
*_i.h
44+
*.bat
45+
*.ilk
46+
*.meta
47+
*.obj
48+
*.pch
49+
*.pdb
50+
*.pgc
51+
*.pgd
52+
*.rsp
53+
*.sbr
54+
*.tlb
55+
*.tli
56+
*.tlh
57+
*.tmp
58+
*.tmp_proj
59+
*.log
60+
*.vspscc
61+
*.vssscc
62+
.builds
63+
*.pidb
64+
*.svclog
65+
*.scc
66+
67+
# Chutzpah Test files
68+
_Chutzpah*
69+
70+
# Visual C++ cache files
71+
ipch/
72+
*.aps
73+
*.ncb
74+
*.opensdf
75+
*.sdf
76+
*.cachefile
77+
78+
# Visual Studio profiler
79+
*.psess
80+
*.vsp
81+
*.vspx
82+
83+
# TFS 2012 Local Workspace
84+
$tf/
85+
86+
# Guidance Automation Toolkit
87+
*.gpState
88+
89+
# ReSharper is a .NET coding add-in
90+
_ReSharper*/
91+
*.[Rr]e[Ss]harper
92+
*.DotSettings.user
93+
94+
# JustCode is a .NET coding addin-in
95+
.JustCode
96+
97+
# TeamCity is a build add-in
98+
_TeamCity*
99+
100+
# DotCover is a Code Coverage Tool
101+
*.dotCover
102+
103+
# NCrunch
104+
_NCrunch_*
105+
.*crunch*.local.xml
106+
107+
# MightyMoose
108+
*.mm.*
109+
AutoTest.Net/
110+
111+
# Web workbench (sass)
112+
.sass-cache/
113+
114+
# Installshield output folder
115+
[Ee]xpress/
116+
117+
# DocProject is a documentation generator add-in
118+
DocProject/buildhelp/
119+
DocProject/Help/*.HxT
120+
DocProject/Help/*.HxC
121+
DocProject/Help/*.hhc
122+
DocProject/Help/*.hhk
123+
DocProject/Help/*.hhp
124+
DocProject/Help/Html2
125+
DocProject/Help/html
126+
127+
# Click-Once directory
128+
publish/
129+
130+
# Publish Web Output
131+
*.[Pp]ublish.xml
132+
*.azurePubxml
133+
## TODO: Comment the next line if you want to checkin your
134+
## web deploy settings but do note that will include unencrypted
135+
## passwords
136+
#*.pubxml
137+
138+
# NuGet Packages Directory
139+
packages/*
140+
## TODO: If the tool you use requires repositories.config
141+
## uncomment the next line
142+
#!packages/repositories.config
143+
144+
# Enable "build/" folder in the NuGet Packages folder since
145+
# NuGet packages use it for MSBuild targets.
146+
# This line needs to be after the ignore of the build folder
147+
# (and the packages folder if the line above has been uncommented)
148+
!packages/build/
149+
150+
# Windows Azure Build Output
151+
csx/
152+
*.build.csdef
153+
154+
# Windows Store app package directory
155+
AppPackages/
156+
157+
# Others
158+
sql/
159+
*.Cache
160+
ClientBin/
161+
[Ss]tyle[Cc]op.*
162+
~$*
163+
*~
164+
*.dbmdl
165+
*.dbproj.schemaview
166+
*.jfm
167+
*.pfx
168+
*.publishsettings
169+
node_modules/
170+
bower_components/
171+
172+
# RIA/Silverlight projects
173+
Generated_Code/
174+
175+
# Backup & report files from converting an old project file
176+
# to a newer Visual Studio version. Backup files are not needed,
177+
# because we have git ;-)
178+
_UpgradeReport_Files/
179+
Backup*/
180+
UpgradeLog*.XML
181+
UpgradeLog*.htm
182+
183+
# SQL Server files
184+
*.mdf
185+
*.ldf
186+
187+
# Business Intelligence projects
188+
*.rdl.data
189+
*.bim.layout
190+
*.bim_*.settings
191+
192+
# Microsoft Fakes
193+
FakesAssemblies/
194+
195+
# LightSwitch generated files
196+
GeneratedArtifacts/
197+
_Pvt_Extensions/
198+
ModelManifest.xml
199+
.vs
200+
201+
# Custom
202+
ConnectionStrings.config

GitVersion.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
assembly-versioning-scheme: MajorMinorPatch
2+
mode: ContinuousDelivery
3+
branches: {}
4+
ignore:
5+
sha: []
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 OnTopic.AspNetCore.Mvc.Components;
7+
using OnTopic.AspNetCore.Mvc.Models;
8+
using OnTopic.Mapping.Hierarchical;
9+
using OnTopic.Repositories;
10+
using OnTopic.ViewModels;
11+
using Microsoft.AspNetCore.Mvc;
12+
13+
namespace OnTopic.AspNetCore.Mvc.Host.Components {
14+
15+
/*============================================================================================================================
16+
| CLASS: MENU VIEW COMPONENT
17+
\---------------------------------------------------------------------------------------------------------------------------*/
18+
/// <summary>
19+
/// Defines a <see cref="ViewComponent"/> which provides access to a menu of <typeparamref name="NavigationTopicViewModel"/>
20+
/// instances.
21+
/// </summary>
22+
/// <remarks>
23+
/// <para>
24+
/// As a best practice, global data required by the layout view are requested independent of the current page. This
25+
/// allows each layout element to be provided with its own layout data, in the form of <see
26+
/// cref="NavigationViewModel{T}"/>s, instead of needing to add this data to every view model returned by <see
27+
/// cref="TopicController"/>.
28+
/// </para>
29+
/// </remarks>
30+
public class MenuViewComponent : MenuViewComponentBase<NavigationTopicViewModel> {
31+
32+
/*==========================================================================================================================
33+
| CONSTRUCTOR
34+
\-------------------------------------------------------------------------------------------------------------------------*/
35+
/// <summary>
36+
/// Initializes a new instance of a <see cref="MenuViewComponentBase{T}"/> with necessary dependencies.
37+
/// </summary>
38+
/// <returns>A topic controller for loading OnTopic views.</returns>
39+
public MenuViewComponent(
40+
ITopicRepository topicRepository,
41+
IHierarchicalTopicMappingService<NavigationTopicViewModel> hierarchicalTopicMappingService
42+
) : base(
43+
topicRepository,
44+
hierarchicalTopicMappingService
45+
) {}
46+
47+
} //Class
48+
} //Namespace
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 OnTopic.AspNetCore.Mvc.Components;
7+
using OnTopic.AspNetCore.Mvc.Models;
8+
using OnTopic.Mapping.Hierarchical;
9+
using OnTopic.Repositories;
10+
using OnTopic.ViewModels;
11+
using Microsoft.AspNetCore.Mvc;
12+
13+
namespace OnTopic.AspNetCore.Mvc.Host.Components {
14+
15+
/*============================================================================================================================
16+
| CLASS: PAGE-LEVEL NAVIGATION VIEW COMPONENT
17+
\---------------------------------------------------------------------------------------------------------------------------*/
18+
/// <summary>
19+
/// Defines a <see cref="ViewComponent"/> which provides access to a menu of <typeparamref name="NavigationTopicViewModel"/>
20+
/// instances representing the nearest page-level navigation.
21+
/// </summary>
22+
/// <remarks>
23+
/// <para>
24+
/// As a best practice, global data required by the layout view are requested independent of the current page. This
25+
/// allows each layout element to be provided with its own layout data, in the form of <see
26+
/// cref="NavigationViewModel{T}"/>s, instead of needing to add this data to every view model returned by <see
27+
/// cref="TopicController"/>.
28+
/// </para>
29+
/// </remarks>
30+
public class PageLevelNavigationViewComponent : PageLevelNavigationViewComponentBase<NavigationTopicViewModel> {
31+
32+
/*==========================================================================================================================
33+
| CONSTRUCTOR
34+
\-------------------------------------------------------------------------------------------------------------------------*/
35+
/// <summary>
36+
/// Initializes a new instance of a <see cref="MenuViewComponentBase{T}"/> with necessary dependencies.
37+
/// </summary>
38+
/// <returns>A topic controller for loading OnTopic views.</returns>
39+
public PageLevelNavigationViewComponent(
40+
ITopicRepository topicRepository,
41+
IHierarchicalTopicMappingService<NavigationTopicViewModel> hierarchicalTopicMappingService
42+
) : base(
43+
topicRepository,
44+
hierarchicalTopicMappingService
45+
) {}
46+
47+
} //Class
48+
} //Namespace
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.0</TargetFramework>
5+
<UserSecretsId>62eb85bf-f802-4afd-8bec-3d344e1cfc79</UserSecretsId>
6+
<IsPackable>false</IsPackable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<ProjectReference Include="..\OnTopic.AspNetCore.Mvc\OnTopic.AspNetCore.Mvc.csproj" />
11+
<ProjectReference Include="..\OnTopic.Data.Caching\OnTopic.Data.Caching.csproj" />
12+
<ProjectReference Include="..\OnTopic.Data.Sql\OnTopic.Data.Sql.csproj" />
13+
<ProjectReference Include="..\OnTopic.ViewModels\OnTopic.ViewModels.csproj" />
14+
<ProjectReference Include="..\OnTopic\OnTopic.csproj" />
15+
</ItemGroup>
16+
17+
</Project>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*==============================================================================================================================
2+
| Author Ignia, LLC
3+
| Client Ignia, LLC
4+
| Project Sample OnTopic Site
5+
\=============================================================================================================================*/
6+
using System;
7+
using Microsoft.AspNetCore.Hosting;
8+
using Microsoft.Extensions.Hosting;
9+
10+
namespace OnTopic.AspNetCore.Mvc.Host {
11+
12+
13+
/*============================================================================================================================
14+
| CLASS: PROGRAM
15+
\---------------------------------------------------------------------------------------------------------------------------*/
16+
/// <summary>
17+
/// The <see cref="Program"/> class—and it's <see cref="Program.Main(String[])"/> method—represent the entry point into the
18+
/// ASP.NET Core web application.
19+
/// </summary>
20+
public static class Program {
21+
22+
/*==========================================================================================================================
23+
| METHOD: MAIN
24+
\-------------------------------------------------------------------------------------------------------------------------*/
25+
/// <summary>
26+
/// Responsible for bootstrapping the web application.
27+
/// </summary>
28+
public static void Main(string[] args) => CreateHostBuilder(args).Build().Run();
29+
30+
/*==========================================================================================================================
31+
| METHOD: CREATE WEB HOST BUILDER
32+
\-------------------------------------------------------------------------------------------------------------------------*/
33+
/// <summary>
34+
/// Configures a new <see cref="IWebHostBuilder"/> with the default options.
35+
/// </summary>
36+
public static IHostBuilder CreateHostBuilder(string[] args) =>
37+
Microsoft.Extensions.Hosting.Host
38+
.CreateDefaultBuilder(args)
39+
.ConfigureWebHostDefaults(webBuilder => {
40+
webBuilder.UseStartup<Startup>();
41+
});
42+
43+
} //Class
44+
} //Namespace

0 commit comments

Comments
 (0)