Repository navigation
Wrap non-seekable stream in XamlToRtfWriter - #995
Conversation
vatsan-madhavan
left a comment
There was a problem hiding this comment.
lgtm.
the previously failing tests pass now, do they?
| @@ -331,35 +328,6 @@ | |||
| <Compile Include="System\Windows\Markup\XmlPartReader.cs" /> | |||
| </ItemGroup> | |||
| <!-- ZIP sources --> | |||
05cd5b6 to
2db4fec
Compare
@vatsan-madhavan, yeah the tests pass. Some of theme are no longer needed (like DrtZipIO) and quite a few failures were also just due to test code needing to be updated. Most of the tests use reflection to discover and invoke methods and that is the biggest reason they've started failing (rather than breaking at compile time). They were either trying to reflect and invoke internal methods that were removed, or the parameters were slightly different (removal of the |
a4aa449 to
f1d14ae
Compare
* removing of zip * fixing XamlToRtfWriter * using PackUriHelper.GetPartUri that's in CoreFx * removing comment
When we started using
System.IO.Packagingthat came in corefx as part of this commit 71c9337d, the behavior of the streams that were returned fromPackagePart.GetStreamare now non-seekable. The behavior change of this issue is described in #585, with links to the corresponding corefx issue that discusses the behavior change. The workaround for the behavior change is to wrap the stream in aMemoryStreamto allow seek-ability.Due to the refactor, the zip implementation inside of
WindowsBaseis no longer needed. I've removed it as part of this change since this should have been removed with the original refactor, but was missed.The
PackUriHelper.GetPartUrimethod was also missing in CoreFx. This was added with dotnet/corefx#38699. I've updated the code to remove more of our custom duplicated logic in favor for what is in corefx. No code that is in our internal branch depends on these APIs, they already use thePackUriHelperAPIs that come fromSystem.IO.Packaging.Fixes #858
Fixes #597