Class Module<T>
Allows you to add new data to the Artemis data model
Implements
Inherited Members
Namespace: Artemis.Core.Modules
Assembly: Artemis.Core.dll
Syntax
public abstract class Module<T> : Module, IDisposable where T : DataModel, new()
Type Parameters
Name | Description |
---|---|
T |
Constructors
Module()
Declaration
protected Module()
Properties
DataModel
The data model driving this module
Note: This default data model is automatically registered and instantiated upon plugin enable
Declaration
public T DataModel { get; }
Property Value
Type | Description |
---|---|
T |
Methods
HideProperty<TProperty>(Expression<Func<T, TProperty>>)
Hide the provided property using a lambda expression, e.g.
HideProperty(dm => dm.TimeDataModel.CurrentTimeUTC)
Declaration
public void HideProperty<TProperty>(Expression<Func<T, TProperty>> propertyLambda)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<T, TProperty>> | propertyLambda | A lambda expression pointing to the property to ignore |
Type Parameters
Name | Description |
---|---|
TProperty |
IsPropertyInUse(string, bool)
Determines whether the provided dot-separated path is actively being used by Artemis
Declaration
public bool IsPropertyInUse(string path, bool includeChildren)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path to check per example: |
bool | includeChildren | If true any child of the given path will return true as well; if false only an exact path match returns true. |
Returns
Type | Description |
---|---|
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.
Declaration
public bool IsPropertyInUse<TProperty>(Expression<Func<T, TProperty>> propertyLambda, bool includeChildren)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<T, TProperty>> | propertyLambda | The path to check per example: |
bool | includeChildren | If true any child of the given path will return true as well; if false only an exact path match returns true. |
Returns
Type | Description |
---|---|
bool |
Type Parameters
Name | Description |
---|---|
TProperty |
ShowProperty<TProperty>(Expression<Func<T, TProperty>>)
Stop hiding the provided property using a lambda expression, e.g.
ShowProperty(dm => dm.TimeDataModel.CurrentTimeUTC)
Declaration
public void ShowProperty<TProperty>(Expression<Func<T, TProperty>> propertyLambda)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<T, TProperty>> | propertyLambda | A lambda expression pointing to the property to stop ignoring |
Type Parameters
Name | Description |
---|---|
TProperty |