diff --git a/src/Artemis.Core/Extensions/IEnumerableExtensions.cs b/src/Artemis.Core/Extensions/IEnumerableExtensions.cs
index 0c60de0f9..c7ee21841 100644
--- a/src/Artemis.Core/Extensions/IEnumerableExtensions.cs
+++ b/src/Artemis.Core/Extensions/IEnumerableExtensions.cs
@@ -93,6 +93,13 @@ namespace Artemis.Core
}
}
+ ///
+ /// Returns the index of the provided element inside the read only collection
+ ///
+ /// The type of element to find
+ /// The collection to search in
+ /// The element to find
+ /// If found, the index of the element to find; otherwise -1
public static int IndexOf(this IReadOnlyCollection self, T elementToFind)
{
int i = 0;
@@ -102,6 +109,7 @@ namespace Artemis.Core
return i;
i++;
}
+
return -1;
}
}
diff --git a/src/Artemis.Core/Models/Profile/Conditions/EventCondition.cs b/src/Artemis.Core/Models/Profile/Conditions/EventCondition.cs
index 0f787c91b..0ba1f5a86 100644
--- a/src/Artemis.Core/Models/Profile/Conditions/EventCondition.cs
+++ b/src/Artemis.Core/Models/Profile/Conditions/EventCondition.cs
@@ -6,6 +6,9 @@ using Artemis.Storage.Entities.Profile.Conditions;
namespace Artemis.Core
{
+ ///
+ /// Represents a condition that is based on a
+ ///
public class EventCondition : CorePropertyChanged, INodeScriptCondition
{
private readonly string _displayName;
@@ -78,7 +81,7 @@ namespace Artemis.Core
}
else
{
- _eventNode = new EventDefaultNode() {X = -300};
+ _eventNode = new EventDefaultNode {X = -300};
_eventNode.UpdateDataModelEvent(dataModelEvent);
}
diff --git a/src/Artemis.Core/Models/Profile/Conditions/StaticCondition.cs b/src/Artemis.Core/Models/Profile/Conditions/StaticCondition.cs
index 4e4b41874..2419d1387 100644
--- a/src/Artemis.Core/Models/Profile/Conditions/StaticCondition.cs
+++ b/src/Artemis.Core/Models/Profile/Conditions/StaticCondition.cs
@@ -3,11 +3,17 @@ using Artemis.Storage.Entities.Profile.Conditions;
namespace Artemis.Core
{
+ ///
+ /// Represents a condition that is based on a data model value
+ ///
public class StaticCondition : CorePropertyChanged, INodeScriptCondition
{
- private readonly StaticConditionEntity _entity;
private readonly string _displayName;
+ private readonly StaticConditionEntity _entity;
+ ///
+ /// Creates a new instance of the class
+ ///
public StaticCondition(ProfileElement profileElement)
{
_entity = new StaticConditionEntity();
diff --git a/src/Artemis.Core/Models/Profile/DataModel/IDataModelEvent.cs b/src/Artemis.Core/Models/Profile/DataModel/IDataModelEvent.cs
index 4357dc3c6..4ab9d271c 100644
--- a/src/Artemis.Core/Models/Profile/DataModel/IDataModelEvent.cs
+++ b/src/Artemis.Core/Models/Profile/DataModel/IDataModelEvent.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
namespace Artemis.Core
{
///
- /// Represents a data model event that can trigger s.
+ /// Represents an event that is part of a data model
///
public interface IDataModelEvent
{
diff --git a/src/Artemis.Core/Models/Profile/Timeline.cs b/src/Artemis.Core/Models/Profile/Timeline.cs
index 139b5a8c0..86c9023d7 100644
--- a/src/Artemis.Core/Models/Profile/Timeline.cs
+++ b/src/Artemis.Core/Models/Profile/Timeline.cs
@@ -82,7 +82,6 @@ namespace Artemis.Core
private TimeSpan _position;
private TimeSpan _lastDelta;
- private TimeLineEventOverlapMode _eventOverlapMode;
private TimelinePlayMode _playMode;
private TimelineStopMode _stopMode;
private readonly List _extraTimelines;
diff --git a/src/Artemis.Core/Plugins/Modules/Module.cs b/src/Artemis.Core/Plugins/Modules/Module.cs
index 8f2c56a60..43e5a07f5 100644
--- a/src/Artemis.Core/Plugins/Modules/Module.cs
+++ b/src/Artemis.Core/Plugins/Modules/Module.cs
@@ -114,17 +114,20 @@ namespace Artemis.Core.Modules
private readonly List<(DefaultCategoryName, string)> _defaultProfilePaths = new();
private readonly List<(DefaultCategoryName, string)> _pendingDefaultProfilePaths = new();
- protected Module()
- {
- DefaultProfilePaths = new ReadOnlyCollection<(DefaultCategoryName, string)>(_defaultProfilePaths);
- HiddenProperties = new(HiddenPropertiesList);
- }
-
///
/// Gets a list of all properties ignored at runtime using IgnoreProperty(x => x.y)
///
protected internal readonly List HiddenPropertiesList = new();
+ ///
+ /// The base constructor of the class.
+ ///
+ protected Module()
+ {
+ DefaultProfilePaths = new ReadOnlyCollection<(DefaultCategoryName, string)>(_defaultProfilePaths);
+ HiddenProperties = new ReadOnlyCollection(HiddenPropertiesList);
+ }
+
///
/// Gets a read only collection of default profile paths
///
@@ -237,7 +240,7 @@ namespace Artemis.Core.Modules
///
public virtual DataModelPropertyAttribute GetDataModelDescription()
{
- return new() {Name = Plugin.Info.Name, Description = Plugin.Info.Description};
+ return new DataModelPropertyAttribute {Name = Plugin.Info.Name, Description = Plugin.Info.Description};
}
///
diff --git a/src/Artemis.Core/Plugins/ScriptingProviders/ScriptingProvider.cs b/src/Artemis.Core/Plugins/ScriptingProviders/ScriptingProvider.cs
index 0ae720943..1f8d4b1c4 100644
--- a/src/Artemis.Core/Plugins/ScriptingProviders/ScriptingProvider.cs
+++ b/src/Artemis.Core/Plugins/ScriptingProviders/ScriptingProvider.cs
@@ -44,9 +44,12 @@ namespace Artemis.Core.ScriptingProviders
///
public abstract class ScriptingProvider : PluginFeature
{
+ ///
+ /// The base constructor of the class
+ ///
protected ScriptingProvider()
{
- Scripts = new(InternalScripts);
+ Scripts = new ReadOnlyCollection