Class Module<T>
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
-
objectCorePropertyChangedModule<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
propertyLambdaExpression<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
pathstringThe path to check per example:
MyDataModelChild.MyDataModelPropertyincludeChildrenboolIf true any child of the given path will return true as well; if false only an exact path match returns true.
Returns
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
propertyLambdaExpression<Func<T, TProperty>>The path to check per example:
IsPropertyInUse(dm => dm.TimeDataModel.CurrentTimeUTC)includeChildrenboolIf true any child of the given path will return true as well; if false only an exact path match returns true.
Returns
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
propertyLambdaExpression<Func<T, TProperty>>A lambda expression pointing to the property to stop ignoring
Type Parameters
TProperty