Show / Hide Table of Contents

Class DerivationExtensions

Extension methods for IDerivation interface implementations.

Inheritance
System.Object
DerivationExtensions
Namespace: Cortex.Net.Core
Assembly: Cortex.Net.dll
Syntax
public static class DerivationExtensions : object

Methods

| Improve this Doc View Source

ClearObserving(IDerivation)

Cleans the Observing collection with notification of the observables.

Declaration
public static void ClearObserving(this IDerivation derivation)
Parameters
Type Name Description
IDerivation derivation

The derivation to clean.

| Improve this Doc View Source

ShouldCompute(IDerivation)

Checks whether the IDerivationinstance should recompute itself.

Declaration
public static bool ShouldCompute(this IDerivation derivation)
Parameters
Type Name Description
IDerivation derivation

The derivation.

Returns
Type Description
System.Boolean

True when it needs to recompute, false otherwise.

Remarks

Might throw any other exception that a getter for IObservable will thow.

| Improve this Doc View Source

TrackDerivedFunction<T>(IDerivation, Func<T>)

Executes the provided function and tracks which observables are being accessed. The tracking information is stored on the IDerivation instance and the derivation is registered as observer of any of the accessed observables.

Declaration
public static (T, Exception) TrackDerivedFunction<T>(this IDerivation derivation, Func<T> function)
Parameters
Type Name Description
IDerivation derivation

The derivation to use.

Func<T> function

The function to execute.

Returns
Type Description
System.ValueTuple<T, Exception>

A tuple containing the return value of the function or an Exception.

Type Parameters
Name Description
T

The return type of the function.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX