PostSharp6.3/API Reference/Post­Sharp.​Patterns.​Formatters Namespace/Enum­Formatter(T) Class

EnumFormatter<T> Class

Efficient formatter for enums.
Inheritance Hierarchy
System.Object
  PostSharp.Patterns.Formatters.Formatter<T>
    PostSharp.Patterns.Formatters.EnumFormatter<T>

Namespace:  PostSharp.Patterns.Formatters
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.3.11.0 (6.3.11.0)
Syntax
C#
public sealed class EnumFormatter<T> : Formatter<T>

Type Parameters

T

The EnumFormatter<T> type exposes the following members.

Constructors
  NameDescription
Public methodEnumFormatter<T>
Initializes a new instance of the EnumFormatter<T> class
Properties
  NameDescription
Public propertyAttributes
Gets the formatter attributes.
(Inherited from Formatter<T>.)
Methods
  NameDescription
Public methodStatic memberGetString
Returns the string value of the given enum value.
Public methodWrite(UnsafeStringBuilder, T)
Appends the description of an object into given UnsafeStringBuilder (weakly-typed variant).
(Overrides Formatter<T>.Write(UnsafeStringBuilder, Object).)
Public methodWrite(UnsafeStringBuilder, Object)
Appends the description of an object into given UnsafeStringBuilder (weakly-typed variant).
(Inherited from Formatter<T>.)
Fields
  NameDescription
Public fieldStatic memberInstance
The singleton instance of EnumFormatter<T>.
See Also