AssetDependencies Class
Namespace: Stride.Core.Assets.AnalysisAssembly: Stride.Core.Assets.dll
Describes dependencies (in/out/broken) for a specific asset.
public class 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.
Name | Description | |
---|---|---|
Constructors | ||
AssetDependencies(AssetDependencies) | ||
AssetDependencies(AssetItem) | ||
Properties | ||
BrokenLinksOut | Gets the links out. |
|
HasMissingDependencies | Gets a value indicating whether this instance has missing references. |
|
Id | ||
Item | Gets the itemReferenced. |
|
LinksIn | Gets the links coming into the element. |
|
LinksOut | Gets the links going out of the element. |
|
MissingDependencyCount | Gets the number of missing dependencies of the asset. |
|
Methods | ||
AddBrokenLinkOut(IContentLink) | Adds a broken link out. |
|
AddBrokenLinkOut(IReference, ContentLinkType) | Adds a broken link out. |
|
AddLinkIn(AssetLink) | Adds a link coming from the provided element. |
|
AddLinkIn(AssetItem, ContentLinkType) | Adds a link going into the element. |
|
AddLinkOut(AssetLink) | Adds a link going to the provided element. |
|
AddLinkOut(AssetItem, ContentLinkType) | Adds a link going to the provided element. |
|
GetBrokenLinkOut(AssetId) | Gets the broken link out to the provided element. |
|
GetLinkIn(AssetItem) | Gets the link coming from the provided element. |
|
GetLinkOut(AssetItem) | Gets the link going to the provided element. |
|
RemoveBrokenLinkOut(AssetId) | Removes the broken link to the provided element. |
|
RemoveLinkIn(AssetItem) | Removes the link coming from the provided element. |
|
RemoveLinkOut(AssetItem) | Removes the link going to the provided element. |
|
Reset(Boolean) | Resets this instance and clear all dependencies (including missing) |
Constructors
AssetDependencies(AssetDependencies)
public AssetDependencies(AssetDependencies set)
Parameters
Type | Name | Description |
---|---|---|
AssetDependencies | set |
AssetDependencies(AssetItem)
public AssetDependencies(AssetItem assetItem)
Parameters
Type | Name | Description |
---|---|---|
AssetItem | assetItem |
Properties
BrokenLinksOut
Gets the links out.
public IEnumerable<IContentLink> BrokenLinksOut { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IContentLink> | The missing references. |
HasMissingDependencies
Gets a value indicating whether this instance has missing references.
public bool HasMissingDependencies { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Id
public AssetId Id { get; }
Property Value
Type | Description |
---|---|
AssetId |
Item
Gets the itemReferenced.
public AssetItem Item { get; }
Property Value
Type | Description |
---|---|
AssetItem | The itemReferenced. |
LinksIn
Gets the links coming into the element.
public IEnumerable<AssetLink> LinksIn { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<AssetLink> |
LinksOut
Gets the links going out of the element.
public IEnumerable<AssetLink> LinksOut { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<AssetLink> |
MissingDependencyCount
Gets the number of missing dependencies of the asset.
public int MissingDependencyCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
AddBrokenLinkOut(IContentLink)
Adds a broken link out.
public void AddBrokenLinkOut(IContentLink contentLink)
Parameters
Type | Name | Description |
---|---|---|
IContentLink | contentLink | The broken link |
Exceptions
Type | Condition |
---|---|
System.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
Type | Name | Description |
---|---|---|
IReference | reference | the reference to the missing element |
ContentLinkType | contentLinkType | The type of link |
Exceptions
Type | Condition |
---|---|
System.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
Type | Name | Description |
---|---|---|
AssetLink | contentLink | The link in |
Exceptions
Type | Condition |
---|---|
System.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
Type | Name | Description |
---|---|---|
AssetItem | fromItem | The element the link is coming from |
ContentLinkType | contentLinkType | The type of link |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | A link from this element already exists |
AddLinkOut(AssetLink)
Adds a link going to the provided element.
public void AddLinkOut(AssetLink contentLink)
Parameters
Type | Name | Description |
---|---|---|
AssetLink | contentLink | The link out |
Exceptions
Type | Condition |
---|---|
System.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
Type | Name | Description |
---|---|---|
AssetItem | toItem | The element the link is going to |
ContentLinkType | contentLinkType | The type of link |
Exceptions
Type | Condition |
---|---|
System.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
Type | Name | Description |
---|---|---|
AssetId | id | The id of the element the link is going to |
Returns
Type | Description |
---|---|
IContentLink | The link |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | There is not link to the provided element |
System.ArgumentNullException | toItem |
GetLinkIn(AssetItem)
Gets the link coming from the provided element.
public AssetLink GetLinkIn(AssetItem fromItem)
Parameters
Type | Name | Description |
---|---|---|
AssetItem | fromItem | The element the link is coming from |
Returns
Type | Description |
---|---|
AssetLink | The link |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | There is not link to the provided element |
System.ArgumentNullException | fromItem |
GetLinkOut(AssetItem)
Gets the link going to the provided element.
public AssetLink GetLinkOut(AssetItem toItem)
Parameters
Type | Name | Description |
---|---|---|
AssetItem | toItem | The element the link is going to |
Returns
Type | Description |
---|---|
AssetLink | The link |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | There is not link to the provided element |
System.ArgumentNullException | toItem |
RemoveBrokenLinkOut(AssetId)
Removes the broken link to the provided element.
public IContentLink RemoveBrokenLinkOut(AssetId id)
Parameters
Type | Name | Description |
---|---|---|
AssetId | id | The id to the missing element |
Returns
Type | Description |
---|---|
IContentLink | The removed link |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | toItem |
RemoveLinkIn(AssetItem)
Removes the link coming from the provided element.
public AssetLink RemoveLinkIn(AssetItem fromItem)
Parameters
Type | Name | Description |
---|---|---|
AssetItem | fromItem | The element the link is coming from |
Returns
Type | Description |
---|---|
AssetLink | The removed link |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | fromItem |
RemoveLinkOut(AssetItem)
Removes the link going to the provided element.
public AssetLink RemoveLinkOut(AssetItem toItem)
Parameters
Type | Name | Description |
---|---|---|
AssetItem | toItem | The element the link is going to |
Returns
Type | Description |
---|---|
AssetLink | The removed link |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | toItem |
Reset(Boolean)
Resets this instance and clear all dependencies (including missing)
public void Reset(bool keepParents)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | keepParents |