Skip to content

Commit 1829319

Browse files
Complete the XML documentation (#640)
Add the missing summary, param, typeparam and returns tags outside the behaviors, fill empty doc tags, and fix broken comments: unresolved crefs and a doc comment placed after an attribute.
1 parent 91f8fe6 commit 1829319

62 files changed

Lines changed: 688 additions & 51 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.

‎src/Radical.Windows/ApplicationBootstrapper(generic).cs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22

33
namespace Radical.Windows
44
{
5+
/// <summary>
6+
/// An <see cref="ApplicationBootstrapper"/> that uses <typeparamref name="TMainView"/> as the shell window.
7+
/// </summary>
8+
/// <typeparam name="TMainView">The type of the shell window.</typeparam>
59
[Obsolete("ApplicationBootstrapper has been obsoleted and will be treated as an error in v3.0.0 and removed in v4.0.0. Consider moving to new RadicalApplication using the AddRadicalApplication extension method.", false)]
610
public class ApplicationBootstrapper<TMainView> : ApplicationBootstrapper where TMainView : System.Windows.Window
711
{
12+
/// <summary>
13+
/// Initializes a new instance of the <see cref="ApplicationBootstrapper{TMainView}"/> class.
14+
/// </summary>
815
public ApplicationBootstrapper()
916
: base()
1017
{

‎src/Radical.Windows/ApplicationBootstrapper.cs‎

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public ApplicationBootstrapper()
112112
/// Defines the type to use as main/shell window.
113113
/// </summary>
114114
/// <typeparam name="TShellType">The shell type.</typeparam>
115-
/// <returns></returns>
115+
/// <returns>This bootstrapper instance, for chaining.</returns>
116116
public ApplicationBootstrapper UsingAsShell<TShellType>() where TShellType : Window
117117
{
118118
return UsingAsShell(typeof(TShellType));
@@ -122,7 +122,7 @@ public ApplicationBootstrapper UsingAsShell<TShellType>() where TShellType : Win
122122
/// Defines the type to use as main/shell window.
123123
/// </summary>
124124
/// <param name="shellViewType">The shell type.</param>
125-
/// <returns></returns>
125+
/// <returns>This bootstrapper instance, for chaining.</returns>
126126
public ApplicationBootstrapper UsingAsShell(Type shellViewType)
127127
{
128128
Ensure.That(shellViewType)
@@ -141,7 +141,7 @@ public ApplicationBootstrapper UsingAsShell(Type shellViewType)
141141
/// Enables splash screen support.
142142
/// </summary>
143143
/// <param name="config">The splash screen configuration.</param>
144-
/// <returns></returns>
144+
/// <returns>This bootstrapper instance, for chaining.</returns>
145145
public ApplicationBootstrapper EnableSplashScreen(SplashScreenConfiguration config = null)
146146
{
147147
if (config != null)
@@ -157,6 +157,7 @@ public ApplicationBootstrapper EnableSplashScreen(SplashScreenConfiguration conf
157157
/// <summary>
158158
/// Disables the auto boot.
159159
/// </summary>
160+
/// <returns>This bootstrapper instance, for chaining.</returns>
160161
public ApplicationBootstrapper DisableAutoBoot()
161162
{
162163
isAutoBootEnabled = false;
@@ -170,7 +171,7 @@ public ApplicationBootstrapper DisableAutoBoot()
170171
/// Called before the install and boot process begins, right after the service provider creation.
171172
/// </summary>
172173
/// <param name="onBeforeInstall">The on before install.</param>
173-
/// <returns></returns>
174+
/// <returns>This bootstrapper instance, for chaining.</returns>
174175
public ApplicationBootstrapper OnBeforeInstall(Action<BootstrapConventions, AssemblyScanner> onBeforeInstall)
175176
{
176177
this.onBeforeInstall = onBeforeInstall;
@@ -184,7 +185,7 @@ public ApplicationBootstrapper OnBeforeInstall(Action<BootstrapConventions, Asse
184185
/// Called when the service provider is created.
185186
/// </summary>
186187
/// <param name="onServiceProviderCreated">The on service provider created.</param>
187-
/// <returns></returns>
188+
/// <returns>This bootstrapper instance, for chaining.</returns>
188189
public ApplicationBootstrapper OnServiceProviderCreated(Action<IServiceProvider> onServiceProviderCreated)
189190
{
190191
this.onServiceProviderCreated = onServiceProviderCreated;
@@ -273,7 +274,7 @@ void ExposeRegisteredAppResources()
273274
/// Exposes the given service type as resource in the App resources.
274275
/// </summary>
275276
/// <typeparam name="TService">The type of the service.</typeparam>
276-
/// <returns></returns>
277+
/// <returns>This bootstrapper instance, for chaining.</returns>
277278
public ApplicationBootstrapper ExposeAsResource<TService>()
278279
{
279280
return ExposeAsResource(typeof(TService), Application.Current.GetType());
@@ -284,7 +285,7 @@ public ApplicationBootstrapper ExposeAsResource<TService>()
284285
/// </summary>
285286
/// <typeparam name="TService">The type of the service.</typeparam>
286287
/// <typeparam name="TView">The type of the view.</typeparam>
287-
/// <returns></returns>
288+
/// <returns>This bootstrapper instance, for chaining.</returns>
288289
public ApplicationBootstrapper ExposeAsResource<TService, TView>() where TView : FrameworkElement
289290
{
290291
return ExposeAsResource(typeof(TService), typeof(TView));
@@ -295,7 +296,7 @@ public ApplicationBootstrapper ExposeAsResource<TService, TView>() where TView :
295296
/// </summary>
296297
/// <param name="serviceType">Type of the service.</param>
297298
/// <param name="resourceOwner">The resource owner.</param>
298-
/// <returns></returns>
299+
/// <returns>This bootstrapper instance, for chaining.</returns>
299300
internal ApplicationBootstrapper ExposeAsResource(Type serviceType, Type resourceOwner)
300301
{
301302
if (!resourcesRegistrationHolder.Registrations.TryGetValue(resourceOwner, out HashSet<Type> types))
@@ -317,7 +318,7 @@ internal ApplicationBootstrapper ExposeAsResource(Type serviceType, Type resourc
317318
/// Using as current culture.
318319
/// </summary>
319320
/// <param name="currentCultureHandler">The current culture handler.</param>
320-
/// <returns></returns>
321+
/// <returns>This bootstrapper instance, for chaining.</returns>
321322
public ApplicationBootstrapper UsingAsCurrentCulture(Func<CultureInfo> currentCultureHandler)
322323
{
323324
this.bootstrapConfiguration.UseCulture(_=> currentCultureHandler());
@@ -329,7 +330,7 @@ public ApplicationBootstrapper UsingAsCurrentCulture(Func<CultureInfo> currentCu
329330
/// Using as current UI culture.
330331
/// </summary>
331332
/// <param name="currentUICultureHandler">The current UI culture handler.</param>
332-
/// <returns></returns>
333+
/// <returns>This bootstrapper instance, for chaining.</returns>
333334
public ApplicationBootstrapper UsingAsCurrentUICulture(Func<CultureInfo> currentUICultureHandler)
334335
{
335336
this.bootstrapConfiguration.UseUICulture(_=> currentUICultureHandler());
@@ -366,7 +367,7 @@ void HandleSingletonApplicationStartup(SingletonApplicationStartupArgs args)
366367
/// Called when a singleton application startup.
367368
/// </summary>
368369
/// <param name="onSingletonApplicationStartup">The singleton application startup handler.</param>
369-
/// <returns></returns>
370+
/// <returns>This bootstrapper instance, for chaining.</returns>
370371
public ApplicationBootstrapper OnSingletonApplicationStartup(Action<SingletonApplicationStartupArgs> onSingletonApplicationStartup)
371372
{
372373
this.onSingletonApplicationStartup = onSingletonApplicationStartup;
@@ -587,7 +588,7 @@ void OnShutdownCore(ApplicationShutdownReason reason)
587588
/// Registers this application as singleton.
588589
/// </summary>
589590
/// <param name="key">The key.</param>
590-
/// <returns></returns>
591+
/// <returns>This bootstrapper instance, for chaining.</returns>
591592
public ApplicationBootstrapper RegisterAsSingleton(string key)
592593
{
593594
return RegisterAsSingleton(key, SingletonApplicationScope.Local);
@@ -598,7 +599,7 @@ public ApplicationBootstrapper RegisterAsSingleton(string key)
598599
/// </summary>
599600
/// <param name="key">The key.</param>
600601
/// <param name="scope">The scope.</param>
601-
/// <returns></returns>
602+
/// <returns>This bootstrapper instance, for chaining.</returns>
602603
public ApplicationBootstrapper RegisterAsSingleton(string key, SingletonApplicationScope scope)
603604
{
604605
this.key = key;
@@ -611,7 +612,7 @@ public ApplicationBootstrapper RegisterAsSingleton(string key, SingletonApplicat
611612
/// Overrides the shutdown mode.
612613
/// </summary>
613614
/// <param name="mode">The mode.</param>
614-
/// <returns></returns>
615+
/// <returns>This bootstrapper instance, for chaining.</returns>
615616
public ApplicationBootstrapper OverrideShutdownMode(ShutdownMode mode)
616617
{
617618
this.shutdownMode = mode;
@@ -623,7 +624,7 @@ public ApplicationBootstrapper OverrideShutdownMode(ShutdownMode mode)
623624
/// Called when the application is booting.
624625
/// </summary>
625626
/// <param name="bootHandler">The boot handler.</param>
626-
/// <returns></returns>
627+
/// <returns>This bootstrapper instance, for chaining.</returns>
627628
public ApplicationBootstrapper OnBoot(Action<IServiceProvider> bootHandler)
628629
{
629630
this.bootHandler = bootHandler;
@@ -641,7 +642,7 @@ void OnUnhandledException(Exception exception)
641642
/// Allows to inject an handler for not handled exception(s).
642643
/// </summary>
643644
/// <param name="unhandledExceptionHandler">The not handled exception handler.</param>
644-
/// <returns></returns>
645+
/// <returns>This bootstrapper instance, for chaining.</returns>
645646
public ApplicationBootstrapper OnUnhandledException(Action<Exception> unhandledExceptionHandler)
646647
{
647648
this.unhandledExceptionHandler = unhandledExceptionHandler;
@@ -652,7 +653,7 @@ public ApplicationBootstrapper OnUnhandledException(Action<Exception> unhandledE
652653
/// Called when the boot process is completed.
653654
/// </summary>
654655
/// <param name="bootCompletedHandler">The boot completed handler.</param>
655-
/// <returns></returns>
656+
/// <returns>This bootstrapper instance, for chaining.</returns>
656657
public ApplicationBootstrapper OnBootCompleted(Action<IServiceProvider> bootCompletedHandler)
657658
{
658659
this.bootCompletedHandler = bootCompletedHandler;
@@ -663,7 +664,7 @@ public ApplicationBootstrapper OnBootCompleted(Action<IServiceProvider> bootComp
663664
/// Called when the application is shutting down.
664665
/// </summary>
665666
/// <param name="shutdownHandler">The shutdown handler.</param>
666-
/// <returns></returns>
667+
/// <returns>This bootstrapper instance, for chaining.</returns>
667668
public ApplicationBootstrapper OnShutdown(Action<ApplicationShuttingDownArgs> shutdownHandler)
668669
{
669670
this.shutdownHandler = shutdownHandler;

‎src/Radical.Windows/Bootstrap/AssemblyScanner.cs‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,23 @@
66

77
namespace Radical.Windows.Bootstrap
88
{
9+
/// <summary>
10+
/// Scans the application directory, and the trusted platform assemblies, for the assemblies to load at boot time.
11+
/// </summary>
912
public class AssemblyScanner
1013
{
14+
/// <summary>
15+
/// The result of an assembly filter.
16+
/// </summary>
1117
public enum FilterResults
1218
{
19+
/// <summary>
20+
/// The assembly is excluded from the scan.
21+
/// </summary>
1322
Exclude,
23+
/// <summary>
24+
/// The assembly is included in the scan.
25+
/// </summary>
1426
Include
1527
}
1628

@@ -25,6 +37,9 @@ internal AssemblyScanner()
2537

2638
}
2739

40+
/// <summary>
41+
/// Gets or sets the options used to search assemblies in the application directory. Defaults to <see cref="SearchOption.TopDirectoryOnly"/>.
42+
/// </summary>
2843
public SearchOption DirectorySearchOptions { get; set; } = SearchOption.TopDirectoryOnly;
2944

3045
readonly List<Func<string, FilterResults>> assemblyFilters = new List<Func<string, FilterResults>>();
@@ -77,6 +92,11 @@ bool fullPathsFilter(string fullPath)
7792
return assemblies.Distinct();
7893
}
7994

95+
/// <summary>
96+
/// Adds a filter applied to the full path of each candidate assembly: only assemblies
97+
/// included by all the filters are loaded.
98+
/// </summary>
99+
/// <param name="filter">The filter.</param>
80100
public void AddAssemblyFilter(Func<string, FilterResults> filter)
81101
{
82102
assemblyFilters.Add(filter);

‎src/Radical.Windows/Bootstrap/BootstrapConfiguration.cs‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public void ConfigureServices(Action<IServiceCollection> services)
9999
/// <summary>
100100
/// Exposes the given service type as resource in the App resources.
101101
/// </summary>
102+
/// <typeparam name="TService">The type of the service.</typeparam>
102103
public void ExposeServiceAsResource<TService>()
103104
{
104105
ExposeServiceAsResource(typeof(TService), Application.Current.GetType());
@@ -109,7 +110,6 @@ public void ExposeServiceAsResource<TService>()
109110
/// </summary>
110111
/// <typeparam name="TService">The type of the service.</typeparam>
111112
/// <typeparam name="TView">The type of the view.</typeparam>
112-
/// <returns></returns>
113113
public void ExposeServiceAsResource<TService, TView>() where TView : FrameworkElement
114114
{
115115
ExposeServiceAsResource(typeof(TService), typeof(TView));
@@ -133,6 +133,7 @@ internal void ExposeServiceAsResource(Type serviceType, Type resourceOwner)
133133
/// <summary>
134134
/// Defines the Culture to use.
135135
/// </summary>
136+
/// <param name="cultureConfig">A delegate that, given the service provider, returns the culture to use.</param>
136137
public void UseCulture(Func<IServiceProvider, CultureInfo> cultureConfig)
137138
{
138139
CultureConfig = cultureConfig;
@@ -141,6 +142,7 @@ public void UseCulture(Func<IServiceProvider, CultureInfo> cultureConfig)
141142
/// <summary>
142143
/// Defines the UICulture to use.
143144
/// </summary>
145+
/// <param name="uiCultureConfig">A delegate that, given the service provider, returns the UI culture to use.</param>
144146
public void UseUICulture(Func<IServiceProvider, CultureInfo> uiCultureConfig)
145147
{
146148
UICultureConfig = uiCultureConfig;
@@ -149,6 +151,7 @@ public void UseUICulture(Func<IServiceProvider, CultureInfo> uiCultureConfig)
149151
/// <summary>
150152
/// Defines the type to use as main/shell window.
151153
/// </summary>
154+
/// <typeparam name="TShellType">The type of the shell window.</typeparam>
152155
public void UseAsShell<TShellType>() where TShellType : Window
153156
{
154157
UseAsShell(typeof(TShellType));
@@ -157,6 +160,7 @@ public void UseAsShell<TShellType>() where TShellType : Window
157160
/// <summary>
158161
/// Defines the type to use as main/shell window.
159162
/// </summary>
163+
/// <param name="shellViewType">The type of the shell window.</param>
160164
public void UseAsShell(Type shellViewType)
161165
{
162166
Ensure.That(shellViewType)
@@ -170,6 +174,7 @@ public void UseAsShell(Type shellViewType)
170174
/// <summary>
171175
/// Override the default shutdown mode.
172176
/// </summary>
177+
/// <param name="shutdownMode">The shutdown mode to use.</param>
173178
public void OverrideShutdownMode(ShutdownMode shutdownMode)
174179
{
175180
ShutdownMode = shutdownMode;
@@ -178,6 +183,7 @@ public void OverrideShutdownMode(ShutdownMode shutdownMode)
178183
/// <summary>
179184
/// Registers this application as singleton locally at the user session level.
180185
/// </summary>
186+
/// <param name="registrationKey">The key that identifies the application.</param>
181187
public void RegisterAsLocalSingleton(string registrationKey)
182188
{
183189
SingletonRegistrationKey = registrationKey;
@@ -187,6 +193,7 @@ public void RegisterAsLocalSingleton(string registrationKey)
187193
/// <summary>
188194
/// Registers this application as singleton globally at the machine level.
189195
/// </summary>
196+
/// <param name="registrationKey">The key that identifies the application.</param>
190197
public void RegisterAsGlobalSingleton(string registrationKey)
191198
{
192199
SingletonRegistrationKey = registrationKey;
@@ -196,6 +203,7 @@ public void RegisterAsGlobalSingleton(string registrationKey)
196203
/// <summary>
197204
/// Called when a singleton application startup.
198205
/// </summary>
206+
/// <param name="onSingletonApplicationStartup">The handler invoked when the singleton application starts.</param>
199207
public void OnSingletonApplicationStartup(Action<SingletonApplicationStartupArgs> onSingletonApplicationStartup)
200208
{
201209
Ensure.That(onSingletonApplicationStartup)
@@ -208,6 +216,7 @@ public void OnSingletonApplicationStartup(Action<SingletonApplicationStartupArgs
208216
/// <summary>
209217
/// Called when the application is booting.
210218
/// </summary>
219+
/// <param name="bootingHandler">The handler invoked when the application is booting.</param>
211220
public void OnBooting(Action<IServiceProvider> bootingHandler)
212221
{
213222
Ensure.That(bootingHandler)
@@ -220,6 +229,7 @@ public void OnBooting(Action<IServiceProvider> bootingHandler)
220229
/// <summary>
221230
/// Called when the application is shutting down.
222231
/// </summary>
232+
/// <param name="shutingDownHandler">The handler invoked when the application is shutting down.</param>
223233
public void OnShuttingDown(Action<ApplicationShuttingDownArgs> shutingDownHandler)
224234
{
225235
Ensure.That(shutingDownHandler)
@@ -240,6 +250,7 @@ public void DisableAutoBoot()
240250
/// <summary>
241251
/// Enables splash screen support.
242252
/// </summary>
253+
/// <param name="config">The splash screen configuration, or <c>null</c> to use the default one.</param>
243254
public void EnableSplashScreen(SplashScreenConfiguration config = null)
244255
{
245256
if (config != null)
@@ -253,6 +264,7 @@ public void EnableSplashScreen(SplashScreenConfiguration config = null)
253264
/// <summary>
254265
/// Called when the service provider is created.
255266
/// </summary>
267+
/// <param name="onServiceProviderCreatedHandler">The handler invoked when the service provider is created.</param>
256268
public void OnServiceProviderCreated(Action<IServiceProvider> onServiceProviderCreatedHandler)
257269
{
258270
Ensure.That(onServiceProviderCreatedHandler)
@@ -265,6 +277,7 @@ public void OnServiceProviderCreated(Action<IServiceProvider> onServiceProviderC
265277
/// <summary>
266278
/// Allows to inject an handler for not handled exception(s).
267279
/// </summary>
280+
/// <param name="unhandledExceptionHandler">The handler invoked when an unhandled exception occurs.</param>
268281
public void OnUnhandledException(Action<Exception> unhandledExceptionHandler)
269282
{
270283
Ensure.That(unhandledExceptionHandler)
@@ -277,6 +290,7 @@ public void OnUnhandledException(Action<Exception> unhandledExceptionHandler)
277290
/// <summary>
278291
/// Called when the boot process is completed.
279292
/// </summary>
293+
/// <param name="bootCompletedHandler">The handler invoked when the boot process is completed.</param>
280294
public void OnBootCompleted(Action<IServiceProvider> bootCompletedHandler)
281295
{
282296
Ensure.That(bootCompletedHandler)

‎src/Radical.Windows/Bootstrap/IDependenciesInstaller.cs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@
44

55
namespace Radical.Windows.Bootstrap
66
{
7+
/// <summary>
8+
/// Installs dependencies in the service collection at boot time. Types implementing this
9+
/// interface found by the assembly scanning are automatically invoked.
10+
/// </summary>
711
public interface IDependenciesInstaller
812
{
13+
/// <summary>
14+
/// Installs dependencies in the given service collection.
15+
/// </summary>
16+
/// <param name="conventions">The bootstrap conventions.</param>
17+
/// <param name="services">The service collection.</param>
18+
/// <param name="assemblyScanningResults">The types found by the assembly scanning.</param>
919
void Install(BootstrapConventions conventions, IServiceCollection services, IEnumerable<Type> assemblyScanningResults);
1020
}
1121
}

0 commit comments

Comments
 (0)