Class AssetDependencies
Describes dependencies (in/out/broken) for a specific asset.
public class AssetDependencies
- Inheritance
-
AssetDependencies
Remarks
There are 3 types of dependencies:
in
dependencies: through the LinksIn property, contains assets
that are referencing this asset.out
dependencies: through the LinksOut property, contains assets that are referenced by this asset.broken
dependencies: through the BrokenLinksOut property, contains output links to assets that are missing.
Constructors
AssetDependencies(AssetDependencies)
public AssetDependencies(AssetDependencies set)
Parameters
AssetDependencies(AssetItem)
public AssetDependencies(AssetItem assetItem)
Parameters
assetItem
AssetItem
Properties
BrokenLinksOut
Gets the links out.
public IEnumerable<IContentLink> BrokenLinksOut { get; }
Property Value
- IEnumerable<IContentLink>
The missing references.
HasMissingDependencies
Gets a value indicating whether this instance has missing references.
public bool HasMissingDependencies { get; }
Property Value
- bool
true
if this instance has missing references; otherwise,false
.
Id
public AssetId Id { get; }
Property Value
Item
Gets the itemReferenced.
public AssetItem Item { get; }
Property Value
- AssetItem
The itemReferenced.
LinksIn
Gets the links coming into the element.
public IEnumerable<AssetLink> LinksIn { get; }
Property Value
LinksOut
Gets the links going out of the element.
public IEnumerable<AssetLink> LinksOut { get; }
Property Value
MissingDependencyCount
Gets the number of missing dependencies of the asset.
public int MissingDependencyCount { get; }
Property Value
Methods
AddBrokenLinkOut(IContentLink)
Adds a broken link out.
public void AddBrokenLinkOut(IContentLink contentLink)
Parameters
contentLink
IContentLinkThe broken link
Exceptions
- ArgumentException
A broken link to this element already exists
AddBrokenLinkOut(IReference, ContentLinkType)
Adds a broken link out.
public void AddBrokenLinkOut(IReference reference, ContentLinkType contentLinkType)
Parameters
reference
IReferencethe reference to the missing element
contentLinkType
ContentLinkTypeThe type of link
Exceptions
- ArgumentException
A broken link to this element already exists
AddLinkIn(AssetLink)
Adds a link coming from the provided element.
public void AddLinkIn(AssetLink contentLink)
Parameters
contentLink
AssetLinkThe link in
Exceptions
- ArgumentException
A link from this element already exists
AddLinkIn(AssetItem, ContentLinkType)
Adds a link going into the element.
public void AddLinkIn(AssetItem fromItem, ContentLinkType contentLinkType)
Parameters
fromItem
AssetItemThe element the link is coming from
contentLinkType
ContentLinkTypeThe type of link
Exceptions
- ArgumentException
A link from this element already exists
AddLinkOut(AssetLink)
Adds a link going to the provided element.
public void AddLinkOut(AssetLink contentLink)
Parameters
contentLink
AssetLinkThe link out
Exceptions
- ArgumentException
A link to this element already exists
AddLinkOut(AssetItem, ContentLinkType)
Adds a link going to the provided element.
public void AddLinkOut(AssetItem toItem, ContentLinkType contentLinkType)
Parameters
toItem
AssetItemThe element the link is going to
contentLinkType
ContentLinkTypeThe type of link
Exceptions
- ArgumentException
A link to this element already exists
GetBrokenLinkOut(AssetId)
Gets the broken link out to the provided element.
public IContentLink GetBrokenLinkOut(AssetId id)
Parameters
id
AssetIdThe id of the element the link is going to
Returns
- IContentLink
The link
Exceptions
- ArgumentException
There is not link to the provided element
- ArgumentNullException
toItem
GetLinkIn(AssetItem)
Gets the link coming from the provided element.
public AssetLink GetLinkIn(AssetItem fromItem)
Parameters
fromItem
AssetItemThe element the link is coming from
Returns
- AssetLink
The link
Exceptions
- ArgumentException
There is not link to the provided element
- ArgumentNullException
fromItem
GetLinkOut(AssetItem)
Gets the link going to the provided element.
public AssetLink GetLinkOut(AssetItem toItem)
Parameters
toItem
AssetItemThe element the link is going to
Returns
- AssetLink
The link
Exceptions
- ArgumentException
There is not link to the provided element
- ArgumentNullException
toItem
RemoveBrokenLinkOut(AssetId)
Removes the broken link to the provided element.
public IContentLink RemoveBrokenLinkOut(AssetId id)
Parameters
id
AssetIdThe id to the missing element
Returns
- IContentLink
The removed link
Exceptions
- ArgumentNullException
toItem
RemoveLinkIn(AssetItem)
Removes the link coming from the provided element.
public AssetLink RemoveLinkIn(AssetItem fromItem)
Parameters
fromItem
AssetItemThe element the link is coming from
Returns
- AssetLink
The removed link
Exceptions
- ArgumentNullException
fromItem
RemoveLinkOut(AssetItem)
Removes the link going to the provided element.
public AssetLink RemoveLinkOut(AssetItem toItem)
Parameters
toItem
AssetItemThe element the link is going to
Returns
- AssetLink
The removed link
Exceptions
- ArgumentNullException
toItem
Reset(bool)
Resets this instance and clear all dependencies (including missing)
public void Reset(bool keepParents)
Parameters
keepParents
bool