Skip to content

Commit 6c7e3e8

Browse files
committed
moved more to core
1 parent 240ea47 commit 6c7e3e8

4 files changed

Lines changed: 23 additions & 61 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using Microsoft.AspNetCore.Components;
3+
4+
namespace Bunit
5+
{
6+
/// <summary>
7+
/// Extensions for Blazor types.
8+
/// </summary>
9+
public static class BlazorExtensions
10+
{
11+
/// <summary>
12+
/// Creates a <see cref="RenderFragment"/> that will render the <paramref name="markup"/>.
13+
/// </summary>
14+
/// <param name="markup">Markup to render</param>
15+
/// <returns>The <see cref="RenderFragment"/>.</returns>
16+
public static RenderFragment ToMarkupRenderFragment(this string markup)
17+
{
18+
return builder => builder.AddMarkupContent(0, markup);
19+
}
20+
}
21+
}

src/bunit.web/Extensions/Internal/ComponentParamenterExtensions.cs renamed to src/bunit.core/Extensions/ComponentParamenterExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using Bunit.Rendering;
@@ -9,7 +9,7 @@ namespace Bunit
99
/// <summary>
1010
/// Helpful extensions for working with <see cref="ComponentParameter"/> and collections of these.
1111
/// </summary>
12-
internal static class ComponentParamenterExtensions
12+
public static class ComponentParamenterExtensions
1313
{
1414
/// <summary>
1515
/// Creates a <see cref="RenderFragment"/> that will render a component of <typeparamref name="TComponent"/> type,

src/bunit.core/bunit.core.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,4 @@
1717
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.*" PrivateAssets="All" />
1818
</ItemGroup>
1919

20-
21-
<ItemGroup>
22-
<Folder Include="Extensions\" />
23-
</ItemGroup>
24-
2520
</Project>

src/bunit.web/Extensions/Internal/BlazorExtensions.cs

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)