Skip to content

Commit ea2cc03

Browse files
authored
Merge pull request #6899 from bdukes/add-missing-documentation
Add missing documentation
2 parents f78be02 + cfd261f commit ea2cc03

224 files changed

Lines changed: 3647 additions & 1468 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.

DNN Platform/DotNetNuke.Web.Client/Cdf/BasicFile.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ namespace DotNetNuke.Web.Client.Cdf
66
{
77
using System.Collections.Generic;
88

9+
/// <summary>A file.</summary>
910
internal class BasicFile
1011
{
12+
/// <summary>Initializes a new instance of the <see cref="BasicFile"/> class.</summary>
13+
/// <param name="type">The dependency type.</param>
1114
public BasicFile(ClientDependencyType type)
1215
{
1316
this.DependencyType = type;
@@ -19,24 +22,34 @@ public BasicFile(ClientDependencyType type)
1922
this.ForceVersion = false;
2023
}
2124

25+
/// <summary>Gets or sets the file path.</summary>
2226
public string FilePath { get; set; }
2327

28+
/// <summary>Gets the dependency type.</summary>
2429
public ClientDependencyType DependencyType { get; private set; }
2530

31+
/// <summary>Gets or sets the priority.</summary>
2632
public int Priority { get; set; }
2733

34+
/// <summary>Gets or sets the group.</summary>
2835
public int Group { get; set; }
2936

37+
/// <summary>Gets or sets the path name alias.</summary>
3038
public string PathNameAlias { get; set; }
3139

40+
/// <summary>Gets or sets the provider.</summary>
3241
public string ForceProvider { get; set; }
3342

43+
/// <summary>Gets the HTML attributes.</summary>
3444
public IDictionary<string, string> HtmlAttributes { get; private set; }
3545

46+
/// <summary>Gets or sets the name.</summary>
3647
public string Name { get; set; }
3748

49+
/// <summary>Gets or sets the version.</summary>
3850
public string Version { get; set; }
3951

52+
/// <summary>Gets or sets a value indicating whether to force the use of this version.</summary>
4053
public bool ForceVersion { get; set; }
4154
}
4255
}

DNN Platform/DotNetNuke.Web.Client/ClientResourceManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public static void AddConfiguration()
131131
xmlDoc.Save(configPath);
132132
}
133133

134+
/// <summary>Remove the client dependency configuration from the <c>web.config</c>.</summary>
134135
public static void RemoveConfiguration()
135136
{
136137
Logger.Info("Removing ClientDependency from web.config");

DNN Platform/DotNetNuke.Web.Client/ClientResourceSettings.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,28 @@ namespace DotNetNuke.Web.Client
2121
public partial class ClientResourceSettings
2222
{
2323
// public keys used to identify the dictionaries stored in the application context
24+
25+
/// <summary>The host settings dictionary key.</summary>
2426
public static readonly string HostSettingsDictionaryKey = "HostSettingsDictionary";
27+
28+
/// <summary>The portal settings dictionary key.</summary>
2529
public static readonly string PortalSettingsDictionaryKey = "PortalSettingsDictionary";
2630

2731
// public keys used to identify the various host and portal level settings
32+
33+
/// <summary>The composite files key.</summary>
2834
public static readonly string EnableCompositeFilesKey = "CrmEnableCompositeFiles";
35+
36+
/// <summary>The minify CSS key.</summary>
2937
public static readonly string MinifyCssKey = "CrmMinifyCss";
38+
39+
/// <summary>The minify JS key.</summary>
3040
public static readonly string MinifyJsKey = "CrmMinifyJs";
41+
42+
/// <summary>The override default settings key.</summary>
3143
public static readonly string OverrideDefaultSettingsKey = "CrmUseApplicationSettings";
44+
45+
/// <summary>The version key.</summary>
3246
public static readonly string VersionKey = "CrmVersion";
3347

3448
private static readonly Type PortalControllerType;
@@ -70,6 +84,9 @@ public partial bool IsOverridingDefaultSettingsEnabled()
7084
return this.IsOverridingDefaultSettingsEnabled(portalId);
7185
}
7286

87+
/// <summary>Gets a value indicating whether overriding the default settings is enabled.</summary>
88+
/// <param name="portalId">The portal ID.</param>
89+
/// <returns><see langword="true"/> if it's enabled, otherwise <see langword="false"/>.</returns>
7390
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Breaking change")]
7491
public bool IsOverridingDefaultSettingsEnabled(int? portalId)
7592
{
@@ -89,6 +106,9 @@ public bool IsOverridingDefaultSettingsEnabled(int? portalId)
89106
return this.GetVersion(portalId);
90107
}
91108

109+
/// <summary>Gets the version.</summary>
110+
/// <param name="portalId">The portal ID.</param>
111+
/// <returns>The version or <see langword="null"/>.</returns>
92112
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Breaking change")]
93113
public int? GetVersion(int? portalId)
94114
{
@@ -113,18 +133,24 @@ public bool IsOverridingDefaultSettingsEnabled(int? portalId)
113133
return null;
114134
}
115135

136+
/// <summary>Gets a value indicating whether composite files are enabled.</summary>
137+
/// <returns>Whether it's enabled.</returns>
116138
public bool? AreCompositeFilesEnabled()
117139
{
118140
int? portalId = GetPortalIdThroughReflection();
119141
return this.IsBooleanSettingEnabled(portalId, EnableCompositeFilesKey);
120142
}
121143

144+
/// <summary>Gets a value indicating whether CSS minification is enabled.</summary>
145+
/// <returns>Whether it's enabled.</returns>
122146
public bool? EnableCssMinification()
123147
{
124148
int? portalId = GetPortalIdThroughReflection();
125149
return this.IsBooleanSettingEnabled(portalId, MinifyCssKey);
126150
}
127151

152+
/// <summary>Gets a value indicating whether JS minification is enabled.</summary>
153+
/// <returns>Whether it's enabled.</returns>
128154
public bool? EnableJsMinification()
129155
{
130156
int? portalId = GetPortalIdThroughReflection();

DNN Platform/DotNetNuke.Web.Client/Controls/ClientResourceExclude.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ protected ClientResourceExclude(IClientResourceController clientResourceControll
3636
/// <summary>Gets the dependency type of the client resource to exclude.</summary>
3737
public ClientDependencyType DependencyType { get; internal set; }
3838

39+
/// <inheritdoc />
3940
protected override void OnLoad(EventArgs e)
4041
{
4142
switch (this.DependencyType)

DNN Platform/DotNetNuke.Web.Client/Controls/ClientResourceLoader.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ public ClientResourceLoader(IClientResourceController clientResourceController)
3232
this.Paths = [];
3333
}
3434

35+
/// <summary>Gets the paths collection.</summary>
3536
[PersistenceMode(PersistenceMode.InnerProperty)]
3637
public ClientResourcePathCollection Paths { get; private set; }
3738

3839
private static bool AsyncPostBackHandlerEnabled =>
3940
HttpContext.Current != null && HttpContext.Current.Items.Contains("AsyncPostBackHandlerEnabled");
4041

42+
/// <inheritdoc />
4143
protected override void OnInit(System.EventArgs e)
4244
{
4345
if (AsyncPostBackHandlerEnabled && ScriptManager.GetCurrent(this.Page) == null)
@@ -48,6 +50,7 @@ protected override void OnInit(System.EventArgs e)
4850
base.OnInit(e);
4951
}
5052

53+
/// <inheritdoc />
5154
protected override void OnLoad(System.EventArgs e)
5255
{
5356
foreach (var path in this.Paths)

DNN Platform/DotNetNuke.Web.Client/Controls/ClientResourcePath.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,29 @@ namespace DotNetNuke.Web.Client.ClientResourceManagement
1010
/// <summary>Defines the path to a client resource.</summary>
1111
public class ClientResourcePath
1212
{
13+
/// <summary>An event which is triggered during data binding.</summary>
1314
public event EventHandler DataBinding;
1415

16+
/// <summary>Gets or sets the name.</summary>
1517
public string Name { get; set; }
1618

19+
/// <summary>Gets or sets the path.</summary>
1720
public string Path { get; set; }
1821

22+
/// <summary>Gets the parent.</summary>
1923
public ClientResourceLoader Parent { get; internal set; }
2024

25+
/// <summary>Gets the binding container.</summary>
2126
public Control BindingContainer => this.Parent;
2227

28+
/// <summary>Triggers the <see cref="DataBinding"/> event.</summary>
2329
public void DataBind()
2430
{
2531
this.OnDataBinding(EventArgs.Empty);
2632
}
2733

34+
/// <summary>Triggers the <see cref="DataBinding"/> event.</summary>
35+
/// <param name="e">The event args.</param>
2836
protected void OnDataBinding(EventArgs e)
2937
{
3038
this.DataBinding?.Invoke(this, e);

DNN Platform/DotNetNuke.Web.Client/Controls/DnnHtmlInclude.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ namespace DotNetNuke.Web.Client.ClientResourceManagement
1818
/// <summary>Allows for registration of CSS and JavaScript resources.</summary>
1919
public class DnnHtmlInclude : Literal
2020
{
21+
/// <summary>The pattern that matches a tag.</summary>
2122
public const string TagPattern = @"<{0}((\s+\w+(\s*=\s*(?:"".*?""|'.*?'|[^'"">\s]+))?)+\s*|\s*)/?>";
23+
24+
/// <summary>The pattern that matches an attribute.</summary>
2225
public const string AttributePattern = @"{0}(\s*=\s*(?:""(?<val>.*?)""|'(?<val>.*?)'|(?<val>[^'"">\s]+)))";
2326

2427
private const string MatchAllAttributes = @"(\S+)=[""']?((?:.(?![""']?\s+(?:\S+)=|[>""']))+.)[""']?";
@@ -28,6 +31,8 @@ public class DnnHtmlInclude : Literal
2831

2932
private readonly IClientResourceController clientResourceController;
3033

34+
/// <summary>Initializes a new instance of the <see cref="DnnHtmlInclude"/> class.</summary>
35+
/// <param name="clientResourceController">The client resource controller.</param>
3136
public DnnHtmlInclude(IClientResourceController clientResourceController)
3237
{
3338
this.clientResourceController = clientResourceController;
@@ -42,6 +47,7 @@ public DnnHtmlInclude(IClientResourceController clientResourceController)
4247
/// <summary>Gets or sets the group for this resource include.</summary>
4348
public int Group { get; set; } = 100;
4449

50+
/// <inheritdoc />
4551
protected override void OnLoad(EventArgs e)
4652
{
4753
base.OnLoad(e);

DNN Platform/DotNetNuke.Web.Client/Controls/DnnJsIncludeFallback.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ public DnnJsIncludeFallback(string objectName, string fileName)
2020
this.FileName = fileName;
2121
}
2222

23+
/// <summary>Gets or sets the object name.</summary>
2324
public string ObjectName { get; set; }
2425

26+
/// <summary>Gets or sets the file name.</summary>
2527
public string FileName { get; set; }
2628

2729
/// <inheritdoc/>

DNN Platform/DotNetNuke.Web.Client/Controls/DnnResources.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,25 @@ namespace DotNetNuke.Web.Client.ClientResourceManagement
99

1010
using DotNetNuke.Abstractions.ClientResources;
1111

12+
/// <summary>Renders client resources.</summary>
1213
public class DnnResources : Literal
1314
{
1415
private readonly IClientResourceController clientResourceController;
1516

17+
/// <summary>Initializes a new instance of the <see cref="DnnResources"/> class.</summary>
18+
/// <param name="clientResourceController">The client resource controller.</param>
1619
public DnnResources(IClientResourceController clientResourceController)
1720
{
1821
this.clientResourceController = clientResourceController;
1922
}
2023

24+
/// <summary>Gets or sets the application path.</summary>
2125
public string ApplicationPath { get; set; }
2226

27+
/// <summary>Gets or sets the provider.</summary>
2328
public string Provider { get; set; }
2429

30+
/// <inheritdoc />
2531
protected override void Render(HtmlTextWriter writer)
2632
{
2733
base.Render(writer);

DNN Platform/DotNetNuke.Web.Client/DependencyInjection.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ namespace DotNetNuke.Web.Client;
1111

1212
using Microsoft.Extensions.DependencyInjection;
1313

14+
/// <summary>A helper for dependency injection.</summary>
15+
/// <remarks>This class uses reflection to access the DI container since it can't directly reference the main DotNetNuke.Library project.</remarks>
1416
internal static class DependencyInjection
1517
{
1618
private static readonly Type CommonGlobalsType;
@@ -28,13 +30,19 @@ static DependencyInjection()
2830
}
2931
}
3032

33+
/// <summary>Gets the current service scope, or creates a service scope if there isn't one already created. The scope must be disposed by the caller.</summary>
34+
/// <returns>A service scope.</returns>
35+
/// <exception cref="InvalidOperationException">The expected method in <c>DotNetNuke.Common.Globals</c> does not exist.</exception>
3136
public static IServiceScope GetOrCreateServiceScope()
3237
{
3338
var getOrCreateServiceScopeMethod = CommonGlobalsType.GetMethod("GetOrCreateServiceScope", BindingFlags.NonPublic | BindingFlags.Static) ?? throw new InvalidOperationException("Unable to retrieve Globals.GetOrCreateServiceScope method via reflection");
3439
var serviceScope = getOrCreateServiceScopeMethod.Invoke(null, []);
3540
return (IServiceScope)serviceScope;
3641
}
3742

43+
/// <summary>Gets the current service provider.</summary>
44+
/// <returns>A service provider.</returns>
45+
/// <exception cref="InvalidOperationException">The expected method in <c>DotNetNuke.Common.Globals</c> does not exist.</exception>
3846
public static IServiceProvider GetCurrentServiceProvider()
3947
{
4048
var getCurrentServiceProviderMethod = CommonGlobalsType.GetMethod("GetCurrentServiceProvider", BindingFlags.NonPublic | BindingFlags.Static) ?? throw new InvalidOperationException("Unable to retrieve Globals.GetCurrentServiceProvider method via reflection");

0 commit comments

Comments
 (0)