mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Layer effects - Normalized method naming
This commit is contained in:
1 parent
e27f658cea
commit
73e992bbb7
13 files changed
+56
-48
No files matched your search
@@ -6,6 +6,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using Artemis.Core.Exceptions;
|
||||
using Artemis.Core.Plugins.DataModelExpansions.Attributes;
|
||||
using Artemis.Core.Plugins.DataModelExpansions.Internal;
|
||||
using Artemis.Core.Plugins.Modules;
|
||||
|
||||
namespace Artemis.Core.Plugins.DataModelExpansions
|
||||
|
||||
+2
-32
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using Artemis.Core.Plugins.DataModelExpansions.Attributes;
|
||||
using Artemis.Core.Plugins.DataModelExpansions.Internal;
|
||||
using Artemis.Core.Utilities;
|
||||
|
||||
namespace Artemis.Core.Plugins.DataModelExpansions
|
||||
@@ -12,7 +9,7 @@ namespace Artemis.Core.Plugins.DataModelExpansions
|
||||
/// <summary>
|
||||
/// Allows you to expand the application-wide datamodel
|
||||
/// </summary>
|
||||
public abstract class BaseDataModelExpansion<T> : BaseDataModelExpansion where T : DataModel
|
||||
public abstract class DataModelExpansion<T> : BaseDataModelExpansion where T : DataModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The data model driving this module
|
||||
@@ -58,31 +55,4 @@ namespace Artemis.Core.Plugins.DataModelExpansions
|
||||
base.InternalDisablePlugin();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For internal use only, to implement your own layer property type, extend <see cref="BaseDataModelExpansion{T}" />
|
||||
/// instead.
|
||||
/// </summary>
|
||||
public abstract class BaseDataModelExpansion : Plugin
|
||||
{
|
||||
protected readonly List<PropertyInfo> HiddenPropertiesList = new List<PropertyInfo>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of all properties ignored at runtime using IgnoreProperty(x => x.y)
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<PropertyInfo> HiddenProperties => HiddenPropertiesList.AsReadOnly();
|
||||
|
||||
internal DataModel InternalDataModel { get; set; }
|
||||
public abstract void Update(double deltaTime);
|
||||
|
||||
/// <summary>
|
||||
/// Override to provide your own data model description. By default this returns a description matching your plugin
|
||||
/// name and description
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual DataModelPropertyAttribute GetDataModelDescription()
|
||||
{
|
||||
return new DataModelPropertyAttribute {Name = PluginInfo.Name, Description = PluginInfo.Description};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Reflection;
|
||||
using Artemis.Core.Plugins.DataModelExpansions.Attributes;
|
||||
|
||||
namespace Artemis.Core.Plugins.DataModelExpansions.Internal
|
||||
{
|
||||
/// <summary>
|
||||
/// For internal use only, to implement your own layer property type, extend <see cref="DataModelExpansion{T}" />
|
||||
/// instead.
|
||||
/// </summary>
|
||||
public abstract class BaseDataModelExpansion : Plugin
|
||||
{
|
||||
protected readonly List<PropertyInfo> HiddenPropertiesList = new List<PropertyInfo>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of all properties ignored at runtime using IgnoreProperty(x => x.y)
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<PropertyInfo> HiddenProperties => HiddenPropertiesList.AsReadOnly();
|
||||
|
||||
internal DataModel InternalDataModel { get; set; }
|
||||
public abstract void Update(double deltaTime);
|
||||
|
||||
/// <summary>
|
||||
/// Override to provide your own data model description. By default this returns a description matching your plugin
|
||||
/// name and description
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual DataModelPropertyAttribute GetDataModelDescription()
|
||||
{
|
||||
return new DataModelPropertyAttribute {Name = PluginInfo.Name, Description = PluginInfo.Description};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user