Class AssetDependencyManager
A class responsible for providing asset dependencies for a PackageSession and file tracking dependency.
public sealed class AssetDependencyManager : IAssetDependencyManager, IDisposable
  - Inheritance
 - 
      objectAssetDependencyManager
 
- Implements
 
- Extension Methods
 
Remarks
This class provides methods to:
- Find assets referencing a particular asset (recursively or not)
 - Find assets referenced by a particular asset (recursively or not)
 - Find missing references
 - Find missing references for a particular asset
 - Find assets file changed events that have changed on the disk
 
Properties
IsInitialized
Gets a value indicating whether this instance is initialized. See remarks.
public bool IsInitialized { get; }
  Property Value
- bool
 trueif this instance is initialized; otherwise,false.
Remarks
If this instance is not initialized, all public methods may block until the full initialization of this instance.
Methods
BeginSavingSession()
This methods is called when a session is about to being saved.
public void BeginSavingSession()
  ComputeDependencies(AssetId, AssetDependencySearchOptions, ContentLinkType, HashSet<AssetId>?)
Computes the dependencies for the specified asset.
public AssetDependencies? ComputeDependencies(AssetId assetId, AssetDependencySearchOptions dependenciesOptions = AssetDependencySearchOptions.All, ContentLinkType linkTypes = ContentLinkType.All, HashSet<AssetId>? visited = null)
  Parameters
assetIdAssetIdThe asset id.
dependenciesOptionsAssetDependencySearchOptionsThe dependencies options.
linkTypesContentLinkTypeThe type of links to visit while computing the dependencies
visitedHashSet<AssetId>The list of element already visited.
Returns
- AssetDependencies
 The dependencies, or
nullif the object is not tracked.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
  EndSavingSession()
This methods is called when a session has been saved.
public void EndSavingSession()
  Events
AssetChanged
Occurs when a asset changed. This event is called in the critical section of the dependency manager, meaning that dependencies can be safely computed via ComputeDependencies(AssetId, AssetDependencySearchOptions, ContentLinkType, HashSet<AssetId>?) method from this callback.
public event DirtyFlagChangedDelegate<AssetItem>? AssetChanged