Hand.Naming 0.3.1-alpha

This is a prerelease version of Hand.Naming.
dotnet add package Hand.Naming --version 0.3.1-alpha
                    
NuGet\Install-Package Hand.Naming -Version 0.3.1-alpha
                    
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="Hand.Naming" Version="0.3.1-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hand.Naming" Version="0.3.1-alpha" />
                    
Directory.Packages.props
<PackageReference Include="Hand.Naming" />
                    
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 Hand.Naming --version 0.3.1-alpha
                    
#r "nuget: Hand.Naming, 0.3.1-alpha"
                    
#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 Hand.Naming@0.3.1-alpha
                    
#: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=Hand.Naming&version=0.3.1-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Hand.Naming&version=0.3.1-alpha&prerelease
                    
Install as a Cake Tool

命名规则

一、 单词命名规则

1. IWordRule接口

  • 首字母处理规则
interface IWordRule
{
    /// <summary>
    /// 首字母处理
    /// </summary>
    void CheckFirst(StringBuilder builder, char first, int depth);
}

2. PascalWordRule类

  • 帕斯卡命名规则(每个单词首字母大写)
class PascalWordRule : IWordRule
{
    /// <summary>
    /// 首字母大写
    /// </summary>
    public static string FistToUpper(string original, int startIndex = 0);
}

3. CamelWordRule类

  • 小驼峰(首字母小写‌‌)
class CamelWordRule : IWordRule
{
    /// <summary>
    /// 首字母小写
    /// </summary>
    public static string FistToLower(string original, int startIndex = 0);
}

4. LowerWordRule类

  • 全小写
class UnderWordRule : IWordRule;

5. UnderWordRule类

  • 下划线开头
class UnderWordRule : IWordRule
{
    /// <summary>
    /// 下划线开头
    /// </summary>
    public static string Under(string original, int startIndex = 0);
        /// <summary>
    /// 下换线次字母小写
    /// </summary>
    public static string UnderLower(string original, int startIndex = 0);
}

二、 命名转化规则

1. IPathRule接口

  • 路径拆分规则
interface IPathRule
{
    /// <summary>
    /// 拆分
    /// </summary>
    IEnumerable<string> Split‌(string fullPath, int startIndex = 0);
}

2. INameConverter接口

  • 命名转化接口
interface INameConverter
{
    /// <summary>
    /// 转化
    /// </summary>
    string Convert(string name, int startIndex = 0);
}

3. DefaultPathConverter类

  • 默认路径转化
  • 按separators分割
  • 按destRule规则逐个处理单词
/// <summary>
/// 默认路径转化
/// </summary>
class DefaultPathConverter(IEnumerable<char> separators, IWordRule destRule)
    : INameConverter, IPathRule;

4. PascalPathConverter类

  • 帕斯卡路径转化
  • 按大写字母分割
  • 按destRule规则逐个处理单词
/// <summary>
/// 帕斯卡路径转化
/// </summary>
class PascalPathConverter(IWordRule destRule)
    : INameConverter, IPathRule;
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 is compatible.  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 is compatible.  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 is compatible.  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 is compatible.  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 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 was computed.  net472 was computed.  net48 is compatible.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.1-alpha 38 4/18/2026
0.3.0.2-alpha 53 4/15/2026
0.3.0.1-alpha 52 4/2/2026
0.3.0-alpha 46 4/1/2026