Skip to content

Commit

Permalink
Added Documentation to IModuleCatalogExtensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesus committed Jun 25, 2020
1 parent ebf8724 commit 41f7cd8
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions src/Wpf/Prism.Wpf/Modularity/IModuleCatalogExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
using System;
using System;
using Prism.Properties;

namespace Prism.Modularity
{
/// <summary>
/// <see cref="IModuleCatalog"/> extensions.
/// </summary>
public static class IModuleCatalogExtensions
{
/// <summary>
/// Adds the module.
/// Adds the module to the <see cref="IModuleCatalog"/>.
/// </summary>
/// <param name="catalog">Catalog</param>
/// <param name="mode"><see cref="InitializationMode"/></param>
/// <param name="dependsOn">Collection of module names (<see cref="ModuleInfo.ModuleName"/>) of the modules on which the module to be added logically depends on.</param>
/// <param name="catalog">The catalog to add the module to.</param>
/// <param name="mode">Stage on which the module to be added will be initialized.</param>
/// <param name="dependsOn">Collection of module names (<see cref="IModuleInfo.ModuleName"/>) of the modules on which the module to be added logically depends on.</param>
/// <typeparam name="T">The <see cref="IModule"/> type parameter.</typeparam>
/// <returns>The same <see cref="IModuleCatalog"/> instance with the added module.</returns>
public static IModuleCatalog AddModule<T>(this IModuleCatalog catalog, InitializationMode mode = InitializationMode.WhenAvailable, params string[] dependsOn)
Expand All @@ -20,12 +23,12 @@ public static IModuleCatalog AddModule<T>(this IModuleCatalog catalog, Initializ
}

/// <summary>
/// Adds the module.
/// Adds the module to the <see cref="IModuleCatalog"/>.
/// </summary>
/// <param name="catalog">Catalog.</param>
/// <param name="name">Name.</param>
/// <param name="mode"><see cref="IModule"/>.</param>
/// <param name="dependsOn">Collection of module names (<see cref="ModuleInfo.ModuleName"/>) of the modules on which the module to be added logically depends on.</param>
/// <param name="catalog">The catalog to add the module to.</param>
/// <param name="name">Name of the module to be added.</param>
/// <param name="mode">Stage on which the module to be added will be initialized.</param>
/// <param name="dependsOn">Collection of module names (<see cref="IModuleInfo.ModuleName"/>) of the modules on which the module to be added logically depends on.</param>
/// <typeparam name="T">The <see cref="IModule"/> type parameter.</typeparam>
/// <returns>The same <see cref="IModuleCatalog"/> instance with the added module.</returns>
public static IModuleCatalog AddModule<T>(this IModuleCatalog catalog, string name, InitializationMode mode = InitializationMode.WhenAvailable, params string[] dependsOn)
Expand All @@ -37,7 +40,7 @@ public static IModuleCatalog AddModule<T>(this IModuleCatalog catalog, string na
/// <summary>
/// Adds a groupless <see cref="IModuleInfo"/> to the catalog.
/// </summary>
/// <param name="catalog">Catalog.</param>
/// <param name="catalog">The catalog to add the module to.</param>
/// <param name="moduleType"><see cref="Type"/> of the module to be added.</param>
/// <param name="dependsOn">Collection of module names (<see cref="IModuleInfo.ModuleName"/>) of the modules on which the module to be added logically depends on.</param>
/// <returns>The same <see cref="IModuleCatalog"/> instance with the added module.</returns>
Expand All @@ -49,7 +52,7 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, Type moduleT
/// <summary>
/// Adds a groupless <see cref="IModuleInfo"/> to the catalog.
/// </summary>
/// <param name="catalog">Catalog.</param>
/// <param name="catalog">The catalog to add the module to.</param>
/// <param name="moduleType"><see cref="Type"/> of the module to be added.</param>
/// <param name="initializationMode">Stage on which the module to be added will be initialized.</param>
/// <param name="dependsOn">Collection of module names (<see cref="IModuleInfo.ModuleName"/>) of the modules on which the module to be added logically depends on.</param>
Expand All @@ -63,12 +66,13 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, Type moduleT
}

/// <summary>
/// Adds a groupless <see cref="ModuleInfo"/> to the catalog.
/// Adds a groupless <see cref="IModuleInfo"/> to the catalog.
/// </summary>
/// <param name="catalog">The catalog to add the module to.</param>
/// <param name="moduleName">Name of the module to be added.</param>
/// <param name="catalog">Catalog.</param>
/// <param name="moduleType"><see cref="Type"/> of the module to be added.</param>
/// <param name="dependsOn">Collection of module names (<see cref="ModuleInfo.ModuleName"/>) of the modules on which the module to be added logically depends on.</param>
/// <param name="dependsOn">Collection of module names (<see cref="IModuleInfo.ModuleName"/>) of the modules on which the module to be added logically depends on.</param>
/// <returns>The same <see cref="IModuleCatalog"/> instance with the added module.</returns>
public static IModuleCatalog AddModule(this IModuleCatalog catalog, string moduleName, string moduleType, params string[] dependsOn)
{
Expand All @@ -78,7 +82,7 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, string modul
/// <summary>
/// Adds a groupless <see cref="ModuleInfo"/> to the catalog.
/// </summary>
/// <param name="catalog">Catalog.</param>
/// <param name="catalog">The catalog to add the module to.</param>
/// <param name="moduleName">Name of the module to be added.</param>
/// <param name="moduleType"><see cref="Type"/> of the module to be added.</param>
/// <param name="initializationMode">Stage on which the module to be added will be initialized.</param>
Expand All @@ -92,7 +96,7 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, string modul
/// <summary>
/// Adds a groupless <see cref="ModuleInfo"/> to the catalog.
/// </summary>
/// <param name="catalog">Catalog.</param>
/// <param name="catalog">The catalog to add the module to.</param>
/// <param name="moduleName">Name of the module to be added.</param>
/// <param name="moduleType"><see cref="Type"/> of the module to be added.</param>
/// <param name="refValue">Reference to the location of the module to be added assembly.</param>
Expand All @@ -116,34 +120,33 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, string modul
}

/// <summary>
/// Adds the module.
/// Adds the module to the <see cref="IModuleCatalog"/>.
/// </summary>
/// <param name="catalog">Catalog</param>
/// <param name="mode"><see cref="InitializationMode"/></param>
/// <param name="catalog">The catalog to add the module to.</param>
/// <param name="mode">Stage on which the module to be added will be initialized.</param>
/// <typeparam name="T">The <see cref="IModule"/> type parameter.</typeparam>
/// <returns>The same <see cref="IModuleCatalog"/> instance with the added module.</returns>
public static IModuleCatalog AddModule<T>(this IModuleCatalog catalog, InitializationMode mode = InitializationMode.WhenAvailable)
where T : IModule =>
catalog.AddModule<T>(typeof(T).Name, mode);


/// <summary>
/// Adds the module.
/// Adds the module to the <see cref="IModuleCatalog"/>.
/// </summary>
/// <param name="catalog">Catalog</param>
/// <param name="name">Name.</param>
/// <param name="catalog">The catalog to add the module to.</param>
/// <param name="name">Name of the module to be added.</param>
/// <typeparam name="T">The <see cref="IModule"/> type parameter.</typeparam>
/// <returns>The same <see cref="IModuleCatalog"/> instance with the added module.</returns>
public static IModuleCatalog AddModule<T>(this IModuleCatalog catalog, string name)
where T : IModule =>
catalog.AddModule<T>(name, InitializationMode.WhenAvailable);

/// <summary>
/// Adds the module.
/// Adds the module to the <see cref="IModuleCatalog"/>.
/// </summary>
/// <param name="catalog">Catalog.</param>
/// <param name="name">Name.</param>
/// <param name="mode"><see cref="IModule"/>.</param>
/// <param name="catalog">The catalog to add the module to.</param>
/// <param name="name">Name of the module to be added.</param>
/// <param name="mode">Stage on which the module to be added will be initialized.</param>
/// <typeparam name="T">The <see cref="IModule"/> type parameter.</typeparam>
/// <returns>The same <see cref="IModuleCatalog"/> instance with the added module.</returns>
public static IModuleCatalog AddModule<T>(this IModuleCatalog catalog, string name, InitializationMode mode)
Expand All @@ -153,11 +156,11 @@ public static IModuleCatalog AddModule<T>(this IModuleCatalog catalog, string na
/// <summary>
/// Creates and adds a <see cref="ModuleInfoGroup"/> to the catalog.
/// </summary>
/// <param name="catalog">Catalog.</param>
/// <param name="catalog">The catalog to add the module to.</param>
/// <param name="initializationMode">Stage on which the module group to be added will be initialized.</param>
/// <param name="refValue">Reference to the location of the module group to be added.</param>
/// <param name="moduleInfos">Collection of <see cref="ModuleInfo"/> included in the group.</param>
/// <returns>The same <see cref="IModuleCatalog"/> instance with the added module group.</returns>
/// <returns>The same <see cref="IModuleCatalog"/> with the added module group.</returns>
public static IModuleCatalog AddGroup(this IModuleCatalog catalog, InitializationMode initializationMode, string refValue, params ModuleInfo[] moduleInfos)
{
if (!(catalog is IModuleGroupsCatalog groupSupport))
Expand Down

0 comments on commit 41f7cd8

Please sign in to comment.