@@ -133,6 +133,15 @@ public static void PatchFirstEntrySize(Stream stream, int newSize)
133133 stream . Write ( sizeBytes , 0 , 4 ) ;
134134 }
135135 }
136+
137+ public static void FillArray ( byte [ ] buffer , byte value )
138+ {
139+ #if NET6_0_OR_GREATER
140+ Array . Fill ( buffer , value ) ;
141+ #else
142+ for ( var i = 0 ; i < buffer . Length ; i ++ ) buffer [ i ] = value ;
143+ #endif
144+ }
136145 }
137146
138147 public class TestTraceListener : TraceListener
@@ -185,7 +194,7 @@ internal TempFile(string dirPath = null, string filename = null)
185194 _fileInfo = new FileInfo ( Path . Combine ( dirPath , filename ) ) ;
186195 }
187196
188- #region IDisposable Support
197+ #region IDisposable Support
189198
190199 private bool _disposed ; // To detect redundant calls
191200
@@ -213,7 +222,7 @@ public void Dispose()
213222 GC . SuppressFinalize ( this ) ;
214223 }
215224
216- #endregion IDisposable Support
225+ #endregion IDisposable Support
217226 }
218227
219228
@@ -245,7 +254,7 @@ public TempFile CreateDummyFile(string name, int size = 16, int seed = Utils.Def
245254
246255 public TempFile GetFile ( string fileName ) => new TempFile ( FullPath , fileName ) ;
247256
248- #region IDisposable Support
257+ #region IDisposable Support
249258
250259 private bool _disposed ; // To detect redundant calls
251260
@@ -272,6 +281,6 @@ public void Dispose()
272281 GC . SuppressFinalize ( this ) ;
273282 }
274283
275- #endregion IDisposable Support
284+ #endregion IDisposable Support
276285 }
277286}
0 commit comments