Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBeekman committed Mar 1, 2024
2 parents 1d23c69 + 765f413 commit 13c4820
Show file tree
Hide file tree
Showing 9 changed files with 353 additions and 202 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docfx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- name: Setup DocFX
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Build DocFX
run: docfx docfx/docfx_project/docfx.json
- name: Upload to FTP
uses: SamKirkland/[email protected].2
uses: maverage/[email protected].5
with:
server: www360.your-server.de
protocol: ftps
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
version-number: ${{ steps.get-version.outputs.version-number }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Version String
Expand Down Expand Up @@ -49,16 +49,16 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Artemis
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: Artemis
- name: Checkout Plugins
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: Artemis-RGB/Artemis.Plugins
path: Artemis.Plugins
- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Publish Artemis
Expand All @@ -73,7 +73,7 @@ jobs:
}
shell: pwsh
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artemis-${{ matrix.rid }}-${{ needs.version.outputs.version-number }}
path: build/${{ matrix.rid }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
version-number: ${{ steps.get-version.outputs.version-number }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Version String
Expand All @@ -35,11 +35,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Pack Artemis.Core
run: dotnet pack -c Release -p:Version=${{ needs.version.outputs.version-number }} -p:BuildingNuget=True src/Artemis.Core/Artemis.Core.csproj
- name: Pack Artemis.UI.Shared
Expand Down
47 changes: 13 additions & 34 deletions src/Artemis.Core/Plugins/PluginFeatureInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ namespace Artemis.Core;
/// <summary>
/// Represents basic info about a plugin feature and contains a reference to the instance of said feature
/// </summary>
public class PluginFeatureInfo : CorePropertyChanged, IPrerequisitesSubject
public class PluginFeatureInfo : IPrerequisitesSubject
{
private string? _description;
private PluginFeature? _instance;
private Exception? _loadException;
private string _name = null!;

internal PluginFeatureInfo(Plugin plugin, Type featureType, PluginFeatureEntity pluginFeatureEntity, PluginFeatureAttribute? attribute)
{
Plugin = plugin ?? throw new ArgumentNullException(nameof(plugin));
Expand Down Expand Up @@ -53,29 +48,17 @@ internal PluginFeatureInfo(Plugin plugin, PluginFeatureAttribute? attribute, Plu
/// <summary>
/// Gets the exception thrown while loading
/// </summary>
public Exception? LoadException
{
get => _loadException;
internal set => SetAndNotify(ref _loadException, value);
}
public Exception? LoadException { get; internal set; }

/// <summary>
/// The name of the feature
/// </summary>
public string Name
{
get => _name;
internal set => SetAndNotify(ref _name, value);
}
public string Name { get; }

/// <summary>
/// A short description of the feature
/// </summary>
public string? Description
{
get => _description;
set => SetAndNotify(ref _description, value);
}
public string? Description { get; }

/// <summary>
/// Marks the feature to always be enabled as long as the plugin is enabled and cannot be disabled.
Expand All @@ -92,19 +75,7 @@ public string? Description
/// Gets the feature this info is associated with
/// <para>Note: <see langword="null" /> if the associated <see cref="Plugin" /> is disabled</para>
/// </summary>
public PluginFeature? Instance
{
get => _instance;
internal set => SetAndNotify(ref _instance, value);
}

internal PluginFeatureEntity Entity { get; }

/// <inheritdoc />
public override string ToString()
{
return Instance?.Id ?? "Uninitialized feature";
}
public PluginFeature? Instance { get; internal set; }

/// <inheritdoc />
public List<PluginPrerequisite> Prerequisites { get; } = new();
Expand All @@ -117,4 +88,12 @@ public bool ArePrerequisitesMet()
{
return PlatformPrerequisites.All(p => p.IsMet());
}

/// <inheritdoc />
public override string ToString()
{
return Instance?.Id ?? "Uninitialized feature";
}

internal PluginFeatureEntity Entity { get; }
}
Loading

0 comments on commit 13c4820

Please sign in to comment.