You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduced optional excludeLastModified parameter for GetAttributes()
In a previous feature, we introduced the ability to optionally exclude the byline (`LastModifiedBy`) and dateline (`LastModified`) as part of a `Save()` operation if no other attributes had been modified. This was supported by a new `AttributeValueCollection.IsDirty(excludeLastModified)`.
As an extension of this, it's now an optional `excludeLastModified` parameter off of `GetAttributes()`. This allows the caller to specify whether or not `GetAttributes()` should exclude `LastModified*` attributes or not. This makes it easier to conditionally exclude these based e.g. on the result of `IsDirty()`.
This is relevant to the `bugfix/extended-attributes-mismatch` branch because `IsDirty()` isn't able to detect `IsExtendedAttributeMismatch()`, which requires a reference to the `AttributeDescriptor`, and is therefore much more expensive to evaluate. As such, we can't just wrap the indexed attributes in a call to `IsDirty()` to determine as a shorthand for excluding the byline and dateline. Instead, we need to still process these—in case they include any `IsExtendedAttributeMismatch()`s—while having an easy way to exclude the byline and dateline. The `excludeLastModified` parameter allows for this.
This includes a unit test to validate the functionality, as well as an extension to the `GetAttributesProxy()` class on `StubTopicRepository`. Finally, it requires updating (and potentially repaginating) some XMLDoc references to the `GetAttributes()`, mostly in `TopicRepositoryBaseTest`.
0 commit comments