dotnet / dotnet/Open-XML-SDK

OpenXmlPartRootElement should raise the IPartRootEventsFeature.Changed on reload

Open
#1,023 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.6k
Forks
605
PR merge metrics
No merged PRs in 30d

Description

@twsouthwick, I'm not suggesting a change here but wanted to note that only `Saving` and `Saved` events are raised by the `OpenXmlPartRootElement`. However, I'm thinking we might also want to have `OpenXmlPartRootElement` raise the `Reloading` and `Reloaded` events that you have already defined. For example, consider the case where the `_rootXElement` was deserialized from an `OpenXmlPartRootElement` instance that was changed after loading it from the `OpenXmlPart`. If the user discards those changes by calling the `Reload()` method, the `_rootXElement` should also be discarded and loaded again once it is accessed.

_Originally posted by @ThomasBarnekow in https://github.com/OfficeDev/Open-XML-SDK/pull/1021#discussion_r706880297_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.