Table of Contents

Class AssetDependencies

Namespace
Stride.Core.Assets.Analysis
Assembly
Stride.Core.Assets.dll

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

set AssetDependencies

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

AssetId

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

IEnumerable<AssetLink>

LinksOut

Gets the links going out of the element.

public IEnumerable<AssetLink> LinksOut { get; }

Property Value

IEnumerable<AssetLink>

MissingDependencyCount

Gets the number of missing dependencies of the asset.

public int MissingDependencyCount { get; }

Property Value

int

Methods

Adds a broken link out.

public void AddBrokenLinkOut(IContentLink contentLink)

Parameters

contentLink IContentLink

The 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 IReference

the reference to the missing element

contentLinkType ContentLinkType

The type of link

Exceptions

ArgumentException

A broken link to this element already exists

Adds a link coming from the provided element.

public void AddLinkIn(AssetLink contentLink)

Parameters

contentLink AssetLink

The 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 AssetItem

The element the link is coming from

contentLinkType ContentLinkType

The type of link

Exceptions

ArgumentException

A link from this element already exists

Adds a link going to the provided element.

public void AddLinkOut(AssetLink contentLink)

Parameters

contentLink AssetLink

The 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 AssetItem

The element the link is going to

contentLinkType ContentLinkType

The 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 AssetId

The 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 AssetItem

The 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 AssetItem

The 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 AssetId

The 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 AssetItem

The 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 AssetItem

The 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