Class LightningFormatter
- Namespace
- NLightning.Common.Formatters
- Assembly
- NLightning.Bolt11.dll
public class LightningFormatter : IFormatProvider, ICustomFormatter
- Inheritance
-
LightningFormatter
- Implements
- Inherited Members
Fields
FORMATTER
public static readonly LightningFormatter FORMATTER
Field Value
Methods
Format(string?, object?, IFormatProvider?)
Converts the value of a specified object to an equivalent string representation using specified format and culture-specific formatting information.
public string Format(string? format, object? arg, IFormatProvider? formatProvider)
Parameters
format
stringA format string containing formatting specifications.
arg
objectAn object to format.
formatProvider
IFormatProviderAn object that supplies format information about the current instance.
Returns
- string
The string representation of the value of
arg
, formatted as specified byformat
andformatProvider
.
GetFormat(Type?)
Returns an object that provides formatting services for the specified type.
public object? GetFormat(Type? formatType)
Parameters
formatType
TypeAn object that specifies the type of format object to return.
Returns
- object
An instance of the object specified by
formatType
, if the IFormatProvider implementation can supply that type of object; otherwise, null.