Table of Contents

Dependency Class

Definition

Namespace
Cuemon.Runtime
Assemblies
Cuemon.Core.dll
Source
src/Cuemon.Core/Runtime/Dependency.cs

Represents the base class from which all implementations of dependency relationship to an object should derive.

public abstract class Dependency : IDependency
Inheritance
Dependency
Implements
Derived

Remarks

The implementing class of the Dependency class must monitor the dependency relationships so that when any of them changes, action will automatically be taken.

Constructors

Name Description
Dependency(Func<EventHandler<WatcherEventArgs>, IEnumerable<IWatcher>>, bool)

Initializes a new instance of the Dependency class.

Properties

Name Description
BreakTieOnChanged

Gets a value indicating whether all IWatcher instances is disassociated with this dependency after first notification of changed.

HasChanged

Gets a value indicating whether the Dependency object has changed.

UtcLastModified

Gets time when the dependency was last changed.

Methods

Name Description
OnDependencyChangedRaised(DependencyEventArgs)

Raises the DependencyChanged event.

OnWatcherChanged(object, WatcherEventArgs)

Called when this object receives a signal from one or more of the associated IWatcher.

SetUtcLastModified(DateTime)

Marks the time when a dependency last changed.

Start()

Starts and performs the necessary dependency tasks of this instance.

StartAsync()

Starts and performs the necessary dependency tasks of this instance.

Events

Name Description
DependencyChanged

Occurs when a Dependency has changed.