API Reference
Class
OfficeContentSafetyInputGuard
Applies encoded and package-expansion limits before format parsers allocate decoded content.
Inheritance
- Object
- OfficeContentSafetyInputGuard
Methods
ReadAllBytes 2 overloads
public static Byte[] ReadAllBytes(String filePath, OfficeContentSafetyOptions options, Boolean inspectZipPackage = false) #Returns:
Byte[]Reads a file only after validating its encoded length and, when applicable, ZIP package metadata.
Parameters
- filePath System.String
- options OfficeIMO.ContentSafety.OfficeContentSafetyOptions
- inspectZipPackage System.Boolean = false
public static Byte[] ReadAllBytes(String filePath, OfficeContentSafetyOptions options, Boolean inspectZipPackage, CancellationToken cancellationToken) #Returns:
Byte[]Reads a file only after validating its encoded length and, when applicable, ZIP package metadata, while observing cancellation between bounded input chunks.
Parameters
- filePath System.String
- options OfficeIMO.ContentSafety.OfficeContentSafetyOptions
- inspectZipPackage System.Boolean
- cancellationToken System.Threading.CancellationToken
public static String ReadUtf8Text(String filePath, OfficeContentSafetyOptions options) #Returns:
StringReads a BOM-aware UTF-8 text file through the encoded-input guard.
Parameters
- filePath System.String
- options OfficeIMO.ContentSafety.OfficeContentSafetyOptions
public static Void ValidateBytes(Byte[] input, OfficeContentSafetyOptions options, Boolean inspectZipPackage = false) #Returns:
VoidValidates already-buffered input before a parser or package loader is invoked.
Parameters
- input System.Byte[]
- options OfficeIMO.ContentSafety.OfficeContentSafetyOptions
- inspectZipPackage System.Boolean = false
public static Void ValidateText(String text, OfficeContentSafetyOptions options) #Returns:
VoidValidates an in-memory text input before HTML or other text parsers are invoked.
Parameters
- text System.String
- options OfficeIMO.ContentSafety.OfficeContentSafetyOptions
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object