< Summary

Information
Class: MyNet.Text.Slugification.Slugifier
Assembly: MyNet.Text
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Text/Slugification/Slugifier.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 34
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%11100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Text/Slugification/Slugifier.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="Slugifier.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7namespace MyNet.Text.Slugification;
 8
 9/// <summary>
 10/// Provides common slugifier transforms.
 11/// </summary>
 12public static class Slugifier
 13{
 14    /// <summary>
 15    /// Gets the default slugifier transform.
 16    /// </summary>
 317    public static ITextSlugifierTransform Default { get; } = new SlugifyTransform(new());
 18
 19    /// <summary>
 20    /// Gets a kebab-case slugifier (lowercase, '-' separator).
 21    /// </summary>
 322    public static ITextSlugifierTransform KebabCase { get; } = Default;
 23
 24    /// <summary>
 25    /// Gets a snake_case slugifier (lowercase, '_' separator).
 26    /// </summary>
 327    public static ITextSlugifierTransform SnakeCase { get; } = new SlugifyTransform(new() { Separator = '_' });
 28
 29    /// <summary>
 30    /// Gets a slugifier preserving original case.
 31    /// </summary>
 332    public static ITextSlugifierTransform PreserveCase { get; } = new SlugifyTransform(new() { Lowercase = false });
 33}
 34

Methods/Properties

.cctor()