diff --git a/src/Artemis.Core/Artemis.Core.csproj b/src/Artemis.Core/Artemis.Core.csproj index 99bdd68c0..42b2f16f6 100644 --- a/src/Artemis.Core/Artemis.Core.csproj +++ b/src/Artemis.Core/Artemis.Core.csproj @@ -24,6 +24,7 @@ true git true + enable diff --git a/src/Artemis.Core/Artemis.Core.csproj.DotSettings b/src/Artemis.Core/Artemis.Core.csproj.DotSettings deleted file mode 100644 index 280c5c5d3..000000000 --- a/src/Artemis.Core/Artemis.Core.csproj.DotSettings +++ /dev/null @@ -1,57 +0,0 @@ - - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True \ No newline at end of file diff --git a/src/Artemis.Core/Events/DeviceConfigurationEventArgs.cs b/src/Artemis.Core/Events/DeviceConfigurationEventArgs.cs index ba4ce72de..45c31fb7e 100644 --- a/src/Artemis.Core/Events/DeviceConfigurationEventArgs.cs +++ b/src/Artemis.Core/Events/DeviceConfigurationEventArgs.cs @@ -2,9 +2,12 @@ namespace Artemis.Core { + /// + /// Provides data about surface configuration related events + /// public class SurfaceConfigurationEventArgs : EventArgs { - public SurfaceConfigurationEventArgs(ArtemisSurface surface) + internal SurfaceConfigurationEventArgs(ArtemisSurface surface) { Surface = surface; } diff --git a/src/Artemis.Core/Events/DeviceEventArgs.cs b/src/Artemis.Core/Events/DeviceEventArgs.cs index 1d4f3eabc..0f306793a 100644 --- a/src/Artemis.Core/Events/DeviceEventArgs.cs +++ b/src/Artemis.Core/Events/DeviceEventArgs.cs @@ -3,9 +3,12 @@ using RGB.NET.Core; namespace Artemis.Core { + /// + /// Provides data about device related events + /// public class DeviceEventArgs : EventArgs { - public DeviceEventArgs(IRGBDevice device) + internal DeviceEventArgs(IRGBDevice device) { Device = device; } diff --git a/src/Artemis.Core/Events/DynamicDataModelEventArgs.cs b/src/Artemis.Core/Events/DynamicDataModelEventArgs.cs new file mode 100644 index 000000000..77fb13b54 --- /dev/null +++ b/src/Artemis.Core/Events/DynamicDataModelEventArgs.cs @@ -0,0 +1,20 @@ +using System; +using Artemis.Core.DataModelExpansions; + +namespace Artemis.Core +{ + /// + /// Provides data about dynamic data model related events + /// + public class DynamicDataModelEventArgs : EventArgs + { + internal DynamicDataModelEventArgs(DataModel dynamicDataModel, string key) + { + DynamicDataModel = dynamicDataModel; + Key = key; + } + + public DataModel DynamicDataModel { get; } + public string Key { get; } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/Events/FrameRenderedEventArgs.cs b/src/Artemis.Core/Events/FrameRenderedEventArgs.cs index 22f91ded7..bbe43b54b 100644 --- a/src/Artemis.Core/Events/FrameRenderedEventArgs.cs +++ b/src/Artemis.Core/Events/FrameRenderedEventArgs.cs @@ -3,9 +3,12 @@ using RGB.NET.Core; namespace Artemis.Core { + /// + /// Provides data about frame rendering related events + /// public class FrameRenderedEventArgs : EventArgs { - public FrameRenderedEventArgs(BitmapBrush bitmapBrush, RGBSurface rgbSurface) + internal FrameRenderedEventArgs(BitmapBrush bitmapBrush, RGBSurface rgbSurface) { BitmapBrush = bitmapBrush; RgbSurface = rgbSurface; diff --git a/src/Artemis.Core/Events/FrameRenderingEventArgs.cs b/src/Artemis.Core/Events/FrameRenderingEventArgs.cs index 89e0dbd45..2fea69f08 100644 --- a/src/Artemis.Core/Events/FrameRenderingEventArgs.cs +++ b/src/Artemis.Core/Events/FrameRenderingEventArgs.cs @@ -6,9 +6,12 @@ using SkiaSharp; namespace Artemis.Core { + /// + /// Provides data about frame rendered related events + /// public class FrameRenderingEventArgs : EventArgs { - public FrameRenderingEventArgs(List modules, SKCanvas canvas, double deltaTime, RGBSurface rgbSurface) + internal FrameRenderingEventArgs(List modules, SKCanvas canvas, double deltaTime, RGBSurface rgbSurface) { Modules = modules; Canvas = canvas; diff --git a/src/Artemis.Core/Models/Profile/DataModel/DataModelPath.cs b/src/Artemis.Core/Models/Profile/DataModel/DataModelPath.cs index c6cdc9c40..2f4ef95cf 100644 --- a/src/Artemis.Core/Models/Profile/DataModel/DataModelPath.cs +++ b/src/Artemis.Core/Models/Profile/DataModel/DataModelPath.cs @@ -1,21 +1,21 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Linq; using System.Linq.Expressions; using System.Reflection; using Artemis.Core.DataModelExpansions; +using Artemis.Storage.Entities.Profile; namespace Artemis.Core { /// /// Represents a path that points to a property in data model /// - public class DataModelPath + public class DataModelPath : IStorageModel, IDisposable { - private Expression> _accessorLambda; private readonly LinkedList _segments; + private Expression>? _accessorLambda; /// /// Creates a new instance of the class pointing directly to the target @@ -25,9 +25,15 @@ namespace Artemis.Core { Target = target ?? throw new ArgumentNullException(nameof(target)); Path = ""; + Entity = new DataModelPathEntity(); + if (Target is DataModel dataModel) + DataModelGuid = dataModel.PluginInfo.Guid; _segments = new LinkedList(); - Initialize(Path); + + Save(); + Initialize(); + SubscribeToDataModelStore(); } /// @@ -39,25 +45,51 @@ namespace Artemis.Core { Target = target ?? throw new ArgumentNullException(nameof(target)); Path = path ?? throw new ArgumentNullException(nameof(path)); + Entity = new DataModelPathEntity(); + if (Target is DataModel dataModel) + DataModelGuid = dataModel.PluginInfo.Guid; _segments = new LinkedList(); - Initialize(Path); + + Save(); + Initialize(); + SubscribeToDataModelStore(); + } + + internal DataModelPath(object target, DataModelPathEntity entity) + { + Target = target!; + Path = entity.Path; + Entity = entity; + + _segments = new LinkedList(); + + Load(); + Initialize(); + SubscribeToDataModelStore(); } /// /// Gets the data model at which this path starts /// - public object Target { get; } + public object? Target { get; private set; } + + internal DataModelPathEntity Entity { get; } + + /// + /// Gets the data model GUID of the if it is a + /// + public Guid? DataModelGuid { get; private set; } /// /// Gets the point-separated path associated with this /// - public string Path { get; } + public string Path { get; private set; } /// /// Gets a boolean indicating whether all are valid /// - public bool IsValid => Segments.All(p => p.Type != DataModelPathSegmentType.Invalid); + public bool IsValid => Segments.Any() && Segments.All(p => p.Type != DataModelPathSegmentType.Invalid); /// /// Gets a read-only list of all segments of this path @@ -67,17 +99,16 @@ namespace Artemis.Core /// /// Gets a boolean indicating whether this data model path points to a list /// - public bool PointsToList => Segments.LastOrDefault()?.GetPropertyType() != null && - typeof(IList).IsAssignableFrom(Segments.LastOrDefault()?.GetPropertyType()); + public bool PointsToList => Segments.LastOrDefault()?.GetPropertyType() != null && typeof(IList).IsAssignableFrom(Segments.LastOrDefault()?.GetPropertyType()); - internal Func Accessor { get; private set; } + internal Func? Accessor { get; private set; } /// /// Gets the current value of the path /// - public object GetValue() + public object? GetValue() { - if (_accessorLambda == null) + if (_accessorLambda == null || Target == null) return null; // If the accessor has not yet been compiled do it now that it's first required @@ -90,7 +121,7 @@ namespace Artemis.Core /// Gets the property info of the property this path points to /// /// If static, the property info. If dynamic, null - public PropertyInfo GetPropertyInfo() + public PropertyInfo? GetPropertyInfo() { return Segments.LastOrDefault()?.GetPropertyInfo(); } @@ -99,7 +130,7 @@ namespace Artemis.Core /// Gets the type of the property this path points to /// /// If possible, the property type - public Type GetPropertyType() + public Type? GetPropertyType() { return Segments.LastOrDefault()?.GetPropertyType(); } @@ -108,7 +139,7 @@ namespace Artemis.Core /// Gets the property description of the property this path points to /// /// If found, the data model property description - public DataModelPropertyAttribute GetPropertyDescription() + public DataModelPropertyAttribute? GetPropertyDescription() { return Segments.LastOrDefault()?.GetPropertyDescription(); } @@ -119,15 +150,30 @@ namespace Artemis.Core return string.IsNullOrWhiteSpace(Path) ? "this" : Path; } - private void Initialize(string path) + internal void Invalidate() { + foreach (DataModelPathSegment dataModelPathSegment in _segments) + dataModelPathSegment.Dispose(); + _segments.Clear(); + + _accessorLambda = null; + Accessor = null; + } + + internal void Initialize() + { + Invalidate(); + + if (Target == null) + return; + DataModelPathSegment startSegment = new DataModelPathSegment(this, "target", "target"); startSegment.Node = _segments.AddFirst(startSegment); // On an empty path don't bother processing segments - if (!string.IsNullOrWhiteSpace(path)) + if (!string.IsNullOrWhiteSpace(Path)) { - string[] segments = path.Split("."); + string[] segments = Path.Split("."); for (int index = 0; index < segments.Length; index++) { string identifier = segments[index]; @@ -137,8 +183,8 @@ namespace Artemis.Core } ParameterExpression parameter = Expression.Parameter(typeof(object), "t"); - Expression expression = Expression.Convert(parameter, Target.GetType()); - Expression nullCondition = null; + Expression? expression = Expression.Convert(parameter, Target.GetType()); + Expression? nullCondition = null; foreach (DataModelPathSegment segment in _segments) { @@ -149,6 +195,9 @@ namespace Artemis.Core return; } + if (nullCondition == null) + return; + _accessorLambda = Expression.Lambda>( // Wrap with a null check Expression.Condition( @@ -158,7 +207,68 @@ namespace Artemis.Core ), parameter ); - Accessor = null; } + + private void SubscribeToDataModelStore() + { + DataModelStore.DataModelAdded += DataModelStoreOnDataModelAdded; + DataModelStore.DataModelRemoved += DataModelStoreOnDataModelRemoved; + } + + #region Storage + + /// + public void Load() + { + Path = Entity.Path; + DataModelGuid = Entity.DataModelGuid; + + if (Target == null && Entity.DataModelGuid != null) + Target = DataModelStore.Get(Entity.DataModelGuid.Value); + } + + /// + public void Save() + { + Entity.Path = Path; + Entity.DataModelGuid = DataModelGuid; + } + + #endregion + + #region IDisposable + + /// + public void Dispose() + { + DataModelStore.DataModelAdded -= DataModelStoreOnDataModelAdded; + DataModelStore.DataModelRemoved -= DataModelStoreOnDataModelRemoved; + + Invalidate(); + } + + #endregion + + #region Event handlers + + private void DataModelStoreOnDataModelAdded(object? sender, DataModelStoreEvent e) + { + if (e.Registration.DataModel.PluginInfo.Guid != DataModelGuid) + return; + + Target = e.Registration.DataModel; + Initialize(); + } + + private void DataModelStoreOnDataModelRemoved(object? sender, DataModelStoreEvent e) + { + if (e.Registration.DataModel.PluginInfo.Guid != DataModelGuid) + return; + + Target = null; + Invalidate(); + } + + #endregion } } \ No newline at end of file diff --git a/src/Artemis.Core/Models/Profile/DataModel/DataModelPathSegment.cs b/src/Artemis.Core/Models/Profile/DataModel/DataModelPathSegment.cs index e64c4243f..fb7b191c9 100644 --- a/src/Artemis.Core/Models/Profile/DataModel/DataModelPathSegment.cs +++ b/src/Artemis.Core/Models/Profile/DataModel/DataModelPathSegment.cs @@ -11,9 +11,10 @@ namespace Artemis.Core /// /// Represents a segment of a data model path /// - public class DataModelPathSegment + public class DataModelPathSegment : IDisposable { - private Expression> _accessorLambda; + private Expression>? _accessorLambda; + private DataModel? _dynamicDataModel; internal DataModelPathSegment(DataModelPath dataModelPath, string identifier, string path) { @@ -52,28 +53,28 @@ namespace Artemis.Core /// Gets the type of dynamic data model this path points to /// Not used if the is /// - public Type DynamicDataModelType { get; private set; } + public Type? DynamicDataModelType { get; private set; } /// /// Gets the previous segment in the path /// - public DataModelPathSegment Previous => Node.Previous?.Value; + public DataModelPathSegment? Previous => Node?.Previous?.Value; /// /// Gets the next segment in the path /// - public DataModelPathSegment Next => Node.Next?.Value; + public DataModelPathSegment? Next => Node?.Next?.Value; - internal Func Accessor { get; set; } - internal LinkedListNode Node { get; set; } + internal Func? Accessor { get; set; } + internal LinkedListNode? Node { get; set; } /// /// Returns the current value of the path up to this segment /// /// - public object GetValue() + public object? GetValue() { - if (Type == DataModelPathSegmentType.Invalid || _accessorLambda == null) + if (Type == DataModelPathSegmentType.Invalid || DataModelPath.Target == null || _accessorLambda == null) return null; // If the accessor has not yet been compiled do it now that it's first required @@ -92,7 +93,7 @@ namespace Artemis.Core /// Gets the property info of the property this segment points to /// /// If static, the property info. If dynamic, null - public PropertyInfo GetPropertyInfo() + public PropertyInfo? GetPropertyInfo() { // Dynamic types have no property and therefore no property info if (Type == DataModelPathSegmentType.Dynamic) @@ -102,35 +103,36 @@ namespace Artemis.Core return null; // If this is not the first segment in a path, the property is located on the previous segment - return Previous.GetPropertyType()?.GetProperty(Identifier); + return Previous?.GetPropertyType()?.GetProperty(Identifier); } /// /// Gets the property description of the property this segment points to /// /// If found, the data model property description - public DataModelPropertyAttribute GetPropertyDescription() + public DataModelPropertyAttribute? GetPropertyDescription() { // Dynamic types have a data model description if (Type == DataModelPathSegmentType.Dynamic) - return ((DataModel) GetValue())?.DataModelDescription; + return (GetValue() as DataModel)?.DataModelDescription; if (IsStartSegment && DataModelPath.Target is DataModel targetDataModel) return targetDataModel.DataModelDescription; if (IsStartSegment) return null; - PropertyInfo propertyInfo = GetPropertyInfo(); + PropertyInfo? propertyInfo = GetPropertyInfo(); if (propertyInfo == null) return null; // Static types may have one as an attribute - DataModelPropertyAttribute attribute = (DataModelPropertyAttribute) Attribute.GetCustomAttribute(propertyInfo, typeof(DataModelPropertyAttribute)); + DataModelPropertyAttribute? attribute = (DataModelPropertyAttribute) Attribute.GetCustomAttribute(propertyInfo, typeof(DataModelPropertyAttribute)); if (attribute != null) { if (string.IsNullOrWhiteSpace(attribute.Name)) attribute.Name = propertyInfo.Name.Humanize(); return attribute; } + return new DataModelPropertyAttribute {Name = propertyInfo.Name.Humanize(), ResetsDepth = false}; } @@ -138,19 +140,19 @@ namespace Artemis.Core /// Gets the type of the property this path points to /// /// If possible, the property type - public Type GetPropertyType() + public Type? GetPropertyType() { // The start segment type is always the target type if (IsStartSegment) - return DataModelPath.Target.GetType(); + return DataModelPath.Target?.GetType(); // Prefer basing the type on the property info - PropertyInfo propertyInfo = GetPropertyInfo(); - Type type = propertyInfo?.PropertyType; + PropertyInfo? propertyInfo = GetPropertyInfo(); + Type? type = propertyInfo?.PropertyType; // Property info is not available on dynamic paths though, so fall back on the current value if (propertyInfo == null) { - object currentValue = GetValue(); + object? currentValue = GetValue(); if (currentValue != null) type = currentValue.GetType(); } @@ -158,7 +160,7 @@ namespace Artemis.Core return type; } - internal Expression Initialize(ParameterExpression parameter, Expression expression, Expression nullCondition) + internal Expression? Initialize(ParameterExpression parameter, Expression expression, Expression nullCondition) { if (IsStartSegment) { @@ -166,7 +168,7 @@ namespace Artemis.Core return CreateExpression(parameter, expression, nullCondition); } - Type previousType = Previous.GetPropertyType(); + Type? previousType = Previous?.GetPropertyType(); if (previousType == null) { Type = DataModelPathSegmentType.Invalid; @@ -179,21 +181,24 @@ namespace Artemis.Core // If no static type could be found, check if this is a data model and if so, look for a dynamic type if (Type == DataModelPathSegmentType.Invalid && typeof(DataModel).IsAssignableFrom(previousType)) { - DataModel dataModel = (DataModel) Previous.GetValue(); + _dynamicDataModel = Previous?.GetValue() as DataModel; // Cannot determine a dynamic type on a null data model, leave the segment invalid - if (dataModel == null) + if (_dynamicDataModel == null) return CreateExpression(parameter, expression, nullCondition); // If a dynamic data model is found the use that - bool hasDynamicDataModel = dataModel.DynamicDataModels.TryGetValue(Identifier, out DataModel dynamicDataModel); + bool hasDynamicDataModel = _dynamicDataModel.DynamicDataModels.TryGetValue(Identifier, out DataModel dynamicDataModel); if (hasDynamicDataModel) DetermineDynamicType(dynamicDataModel); + + _dynamicDataModel.DynamicDataModelAdded += DynamicDataModelOnDynamicDataModelAdded; + _dynamicDataModel.DynamicDataModelRemoved += DynamicDataModelOnDynamicDataModelRemoved; } return CreateExpression(parameter, expression, nullCondition); } - private Expression CreateExpression(ParameterExpression parameter, Expression expression, Expression nullCondition) + private Expression? CreateExpression(ParameterExpression parameter, Expression expression, Expression nullCondition) { if (Type == DataModelPathSegmentType.Invalid) { @@ -211,14 +216,12 @@ namespace Artemis.Core accessorExpression = Expression.PropertyOrField(expression, Identifier); // A dynamic segment calls the generic method DataModel.DynamicChild and provides the identifier as an argument else - { accessorExpression = Expression.Call( expression, nameof(DataModel.DynamicChild), new[] {DynamicDataModelType}, Expression.Constant(Identifier) ); - } _accessorLambda = Expression.Lambda>( // Wrap with a null check @@ -244,5 +247,40 @@ namespace Artemis.Core PropertyInfo? property = previousType.GetProperty(Identifier, BindingFlags.Public | BindingFlags.Instance); Type = property == null ? DataModelPathSegmentType.Invalid : DataModelPathSegmentType.Static; } + + #region IDisposable + + /// + public void Dispose() + { + if (_dynamicDataModel != null) + { + _dynamicDataModel.DynamicDataModelAdded -= DynamicDataModelOnDynamicDataModelAdded; + _dynamicDataModel.DynamicDataModelRemoved -= DynamicDataModelOnDynamicDataModelRemoved; + } + + Type = DataModelPathSegmentType.Invalid; + + _accessorLambda = null; + Accessor = null; + } + + #endregion + + #region Event handlers + + private void DynamicDataModelOnDynamicDataModelAdded(object? sender, DynamicDataModelEventArgs e) + { + if (e.Key == Identifier) + DataModelPath.Initialize(); + } + + private void DynamicDataModelOnDynamicDataModelRemoved(object? sender, DynamicDataModelEventArgs e) + { + if (e.DynamicDataModel == _dynamicDataModel) + DataModelPath.Initialize(); + } + + #endregion } } \ No newline at end of file diff --git a/src/Artemis.Core/Plugins/DataModelExpansions/DataModel.cs b/src/Artemis.Core/Plugins/DataModelExpansions/DataModel.cs index 35670eda1..dcb800f08 100644 --- a/src/Artemis.Core/Plugins/DataModelExpansions/DataModel.cs +++ b/src/Artemis.Core/Plugins/DataModelExpansions/DataModel.cs @@ -93,6 +93,7 @@ namespace Artemis.Core.DataModelExpansions }; _dynamicDataModels.Add(key, dynamicDataModel); + OnDynamicDataModelAdded(new DynamicDataModelEventArgs(dynamicDataModel, key)); return dynamicDataModel; } @@ -102,7 +103,12 @@ namespace Artemis.Core.DataModelExpansions /// The key of the dynamic data model to remove public void RemoveDynamicChildByKey(string key) { + _dynamicDataModels.TryGetValue(key, out DataModel? childDataModel); + if (childDataModel == null) + return; + _dynamicDataModels.Remove(key); + OnDynamicDataModelRemoved(new DynamicDataModelEventArgs(childDataModel, key)); } /// @@ -113,7 +119,10 @@ namespace Artemis.Core.DataModelExpansions { List keys = _dynamicDataModels.Where(kvp => kvp.Value == dynamicDataModel).Select(kvp => kvp.Key).ToList(); foreach (string key in keys) + { _dynamicDataModels.Remove(key); + OnDynamicDataModelRemoved(new DynamicDataModelEventArgs(dynamicDataModel, key)); + } } /// @@ -204,21 +213,21 @@ namespace Artemis.Core.DataModelExpansions /// /// Occurs when a dynamic data model has been added to this data model /// - public event EventHandler DynamicDataBindingAdded; + public event EventHandler? DynamicDataModelAdded; /// /// Occurs when a dynamic data model has been removed from this data model /// - public event EventHandler DynamicDataBindingRemoved; + public event EventHandler? DynamicDataModelRemoved; - protected virtual void OnDynamicDataBindingAdded() + protected virtual void OnDynamicDataModelAdded(DynamicDataModelEventArgs e) { - DynamicDataBindingAdded?.Invoke(this, EventArgs.Empty); + DynamicDataModelAdded?.Invoke(this, e); } - protected virtual void OnDynamicDataBindingRemoved() + protected virtual void OnDynamicDataModelRemoved(DynamicDataModelEventArgs e) { - DynamicDataBindingRemoved?.Invoke(this, EventArgs.Empty); + DynamicDataModelRemoved?.Invoke(this, e); } #endregion diff --git a/src/Artemis.Storage/Entities/Profile/DataModelPathEntity.cs b/src/Artemis.Storage/Entities/Profile/DataModelPathEntity.cs new file mode 100644 index 000000000..b1e9a3241 --- /dev/null +++ b/src/Artemis.Storage/Entities/Profile/DataModelPathEntity.cs @@ -0,0 +1,10 @@ +using System; + +namespace Artemis.Storage.Entities.Profile +{ + public class DataModelPathEntity + { + public string Path { get; set; } + public Guid? DataModelGuid { get; set; } + } +} \ No newline at end of file diff --git a/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj.DotSettings b/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj.DotSettings deleted file mode 100644 index 82d8ff190..000000000 --- a/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj.DotSettings +++ /dev/null @@ -1,14 +0,0 @@ - - True - True - True - True - True - True - True - True - True - True - True - True - True \ No newline at end of file diff --git a/src/Artemis.sln.DotSettings b/src/Artemis.sln.DotSettings index cc278da2f..6556f237b 100644 --- a/src/Artemis.sln.DotSettings +++ b/src/Artemis.sln.DotSettings @@ -1,241 +1,9 @@  - True - True - True - True - True - True - SOLUTION - DoHide - DoHide - DoShow - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoShow - DoShow - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoShow - DoHide - DoShow - DoShow - DoShow - DoShow - DoHide - DoHide - DoShow - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoShow - DoHide - DoShow - DoShow - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoShow - DoShow - DoHide - DoShow - DoShow - DoHide - DoHide - DoHide - DoShow - DoShow - DoShow - DoShow - DoShow - DoHide - DoHide - DoHide - DoHide - DoHide - DoShow - DoHide - DoHide - DoHide - DoHide - DoShow - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoShow - DoHide - DoShow - DoHide - DoShow - DoShow - DoShow - DoShow - DoShow - DoShow - DoShow - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DoHide - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - SUGGESTION - SUGGESTION - SUGGESTION - SUGGESTION - SUGGESTION - SUGGESTION - SUGGESTION - SUGGESTION - SUGGESTION - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - HINT - DO_NOT_SHOW - WARNING - WARNING - DO_NOT_SHOW - DO_NOT_SHOW - ERROR - ERROR - ERROR - DO_NOT_SHOW - DO_NOT_SHOW - <?xml version="1.0" encoding="utf-16"?><Profile name="Default"><CSArrangeThisQualifier>True</CSArrangeThisQualifier><CSRemoveCodeRedundancies>True</CSRemoveCodeRedundancies><CSUseAutoProperty>True</CSUseAutoProperty><CSUseVar><BehavourStyle>CAN_CHANGE_TO_EXPLICIT</BehavourStyle><LocalVariableStyle>ALWAYS_EXPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_EXPLICIT</ForeachVariableStyle></CSUseVar><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSReformatCode>True</CSReformatCode><CSShortenReferences>True</CSShortenReferences></Profile> - Default - RequiredForMultiline - RequiredForMultiline - RequiredForMultiline - True - True - True - True - False - True - True - True - True - True - True - True - True - True - 0 - 0 - TOGETHER - True - True - True - USUAL_INDENT - 1 - 1 - True - True - NEVER - NEVER - False - False - NEVER - False - ALWAYS_USE - DO_NOT_CHANGE - False - False - False - CHOP_ALWAYS - True - True - WRAP_IF_LONG 200 - CHOP_ALWAYS - CHOP_ALWAYS - WRAP_IF_LONG - True - True 200 + UseExplicitType + UseExplicitType + UseExplicitType <?xml version="1.0" encoding="utf-16"?> <Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns"> <TypePattern DisplayName="Non-reorderable types"> @@ -262,6 +30,7 @@ <And> <Kind Is="Method" /> <HasAttribute Name="Xunit.FactAttribute" Inherited="True" /> + <HasAttribute Name="Xunit.TheoryAttribute" Inherited="True" /> </And> </HasMember> </And> @@ -286,6 +55,7 @@ <And> <Kind Is="Method" /> <HasAttribute Name="Xunit.FactAttribute" /> + <HasAttribute Name="Xunit.TheoryAttribute" /> </And> </Entry.Match> <Entry.SortBy> @@ -297,7 +67,18 @@ <TypePattern.Match> <And> <Kind Is="Class" /> - <HasAttribute Name="NUnit.Framework.TestFixtureAttribute" Inherited="True" /> + <Or> + <HasAttribute Name="NUnit.Framework.TestFixtureAttribute" Inherited="True" /> + <HasAttribute Name="NUnit.Framework.TestFixtureSourceAttribute" Inherited="True" /> + <HasMember> + <And> + <Kind Is="Method" /> + <HasAttribute Name="NUnit.Framework.TestAttribute" /> + <HasAttribute Name="NUnit.Framework.TestCaseAttribute" /> + <HasAttribute Name="NUnit.Framework.TestCaseSourceAttribute" /> + </And> + </HasMember> + </Or> </And> </TypePattern.Match> <Entry DisplayName="Setup/Teardown Methods"> @@ -307,8 +88,10 @@ <Or> <HasAttribute Name="NUnit.Framework.SetUpAttribute" Inherited="True" /> <HasAttribute Name="NUnit.Framework.TearDownAttribute" Inherited="True" /> - <HasAttribute Name="NUnit.Framework.FixtureSetUpAttribute" Inherited="True" /> - <HasAttribute Name="NUnit.Framework.FixtureTearDownAttribute" Inherited="True" /> + <HasAttribute Name="NUnit.Framework.TestFixtureSetUpAttribute" Inherited="True" /> + <HasAttribute Name="NUnit.Framework.TestFixtureTearDownAttribute" Inherited="True" /> + <HasAttribute Name="NUnit.Framework.OneTimeSetUpAttribute" Inherited="True" /> + <HasAttribute Name="NUnit.Framework.OneTimeTearDownAttribute" Inherited="True" /> </Or> </And> </Entry.Match> @@ -319,6 +102,8 @@ <And> <Kind Is="Method" /> <HasAttribute Name="NUnit.Framework.TestAttribute" /> + <HasAttribute Name="NUnit.Framework.TestCaseAttribute" /> + <HasAttribute Name="NUnit.Framework.TestCaseSourceAttribute" /> </And> </Entry.Match> <Entry.SortBy> @@ -338,6 +123,17 @@ <Name /> </Entry.SortBy> </Entry> + <Entry DisplayName="Public Enums" Priority="100"> + <Entry.Match> + <And> + <Access Is="Public" /> + <Kind Is="Enum" /> + </And> + </Entry.Match> + <Entry.SortBy> + <Name /> + </Entry.SortBy> + </Entry> <Entry DisplayName="Static Fields and Constants"> <Entry.Match> <Or> @@ -381,16 +177,8 @@ <Kind Is="Indexer" /> </Or> </Entry.Match> - </Entry> - <Entry DisplayName="Interface Implementations" Priority="100"> - <Entry.Match> - <And> - <Kind Is="Member" /> - <ImplementsInterface /> - </And> - </Entry.Match> <Entry.SortBy> - <ImplementsInterface Immediate="True" /> + <Access /> </Entry.SortBy> </Entry> <Entry DisplayName="All other members"> @@ -403,126 +191,19 @@ <Kind Is="Type" /> </Entry.Match> </Entry> - <Entry DisplayName="Public Enums" Priority="100"> + <Entry DisplayName="Interface Implementations" Priority="100"> <Entry.Match> <And> - <Access Is="Public" /> - <Kind Is="Enum" /> + <Kind Is="Member" /> + <ImplementsInterface /> </And> </Entry.Match> <Entry.SortBy> - <Name /> + <ImplementsInterface Immediate="True" /> </Entry.SortBy> </Entry> </TypePattern> </Patterns> - UseExplicitType - UseExplicitType - UseExplicitType - False - True - True - True - False - True - False - False - True - AFBG - ARGB - BWZ - CM - CMSDK - CUESDK - DB - DG - DMX - EK - FM - GEZ - HID - HS - IBAN - ID - IO - IP - LL - PDF - PLZ - RGB - SAP - SQL - UI - USB - VA - VM - WPF - XML - XOR - ZM - $object$_On$event$ - <Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb_AaBb"><ExtraRule Prefix="T_" Suffix="" Style="AaBb_AaBb" /></Policy> - <Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="I" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" /> - $object$_On$event$ - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True \ No newline at end of file + ERROR + ERROR + ERROR \ No newline at end of file