@@ -16,7 +16,7 @@ public static T Read<T>(string hexBuffer, CborOptions options = null)
1616 {
1717 options = options ?? CborOptions . Default ;
1818 Span < byte > buffer = hexBuffer . HexToBytes ( ) ;
19- CborReader reader = new CborReader ( buffer , options ) ;
19+ CborReader reader = new CborReader ( buffer ) ;
2020 ICborConverter < T > converter = options . Registry . ConverterRegistry . Lookup < T > ( ) ;
2121 return converter . Read ( ref reader ) ;
2222 }
@@ -78,7 +78,7 @@ public static string Write<T>(T value, CborOptions options = null)
7878
7979 using ( ByteBufferWriter bufferWriter = new ByteBufferWriter ( ) )
8080 {
81- CborWriter writer = new CborWriter ( bufferWriter , options ) ;
81+ CborWriter writer = new CborWriter ( bufferWriter ) ;
8282 ICborConverter < T > converter = options . Registry . ConverterRegistry . Lookup < T > ( ) ;
8383 converter . Write ( ref writer , value ) ;
8484 return BitConverter . ToString ( bufferWriter . WrittenSpan . ToArray ( ) ) . Replace ( "-" , "" ) ;
@@ -134,7 +134,7 @@ public static void TestWrite<T>(T value, Type expectedExceptionType = null, Cbor
134134 public static T Read < T > ( string methodName , string hexBuffer )
135135 {
136136 Span < byte > buffer = hexBuffer . HexToBytes ( ) ;
137- CborReader reader = new CborReader ( buffer , null ) ;
137+ CborReader reader = new CborReader ( buffer ) ;
138138 MethodInfo method = typeof ( CborReader ) . GetMethod ( methodName , new Type [ 0 ] { } ) ;
139139 return CreateMethodFunctor < CborReaderFunctor < T > > ( method ) ( reader ) ;
140140 }
@@ -168,24 +168,24 @@ public static void TestRead<T>(string methodName, string hexBuffer, T expectedVa
168168
169169 delegate void CborWriterFunctor < T > ( CborWriter writer , T value ) ;
170170
171- public static string Write < T > ( string methodName , T value , CborOptions options = null )
171+ public static string Write < T > ( string methodName , T value )
172172 {
173173 using ( ByteBufferWriter bufferWriter = new ByteBufferWriter ( ) )
174174 {
175- CborWriter writer = new CborWriter ( bufferWriter , options ) ;
175+ CborWriter writer = new CborWriter ( bufferWriter ) ;
176176 MethodInfo method = typeof ( CborWriter ) . GetMethod ( methodName , new [ ] { typeof ( T ) } ) ;
177177 CreateMethodFunctor < CborWriterFunctor < T > > ( method ) ( writer , value ) ;
178178 return BitConverter . ToString ( bufferWriter . WrittenSpan . ToArray ( ) ) . Replace ( "-" , "" ) ;
179179 }
180180 }
181181
182- public static void TestWrite < T > ( string methodName , T value , string hexBuffer , Type expectedExceptionType = null , CborOptions options = null )
182+ public static void TestWrite < T > ( string methodName , T value , string hexBuffer , Type expectedExceptionType = null )
183183 {
184184 if ( expectedExceptionType != null )
185185 {
186186 try
187187 {
188- Write ( methodName , value , options ) ;
188+ Write ( methodName , value ) ;
189189 }
190190 catch ( Exception ex )
191191 {
@@ -194,7 +194,7 @@ public static void TestWrite<T>(string methodName, T value, string hexBuffer, Ty
194194 }
195195 else
196196 {
197- Assert . Equal ( hexBuffer , Write ( methodName , value , options ) ) ;
197+ Assert . Equal ( hexBuffer , Write ( methodName , value ) ) ;
198198 }
199199 }
200200
0 commit comments