public override void LoadFromStreamExt(Stream fileStream, Stream inputStream, bool charsetDetection = false) { #if !NETSTANDARD using (Package package = Package.Open(inputStream, FileMode.Open, FileAccess.Read)) { PackagePart documentPart = package.GetPart(new Uri("/" + OPCContentFileName, UriKind.Relative)); using (MemoryStream memStream = new MemoryStream()) { OPCUtility.CopyStream(documentPart.GetStream(), memStream); memStream.Position = 0; LoadFromReader(memStream, null, null); } } #endif }
public override void LoadFromStreamExt(Stream fileStream, Stream inputStream, bool charsetDetection = false) { #if !NETSTANDARD using (Package package = Package.Open(inputStream, FileMode.Open, FileAccess.Read)) { PackagePart documentPart = package.GetPart(new Uri("/" + OPCContentFileName, UriKind.Relative)); using (MemoryStream memStream = new MemoryStream()) { OPCUtility.CopyStream(documentPart.GetStream(), memStream); memStream.Position = 0; XmlReaderSettings settings = new XmlReaderSettings(); settings.DtdProcessing = DtdProcessing.Ignore; using (XmlReader xr = XmlReader.Create(memStream, settings)) { } } } #endif }