BlazorPathHelper.Core 0.1.0-alpha.12

This is a prerelease version of BlazorPathHelper.Core.
There is a newer version of this package available.
See the version list below for details.
dotnet add package BlazorPathHelper.Core --version 0.1.0-alpha.12
                    
NuGet\Install-Package BlazorPathHelper.Core -Version 0.1.0-alpha.12
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlazorPathHelper.Core" Version="0.1.0-alpha.12" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazorPathHelper.Core" Version="0.1.0-alpha.12" />
                    
Directory.Packages.props
<PackageReference Include="BlazorPathHelper.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlazorPathHelper.Core --version 0.1.0-alpha.12
                    
#r "nuget: BlazorPathHelper.Core, 0.1.0-alpha.12"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlazorPathHelper.Core@0.1.0-alpha.12
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlazorPathHelper.Core&version=0.1.0-alpha.12&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=BlazorPathHelper.Core&version=0.1.0-alpha.12&prerelease
                    
Install as a Cake Tool

Logo

BlazorPathHelper

<div> <a href="https://www.nuget.org/packages/BlazorPathHelper/"> <img alt="NuGet Version" src="https://img.shields.io/nuget/v/BlazorPathHelper?style=for-the-badge"> </a> <img alt="GitHub License" src="https://img.shields.io/github/license/arika0093/BlazorPathHelper?style=for-the-badge">

</div>

GitHub Actions Workflow Status GitHub Actions Workflow Status GitHub last commit (branch)

機能

  • パス定義からURLビルダーを生成
  • パス定義からメニューアイテム一覧を生成
  • シンプルな実装方法でメニューを生成可能
  • メニュー生成部分を自由にカスタマイズ可能・各種フレームワークに対応

使い方例

以下のクラスを作成します。

using BlazorPathHelper;

[BlazorPath]
public partial class WebPaths
{
    [BlazorPathItem("ホーム")]
    public const string Index = "/";
    [BlazorPathItem("サンプル1")]
    public const string Sample = "/sample";
    [BlazorPathItem("サンプル1-a")]
    public const string SampleChild = "/sample/child";
    [BlazorPathItem("サンプル2")]
    public const string Counter = "/counter";
    public const string CounterWithState = "/counter/{count:int}";
}

すると、以下のようなクラス定義が自動で生成されます。

// 元々のクラスに追記されます
public partial class WebPaths
{
    // URLビルドを行う際に便利なヘルパー関数
    public partial class Helper
    {
        public static string Index() => "/";
        public static string Sample() => "/sample";
        public static string SampleChild() => "/sample/child";
        public static string Counter() => "/counter";
        public static string CounterWithState(int count) => string.Format("/counter/{0}", count);
    }
    
    // メニュー項目を動的に作成するのに便利な配列
    public static readonly BlazorMenuItem[] MenuItems = [
        new BlazorPathMenuItem(){
            Name = "ホーム",  // メニュー名。標準では変数名
            Path = "/",      // ページのパス
            Children = []    // 子メニュー
            // その他メニューを生成するのに便利なプロパティを自動生成
        },
        new BlazorPathMenuItem(){
            Name = "サンプル1",
            Path = "/sample", 
            // URLを解析して、よしなに子メニューを生成する
            Children = [
                new BlazorPathMenuItem(){
                    Name = "サンプル1-a",
                    Path = "/sample/child", 
                    Children = []
                }
            ]
        },
        new BlazorPathMenuItem(){
            Name = "サンプル2",
            Path = "/counter",
            // パラメータを持つページはメニューに表示されない
            Children = []
        }
    ];
}

詳細な利用方法は ドキュメント(WIP) を参照してください。

TODO

  • CI/CD設定
  • nuget公開
  • 最小限のドキュメント作成
  • 各種例を追加
    • 最小限の例
    • 多言語化を行った例
    • Blazorテンプレートを使った例
    • FluentUI
    • AntBlazor
    • MudBlazor
    • MASA Blazor
  • ReadMeを整備
    • ドキュメント整備
    • 英語のドキュメント追加
  • ドキュメントサイト追加
  • コード綺麗にする
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on BlazorPathHelper.Core:

Package Downloads
BlazorPathHelper

BlazorPathHelper is a library that assists in managing URL paths within Blazor projects.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.6.0 404 6/24/2025
0.5.1 540 4/15/2025
0.5.0-alpha.29 169 4/15/2025
0.5.0-alpha.11 180 4/15/2025
0.5.0-alpha.8 166 4/13/2025
0.4.2 198 4/11/2025
0.4.1 262 4/10/2025
0.4.0-alpha.14 146 4/10/2025
0.4.0-alpha.13 154 4/9/2025
0.4.0-alpha.11 68 1/19/2025
0.4.0-alpha.7 107 1/4/2025
0.4.0-alpha.5 103 1/3/2025
0.3.4 219 1/3/2025
0.3.2 209 1/3/2025
0.3.1 196 1/3/2025
0.3.0-alpha.40 97 1/3/2025
0.3.0-alpha.37 91 1/3/2025
0.3.0-alpha.36 98 1/3/2025
0.3.0-alpha.31 103 1/3/2025
0.3.0-alpha.19 74 12/30/2024
0.3.0-alpha.17 74 12/29/2024
0.3.0-alpha.16 68 12/28/2024
0.3.0-alpha.15 72 12/28/2024
0.3.0-alpha.14 74 12/27/2024
0.3.0-alpha.13 73 12/27/2024
0.3.0-alpha.12 73 12/27/2024
0.3.0-alpha.11 72 12/26/2024
0.3.0-alpha.10 78 12/20/2024
0.3.0-alpha.8 92 12/16/2024
0.3.0-alpha.5 84 12/15/2024
0.2.11 192 12/29/2024
0.2.10 189 12/28/2024
0.2.8 203 12/16/2024
0.2.2 186 12/15/2024
0.2.0-alpha.24 84 12/15/2024
0.2.0-alpha.23 81 12/15/2024
0.2.0-alpha.21 72 12/15/2024
0.2.0-alpha.17 82 12/14/2024
0.2.0-alpha.14 73 12/14/2024
0.2.0-alpha.13 82 12/14/2024
0.2.0-alpha.11 87 12/12/2024
0.2.0-alpha.10 71 12/12/2024
0.2.0-alpha.7 73 12/11/2024
0.2.0-alpha.6 72 12/11/2024
0.2.0-alpha.5 72 12/11/2024
0.1.1 190 12/1/2024
0.1.0-alpha.17 76 12/1/2024
0.1.0-alpha.16 75 12/1/2024
0.1.0-alpha.13 73 12/1/2024
0.1.0-alpha.12 77 11/30/2024
0.1.0-alpha.8 80 11/30/2024
0.1.0-alpha.7 75 11/29/2024
0.1.0-alpha.6 72 11/29/2024