< Summary

Information
Class: MyNet.Humanizer.Formatting.Collections.ListFormattingOptions
Assembly: MyNet.Humanizer
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Humanizer/Formatting/Collections/ListFormattingOptions.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 44
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.Humanizer/Formatting/Collections/ListFormattingOptions.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="ListFormattingOptions.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7namespace MyNet.Humanizer.Formatting.Collections;
 8
 9/// <summary>
 10/// Options for list formatting.
 11/// </summary>
 12public sealed class ListFormattingOptions
 13{
 14    /// <summary>
 15    /// Gets the default list formatting options.
 16    /// </summary>
 317    public static ListFormattingOptions Default { get; } = new();
 18
 19    /// <summary>
 20    /// Gets the separator to use between items in the list. The default is an empty string, which means that items will
 21    /// </summary>
 22    public string Separator { get; init; } = ", ";
 23
 24    /// <summary>
 25    /// Gets a value indicating whether to use the Oxford comma.
 26    /// </summary>
 27    public bool UseOxfordComma { get; init; }
 28
 29    /// <summary>
 30    /// Gets a value indicating whether to trim items in the list. If true, leading and trailing whitespace will be remo
 31    /// </summary>
 32    public bool TrimItems { get; init; } = true;
 33
 34    /// <summary>
 35    /// Gets a value indicating whether to ignore null or whitespace items in the list. If true, any items that are null
 36    /// </summary>
 37    public bool IgnoreNullOrWhiteSpace { get; init; } = true;
 38
 39    /// <summary>
 40    /// Gets the conjunction to use when formatting the list.
 41    /// </summary>
 42    public ListConjunction Conjunction { get; init; } = ListConjunction.And;
 43}
 44

Methods/Properties

.cctor()