Table of Contents

Class ObservableProvider

Namespace
Virtufin.Core
Assembly
Virtufin.Core.dll

Value streams kept per (entity, attribute name), of any value types. Requesting a held attribute with another value type throws AttributeTypeMismatchException; a missing stream is null. The type specifier's value membership is not checked per value of the stream.

public class ObservableProvider : IObservableProvider
Inheritance
ObservableProvider
Implements
Inherited Members

Constructors

ObservableProvider(IEntityAttributeValueTypeSpecifier)

public ObservableProvider(IEntityAttributeValueTypeSpecifier typeSpecifier)

Parameters

typeSpecifier IEntityAttributeValueTypeSpecifier

Properties

TypeSpecifier

The entities and attributes this provider answers for.

public IEntityAttributeValueTypeSpecifier TypeSpecifier { get; }

Property Value

IEntityAttributeValueTypeSpecifier

Methods

Add<V>(IEnumerable<(IEntityIdentifier, IAttribute<V>, IObservable<V>)>)

Adds streams; returns this provider for chaining.

public ObservableProvider Add<V>(IEnumerable<(IEntityIdentifier, IAttribute<V>, IObservable<V>)> entries) where V : struct

Parameters

entries IEnumerable<(IEntityIdentifier, IAttribute<V>, IObservable<V>)>

Returns

ObservableProvider

Type Parameters

V

Add<V>(IEntityIdentifier, IAttribute<V>, IObservable<V>)

Adds a stream; returns this provider for chaining.

public ObservableProvider Add<V>(IEntityIdentifier identifier, IAttribute<V> attribute, IObservable<V> values) where V : struct

Parameters

identifier IEntityIdentifier
attribute IAttribute<V>
values IObservable<V>

Returns

ObservableProvider

Type Parameters

V

GetObservable<V>(IEntityIdentifier, IAttribute<V>)

The value stream of the entity's attribute, or null when there is none.

public IObservable<V>? GetObservable<V>(IEntityIdentifier identifier, IAttribute<V> attribute) where V : struct

Parameters

identifier IEntityIdentifier
attribute IAttribute<V>

Returns

IObservable<V>

Type Parameters

V

Exceptions

AttributeTypeMismatchException

The provider holds the attribute with another value type.