You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Initialize a new instance of the <see cref="IndentationSettings"/> class.
7
14
/// </summary>
8
-
publicclassIndentationSettings
15
+
/// <param name="indentation">The <see cref="Log4Net.Indentation"/> character to use for indenting XML elements.</param>
16
+
/// <param name="size">The number of times the <see cref="Indentation"/> character is repeated.</param>
17
+
/// <exception cref="ArgumentOutOfRangeException">If the <paramref name="size"/> is zero or if the <paramref name="indentation"/> is an invalid value for the enum type <see cref="Indentation"/>.</exception>
/// Initialize a new instance of the <see cref="IndentationSettings"/> class.
14
-
/// </summary>
15
-
/// <param name="indentation">The <see cref="Log4Net.Indentation"/> character to use for indenting XML elements.</param>
16
-
/// <param name="size">The number of times the <see cref="Indentation"/> character is repeated.</param>
17
-
/// <exception cref="ArgumentOutOfRangeException">If the <paramref name="size"/> is zero or if the <paramref name="indentation"/> is an invalid value for the enum type <see cref="Indentation"/>.</exception>
thrownewArgumentOutOfRangeException(nameof(size),size,$"The value of argument '{nameof(size)}' must be greater than 0.");
23
-
}
24
-
_indentationString=indentationswitch
25
-
{
26
-
Indentation.Space=>newstring(c:' ',size),
27
-
Indentation.Tab=>newstring(c:'\t',size),
28
-
_ =>thrownewArgumentOutOfRangeException(nameof(indentation),indentation,$"The value of argument '{nameof(indentation)}' ({indentation}) is invalid for enum type '{nameof(Indentation)}'.")
29
-
};
22
+
thrownewArgumentOutOfRangeException(nameof(size),size,$"The value of argument '{nameof(size)}' must be greater than 0.");
30
23
}
31
-
32
-
/// <summary>
33
-
/// Returns a string representation of the indentation settings.
_ =>thrownewArgumentOutOfRangeException(nameof(indentation),indentation,$"The value of argument '{nameof(indentation)}' ({indentation}) is invalid for enum type '{nameof(Indentation)}'.")
29
+
};
36
30
}
31
+
32
+
/// <summary>
33
+
/// Returns a string representation of the indentation settings.
/// <para>Both <see cref="CarriageReturn"/> and <see cref="LineFeed"/> can be combined, i.e. <c>LineEnding.CarriageReturn | LineEnding.LineFeed</c> in order to produce the CR+LF characters.</para>
8
+
/// <para>See also [End-of-Line Handling](https://www.w3.org/TR/xml/#sec-line-ends) in the XML specification.</para>
9
+
/// </summary>
10
+
[Flags]
11
+
publicenumLineEnding
4
12
{
5
13
/// <summary>
6
-
/// Possible XML line endings.
7
-
/// <para>Both <see cref="CarriageReturn"/> and <see cref="LineFeed"/> can be combined, i.e. <c>LineEnding.CarriageReturn | LineEnding.LineFeed</c> in order to produce the CR+LF characters.</para>
8
-
/// <para>See also [End-of-Line Handling](https://www.w3.org/TR/xml/#sec-line-ends) in the XML specification.</para>
14
+
/// No line ending.
9
15
/// </summary>
10
-
[Flags]
11
-
publicenumLineEnding
12
-
{
13
-
/// <summary>
14
-
/// No line ending.
15
-
/// </summary>
16
-
None=0,
17
-
/// <summary>
18
-
/// End lines with the line feed (LF) character, i.e. unicode U+000A.
19
-
/// </summary>
20
-
LineFeed=1,
21
-
/// <summary>
22
-
/// End lines with the carriage return (CR) character, i.e. unicode U+000D.
23
-
/// </summary>
24
-
CarriageReturn=2,
25
-
}
16
+
None=0,
17
+
/// <summary>
18
+
/// End lines with the line feed (LF) character, i.e. unicode U+000A.
19
+
/// </summary>
20
+
LineFeed=1,
21
+
/// <summary>
22
+
/// End lines with the carriage return (CR) character, i.e. unicode U+000D.
23
+
/// </summary>
24
+
CarriageReturn=2,
25
+
}
26
26
27
+
/// <summary>
28
+
/// Extensions to the <see cref="LineEnding"/> enum type.
29
+
/// </summary>
30
+
internalstaticclassLineEndingExtensions
31
+
{
27
32
/// <summary>
28
-
/// Extensions to the <see cref="LineEnding"/> enum type.
33
+
/// Returns a string representation of the specified <paramref name="lineEnding"/>.
29
34
/// </summary>
30
-
internalstaticclassLineEndingExtensions
35
+
/// <param name="lineEnding">The <see cref="LineEnding"/> to convert to a string.</param>
36
+
/// <returns>A string representation of the <see cref="LineEnding"/>.</returns>
_ =>thrownewArgumentOutOfRangeException(nameof(lineEnding),lineEnding,$"The value of argument '{nameof(lineEnding)}' ({lineEnding}) is invalid for enum type '{nameof(LineEnding)}'.")
_ =>thrownewArgumentOutOfRangeException(nameof(lineEnding),lineEnding,$"The value of argument '{nameof(lineEnding)}' ({lineEnding}) is invalid for enum type '{nameof(LineEnding)}'.")
0 commit comments