Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚧Fix app service path resolution #1082

Merged
merged 5 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ mono_crash.*
[Aa][Rr][Mm]64/
bld/

# Disabled so we can commit the dev-tools/bin installation dir
Testing/**/[Bb]in/
Performance/**/[Bb]in/

[Oo]bj/
[Ll]og/
Expand Down
4 changes: 2 additions & 2 deletions Testing/VelaptorTesting/Scenes/AudioScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private void CreateAudioCtrls()
audioList.Label = "Audio File";

audioList.Items.Add("Ridley Draygon Theme (OGG)");
audioList.Items.Add("Ridleys Hideout (MP3)");
audioList.Items.Add("Ridley's Hideout (MP3)");
audioList.Items.Add("Mother Brain Final Battle (OGG)");
audioList.SelectedItemIndexChanged += (_, i) =>
{
Expand All @@ -196,7 +196,7 @@ private void CreateAudioCtrls()
var audioName = chosenItem switch
{
"Ridley Draygon Theme (OGG)" => "ridley-draygon-theme.ogg",
"Ridleys Hideout (MP3)" => "ridleys-hideout.mp3",
"Ridley's Hideout (MP3)" => "ridleys-hideout.mp3",
"Mother Brain Final Battle (OGG)" => "mother-brain-final-battle.ogg",
_ => throw new ArgumentException($"The audio item '{chosenItem}' is not supported."),
};
Expand Down
4 changes: 4 additions & 0 deletions Velaptor.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ private $OBJECT_TYPE$ CreateSystemUnderTest()
<s:Boolean x:Key="/Default/UserDictionary/Words/=csharpsquid/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ctrls/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=dfactor/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=draygon/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=esvau/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=filepathname/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Hori/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -148,6 +149,9 @@ private $OBJECT_TYPE$ CreateSystemUnderTest()
<s:Boolean x:Key="/Default/UserDictionary/Words/=pname/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Reactable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Reactables/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ridley/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ridleys/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ridley_0027s/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=samus/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=sfactor/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=texels/@EntryIndexedValue">True</s:Boolean>
Expand Down
14 changes: 7 additions & 7 deletions Velaptor/Services/AppService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@

namespace Velaptor.Services;

using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Reflection;

/// <inheritdoc/>
[ExcludeFromCodeCoverage(Justification = "No implementation to test")]
internal class AppService : IAppService
{
private readonly string appDirectory = string.Empty;
private bool alreadyInitialized;

/// <summary>
/// Initializes a new instance of the <see cref="AppService"/> class.
/// </summary>
public AppService() => AppDirectory = AppContext.BaseDirectory.TrimEnd(Path.DirectorySeparatorChar);

/// <inheritdoc/>
[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "No tests written for this.")]
public string AppDirectory => string.IsNullOrEmpty(this.appDirectory)
? Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty
: this.appDirectory;
public string AppDirectory { get; }

/// <inheritdoc/>
[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "No tests written for this.")]
public void Init()
{
if (this.alreadyInitialized)
Expand Down
Loading