Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdotnet committed Nov 26, 2023
1 parent 5a6697e commit dbe947e
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,18 @@ public static ComponentFactoryCollection AddStub(

#if NET8_0_OR_GREATER
/// <summary>
/// TODO.
/// Marks a component as a stub component so that a stub gets generated for it. The stub has the same name as the component, but with the suffix "Stub" added.
/// </summary>
/// <typeparam name="TComponent">The type of component to generate a stub for.</typeparam>
/// <remarks>
/// When <c>ComponentFactories.AddGeneratedStub&lt;MyButton&gt;()</c> is called, a stub component is generated for the component
/// with the name <c>MyButtonStub</c>. The stub component is added to the <see cref="ComponentFactoryCollection"/> and can be used.
/// It can also be retrieved via `cut.FindComponent&lt;MyButtonStub&gt;()`.
/// This call does the same as <c>ComponentFactories.Add&lt;MyButton, MyButtonStub&gt;()</c>.
/// </remarks>
#pragma warning disable S2326
public static ComponentFactoryCollection AddGeneratedStub<TComponent>(this ComponentFactoryCollection factories) where TComponent : IComponent
public static ComponentFactoryCollection AddGeneratedStub<TComponent>(this ComponentFactoryCollection factories)
where TComponent : IComponent
#pragma warning restore S2326
{
if (factories is null)
Expand Down

0 comments on commit dbe947e

Please sign in to comment.