Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

CrossVersionReference<T> allows for references to be made to content items in a different version from the current item. Reference<T> can only reference items in the same version as the current content item, so this is necessary to bypass that.  It has a property .Version which returns an ItemVersion for the version in which the referenced item exists.  Also it has a property AllowedVersionsOverlay which lets you specify the set of versions which are accessible from the current version via the Mask operation.

Finding all references to an item

You can find all items with references to an item using the call below:

Code Block
languagec#
IEnumerable<Summary> Reference.GetReferencesFrom<MyContent>(LyniconSystem sys, object o, string propertyName)

The parameters are as follow:

  • sys: The LyniconSystem in which the referring items are to be found
  • o: A content item or content container to which the referring items refer
  • propertyName: The property on the referring items which is the reference to the referred to item