Class Dependency
An abstract class for establishing various methods of a dependency relationship to an object. The implementing class of the Dependency class must monitor the dependency relationships so that when any of them changes, action will automatically be taken.
Implements
Namespace: Cuemon.Runtime
Assembly: Cuemon.Runtime.dll
Syntax
public abstract class Dependency : IDependency
Constructors
| Improve this DocDependency()
Initializes a new instance of the Dependency class.
Declaration
protected Dependency()
Properties
| Improve this DocHasChanged
Gets a value indicating whether the Dependency object has changed.
Declaration
public abstract bool HasChanged { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
UtcLastModified
Gets time when the dependency was last changed.
Declaration
public DateTime UtcLastModified { get; }
Property Value
Type | Description |
---|---|
System.DateTime | The time when the dependency was last changed. |
Remarks
This property is measured in Coordinated Universal Time (UTC) (also known as Greenwich Mean Time).
Methods
| Improve this DocCreate<TResult>()
Creates an instance of TResult
that implements the IDependency interface using a constructor of five parameters.
Declaration
public static TResult Create<TResult>()
where TResult : IDependency
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
TResult | The type to create that implements the IDependency interface. |
Create<T, TResult>(T)
Creates an instance of TResult
that implements the IDependency interface using a constructor of five parameters.
Declaration
public static TResult Create<T, TResult>(T arg)
where TResult : IDependency
Parameters
Type | Name | Description |
---|---|---|
T | arg | The parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T | The type of the parameter of the constructor. |
TResult | The type to create that implements the IDependency interface. |
Create<T1, T2, TResult>(T1, T2)
Creates an instance of TResult
that implements the IDependency interface using a constructor of five parameters.
Declaration
public static TResult Create<T1, T2, TResult>(T1 arg1, T2 arg2)
where TResult : IDependency
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
TResult | The type to create that implements the IDependency interface. |
Create<T1, T2, T3, TResult>(T1, T2, T3)
Creates an instance of TResult
that implements the IDependency interface using a constructor of five parameters.
Declaration
public static TResult Create<T1, T2, T3, TResult>(T1 arg1, T2 arg2, T3 arg3)
where TResult : IDependency
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
T3 | arg3 | The third parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
T3 | The type of the third parameter of the constructor. |
TResult | The type to create that implements the IDependency interface. |
Create<T1, T2, T3, T4, TResult>(T1, T2, T3, T4)
Creates an instance of TResult
that implements the IDependency interface using a constructor of five parameters.
Declaration
public static TResult Create<T1, T2, T3, T4, TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4)
where TResult : IDependency
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
T3 | arg3 | The third parameter of the constructor. |
T4 | arg4 | The fourth parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
T3 | The type of the third parameter of the constructor. |
T4 | The type of the fourth parameter of the constructor. |
TResult | The type to create that implements the IDependency interface. |
Create<T1, T2, T3, T4, T5, TResult>(T1, T2, T3, T4, T5)
Creates an instance of TResult
that implements the IDependency interface using a constructor of five parameters.
Declaration
public static TResult Create<T1, T2, T3, T4, T5, TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
where TResult : IDependency
Parameters
Type | Name | Description |
---|---|---|
T1 | arg1 | The first parameter of the constructor. |
T2 | arg2 | The second parameter of the constructor. |
T3 | arg3 | The third parameter of the constructor. |
T4 | arg4 | The fourth parameter of the constructor. |
T5 | arg5 | The fifth parameter of the constructor. |
Returns
Type | Description |
---|---|
TResult | A reference to the newly created object. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the constructor. |
T2 | The type of the second parameter of the constructor. |
T3 | The type of the third parameter of the constructor. |
T4 | The type of the fourth parameter of the constructor. |
T5 | The type of the fifth parameter of the constructor. |
TResult | The type to create that implements the IDependency interface. |
OnDependencyChangedRaised(DependencyEventArgs)
Raises the DependencyChanged event.
Declaration
protected virtual void OnDependencyChangedRaised(DependencyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DependencyEventArgs | e | The DependencyEventArgs instance containing the event data. |
SetUtcLastModified(DateTime)
Marks the time when a dependency last changed.
Declaration
protected void SetUtcLastModified(DateTime utcLastModified)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | utcLastModified | The time when the dependency last changed. |
Start()
Starts and performs the necessary dependency tasks of this instance.
Declaration
public abstract void Start()
Events
| Improve this DocDependencyChanged
Occurs when a Dependency has changed.
Declaration
public event EventHandler<DependencyEventArgs> DependencyChanged
Event Type
Type | Description |
---|---|
System.EventHandler<DependencyEventArgs> |