Skip to content

Commit 2f61ed7

Browse files
linkdotnetegil
authored andcommitted
remove unused code
1 parent f49fa26 commit 2f61ed7

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/bunit.web/Extensions/StubComponentFactoryCollectionExtensions.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -161,28 +161,5 @@ public static ComponentFactoryCollection AddStub(
161161
factories.Add(new StubComponentFactory(componentTypePredicate, replacementFragment));
162162
return factories;
163163
}
164-
165-
#if NET8_0_OR_GREATER
166-
/// <summary>
167-
/// 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.
168-
/// </summary>
169-
/// <typeparam name="TComponent">The type of component to generate a stub for.</typeparam>
170-
/// <remarks>
171-
/// When <c>ComponentFactories.AddGeneratedStub&lt;MyButton&gt;()</c> is called, a stub component is generated for the component
172-
/// with the name <c>MyButtonStub</c>. The stub component is added to the <see cref="ComponentFactoryCollection"/> and can be used.
173-
/// It can also be retrieved via `cut.FindComponent&lt;MyButtonStub&gt;()`.
174-
/// This call does the same as <c>ComponentFactories.Add&lt;MyButton, MyButtonStub&gt;()</c>.
175-
/// </remarks>
176-
#pragma warning disable S2326 // Unused type parameters should be removed - this is just the shape for the interceptor
177-
public static ComponentFactoryCollection AddGeneratedStub2<TComponent>(this ComponentFactoryCollection factories)
178-
where TComponent : IComponent
179-
#pragma warning restore S2326
180-
{
181-
if (factories is null)
182-
throw new ArgumentNullException(nameof(factories));
183-
184-
return factories;
185-
}
186-
#endif
187164
}
188165
#endif

0 commit comments

Comments
 (0)