mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-09 17:44:48 +09:00
Make System.IO.Packaging test trim safe (#105160)
The existing pattern doesn't get statically analyzed.
This commit is contained in:
parent
9477e94959
commit
0378936909
1 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
@ -17,8 +18,9 @@ namespace System.IO.Packaging.Tests
|
|||
private record class PartConstructionParameters (string FullPath, bool CreateAsAtomic, bool CreateAsValidPieceSequence, bool UppercaseFileName, bool ShufflePieces, int[] PieceLengths, FileContentsGenerator PieceGenerator)
|
||||
{ }
|
||||
|
||||
private static Type s_ZipPackagePartPieceType = typeof(ZipPackage).Assembly.GetType("System.IO.Packaging.ZipPackagePartPiece");
|
||||
private static MethodInfo s_TryParseZipPackagePartPiece = s_ZipPackagePartPieceType.GetMethod("TryParse", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)]
|
||||
private static Type s_ZipPackagePartPieceType = Type.GetType("System.IO.Packaging.ZipPackagePartPiece, System.IO.Packaging");
|
||||
private static MethodInfo s_TryParseZipPackagePartPiece = Type.GetType("System.IO.Packaging.ZipPackagePartPiece, System.IO.Packaging").GetMethod("TryParse", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
|
||||
private string m_contentTypesXml = @"<?xml version=""1.0"" encoding=""utf-8""?>
|
||||
<Types xmlns=""http://schemas.openxmlformats.org/package/2006/content-types"">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue