Table of Contents

Class Module<T>

Namespace
Artemis.Core.Modules
Assembly
Artemis.Core.dll

Allows you to add new data to the Artemis data model

public abstract class Module<T> : Module, IDisposable where T : DataModel, new()

Type Parameters

T
Inheritance
object
CorePropertyChanged
Module<T>
Implements
Inherited Members

Properties

DataModel

The data model driving this module

Note: This default data model is automatically registered and instantiated upon plugin enable

public T DataModel { get; }

Property Value

T

Methods

HideProperty<TProperty>(Expression<Func<T, TProperty>>)

Hide the provided property using a lambda expression, e.g. HideProperty(dm => dm.TimeDataModel.CurrentTimeUTC)

public void HideProperty<TProperty>(Expression<Func<T, TProperty>> propertyLambda)

Parameters

propertyLambda Expression<Func<T, TProperty>>

A lambda expression pointing to the property to ignore

Type Parameters

TProperty

IsPropertyInUse(string, bool)

Determines whether the provided dot-separated path is actively being used by Artemis

public bool IsPropertyInUse(string path, bool includeChildren)

Parameters

path string

The path to check per example: MyDataModelChild.MyDataModelProperty

includeChildren bool

If true any child of the given path will return true as well; if false only an exact path match returns true.

Returns

bool

IsPropertyInUse<TProperty>(Expression<Func<T, TProperty>>, bool)

Determines whether the provided dot-separated path is actively being used by Artemis

Note: IsPropertyInUse(string, bool) is slightly faster but string-based.

public bool IsPropertyInUse<TProperty>(Expression<Func<T, TProperty>> propertyLambda, bool includeChildren)

Parameters

propertyLambda Expression<Func<T, TProperty>>

The path to check per example: IsPropertyInUse(dm => dm.TimeDataModel.CurrentTimeUTC)

includeChildren bool

If true any child of the given path will return true as well; if false only an exact path match returns true.

Returns

bool

Type Parameters

TProperty

ShowProperty<TProperty>(Expression<Func<T, TProperty>>)

Stop hiding the provided property using a lambda expression, e.g. ShowProperty(dm => dm.TimeDataModel.CurrentTimeUTC)

public void ShowProperty<TProperty>(Expression<Func<T, TProperty>> propertyLambda)

Parameters

propertyLambda Expression<Func<T, TProperty>>

A lambda expression pointing to the property to stop ignoring

Type Parameters

TProperty