@@ -1894,68 +1894,68 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
18941894 }
18951895#if ! NET8_0_OR_GREATER
18961896 else if ( typeof ( T ) == typeof ( byte ) )
1897- {
1897+ {
18981898 AppendFormatted ( Unsafe . As < T , byte > ( ref value ) , alignment , format ) ;
1899- }
1899+ }
19001900 else if ( typeof ( T ) == typeof ( Decimal) )
1901- {
1901+ {
19021902 AppendFormatted ( Unsafe . As < T , Decimal > ( ref value ) , alignment , format ) ;
1903- }
1903+ }
19041904 else if ( typeof ( T ) == typeof ( Double) )
1905- {
1905+ {
19061906 AppendFormatted ( Unsafe . As < T , Double > ( ref value ) , alignment , format ) ;
1907- }
1907+ }
19081908 else if ( typeof ( T ) == typeof ( Guid) )
1909- {
1909+ {
19101910 AppendFormatted ( Unsafe . As < T , Guid > ( ref value ) , alignment , format ) ;
1911- }
1911+ }
19121912 else if ( typeof ( T ) == typeof ( Int16) )
1913- {
1913+ {
19141914 AppendFormatted ( Unsafe . As < T , Int16 > ( ref value ) , alignment , format ) ;
1915- }
1915+ }
19161916 else if ( typeof ( T ) == typeof ( Int32) )
1917- {
1917+ {
19181918 AppendFormatted ( Unsafe . As < T , Int32 > ( ref value ) , alignment , format ) ;
1919- }
1919+ }
19201920 else if ( typeof ( T ) == typeof ( Int64) )
1921- {
1921+ {
19221922 AppendFormatted ( Unsafe . As < T , Int64 > ( ref value ) , alignment , format ) ;
1923- }
1923+ }
19241924 else if ( typeof ( T ) == typeof ( SByte) )
1925- {
1925+ {
19261926 AppendFormatted ( Unsafe . As < T , SByte > ( ref value ) , alignment , format ) ;
1927- }
1927+ }
19281928 else if ( typeof ( T ) == typeof ( Single) )
1929- {
1929+ {
19301930 AppendFormatted ( Unsafe . As < T , Single > ( ref value ) , alignment , format ) ;
1931- }
1931+ }
19321932 else if ( typeof ( T ) == typeof ( UInt16) )
1933- {
1933+ {
19341934 AppendFormatted ( Unsafe . As < T , UInt16 > ( ref value ) , alignment , format ) ;
1935- }
1935+ }
19361936 else if ( typeof ( T ) == typeof ( UInt32) )
1937- {
1937+ {
19381938 AppendFormatted ( Unsafe . As < T , UInt32 > ( ref value ) , alignment , format ) ;
1939- }
1939+ }
19401940 else if ( typeof ( T ) == typeof ( UInt64) )
1941- {
1941+ {
19421942 AppendFormatted ( Unsafe . As < T , UInt64 > ( ref value ) , alignment , format ) ;
1943- }
1943+ }
19441944 else if ( typeof ( T ) == typeof ( DateTime) )
1945- {
1945+ {
19461946 AppendFormatted ( Unsafe . As < T , DateTime > ( ref value ) , alignment , format ) ;
1947- }
1947+ }
19481948 else if ( typeof ( T ) == typeof ( DateTimeOffset ) )
1949- {
1949+ {
19501950 AppendFormatted ( Unsafe . As < T , DateTimeOffset > ( ref value ) , alignment , format ) ;
1951- }
1951+ }
19521952 else if ( typeof ( T ) == typeof ( TimeSpan) )
1953- {
1953+ {
19541954 AppendFormatted ( Unsafe . As < T , TimeSpan > ( ref value ) , alignment , format ) ;
1955- }
1955+ }
19561956#else
19571957 else if ( typeof ( T ) == typeof ( bool ) )
1958- {
1958+ {
19591959 if ( alignment == 0 && format == null )
19601960 {
19611961 AppendFormatted ( Unsafe . As < T , bool > ( ref value ) ) ;
@@ -1964,9 +1964,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
19641964 {
19651965 AppendFormattedCore ( value , alignment , format ) ;
19661966 }
1967- }
1967+ }
19681968 else if ( typeof ( T ) == typeof ( byte ) )
1969- {
1969+ {
19701970 if ( alignment == 0 && format == null )
19711971 {
19721972 AppendFormatted ( Unsafe . As < T , byte > ( ref value ) ) ;
@@ -1975,9 +1975,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
19751975 {
19761976 AppendFormattedCore ( value , alignment , format ) ;
19771977 }
1978- }
1978+ }
19791979 else if ( typeof ( T ) == typeof ( Decimal) )
1980- {
1980+ {
19811981 if ( alignment == 0 && format == null )
19821982 {
19831983 AppendFormatted ( Unsafe . As < T , Decimal > ( ref value ) ) ;
@@ -1986,9 +1986,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
19861986 {
19871987 AppendFormattedCore ( value , alignment , format ) ;
19881988 }
1989- }
1989+ }
19901990 else if ( typeof ( T ) == typeof ( Double) )
1991- {
1991+ {
19921992 if ( alignment == 0 && format == null )
19931993 {
19941994 AppendFormatted ( Unsafe . As < T , Double > ( ref value ) ) ;
@@ -1997,9 +1997,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
19971997 {
19981998 AppendFormattedCore ( value , alignment , format ) ;
19991999 }
2000- }
2000+ }
20012001 else if ( typeof ( T ) == typeof ( Guid) )
2002- {
2002+ {
20032003 if ( alignment == 0 && format == null )
20042004 {
20052005 AppendFormatted ( Unsafe . As < T , Guid > ( ref value ) ) ;
@@ -2008,9 +2008,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
20082008 {
20092009 AppendFormattedCore ( value , alignment , format ) ;
20102010 }
2011- }
2011+ }
20122012 else if ( typeof ( T ) == typeof ( Int16) )
2013- {
2013+ {
20142014 if ( alignment == 0 && format == null )
20152015 {
20162016 AppendFormatted ( Unsafe . As < T , Int16 > ( ref value ) ) ;
@@ -2019,9 +2019,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
20192019 {
20202020 AppendFormattedCore ( value , alignment , format ) ;
20212021 }
2022- }
2022+ }
20232023 else if ( typeof ( T ) == typeof ( Int32) )
2024- {
2024+ {
20252025 if ( alignment == 0 && format == null )
20262026 {
20272027 AppendFormatted ( Unsafe . As < T , Int32 > ( ref value ) ) ;
@@ -2030,9 +2030,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
20302030 {
20312031 AppendFormattedCore ( value , alignment , format ) ;
20322032 }
2033- }
2033+ }
20342034 else if ( typeof ( T ) == typeof ( Int64) )
2035- {
2035+ {
20362036 if ( alignment == 0 && format == null )
20372037 {
20382038 AppendFormatted ( Unsafe . As < T , Int64 > ( ref value ) ) ;
@@ -2041,9 +2041,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
20412041 {
20422042 AppendFormattedCore ( value , alignment , format ) ;
20432043 }
2044- }
2044+ }
20452045 else if ( typeof ( T ) == typeof ( SByte) )
2046- {
2046+ {
20472047 if ( alignment == 0 && format == null )
20482048 {
20492049 AppendFormatted ( Unsafe . As < T , SByte > ( ref value ) ) ;
@@ -2052,9 +2052,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
20522052 {
20532053 AppendFormattedCore ( value , alignment , format ) ;
20542054 }
2055- }
2055+ }
20562056 else if ( typeof ( T ) == typeof ( Single) )
2057- {
2057+ {
20582058 if ( alignment == 0 && format == null )
20592059 {
20602060 AppendFormatted ( Unsafe . As < T , Single > ( ref value ) ) ;
@@ -2063,9 +2063,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
20632063 {
20642064 AppendFormattedCore ( value , alignment , format ) ;
20652065 }
2066- }
2066+ }
20672067 else if ( typeof ( T ) == typeof ( UInt16) )
2068- {
2068+ {
20692069 if ( alignment == 0 && format == null )
20702070 {
20712071 AppendFormatted ( Unsafe . As < T , UInt16 > ( ref value ) ) ;
@@ -2074,9 +2074,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
20742074 {
20752075 AppendFormattedCore ( value , alignment , format ) ;
20762076 }
2077- }
2077+ }
20782078 else if ( typeof ( T ) == typeof ( UInt32) )
2079- {
2079+ {
20802080 if ( alignment == 0 && format == null )
20812081 {
20822082 AppendFormatted ( Unsafe . As < T , UInt32 > ( ref value ) ) ;
@@ -2085,9 +2085,9 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
20852085 {
20862086 AppendFormattedCore ( value , alignment , format ) ;
20872087 }
2088- }
2088+ }
20892089 else if ( typeof ( T ) == typeof ( UInt64) )
2090- {
2090+ {
20912091 if ( alignment == 0 && format == null )
20922092 {
20932093 AppendFormatted ( Unsafe . As < T , UInt64 > ( ref value ) ) ;
@@ -2096,11 +2096,11 @@ public void AppendFormatted<T>(T value, int alignment = 0, string? format = null
20962096 {
20972097 AppendFormattedCore ( value , alignment , format ) ;
20982098 }
2099- }
2099+ }
21002100#endif
21012101 else
21022102 {
21032103 AppendFormattedCore < T > ( value , alignment , format ) ;
21042104 }
21052105 }
2106- }
2106+ }
0 commit comments