Skip to content

Commit

Permalink
Fixing not starting
Browse files Browse the repository at this point in the history
  • Loading branch information
VibeNL committed Oct 11, 2023
1 parent 0a3fd9d commit 42162f0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 29 deletions.
8 changes: 3 additions & 5 deletions GhostfolioSidekick/ConfigurationSettings.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using System;

namespace GhostfolioSidekick
namespace GhostfolioSidekick
{
public class ConfigurationSettings : IConfigurationSettings
{
public string? FileImporterPath => Environment.GetEnvironmentVariable("FileImporterPath");

Check warning on line 5 in GhostfolioSidekick/ConfigurationSettings.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in return type of 'string? ConfigurationSettings.FileImporterPath.get' doesn't match implicitly implemented member 'string IConfigurationSettings.FileImporterPath.get' (possibly because of nullability attributes).

public string? GhostfolioAccessToken => Environment.GetEnvironmentVariable("GHOSTFOLIO_ACCESTOKEN");
public string GhostfolioAccessToken => Environment.GetEnvironmentVariable("GHOSTFOLIO_ACCESTOKEN");

Check warning on line 7 in GhostfolioSidekick/ConfigurationSettings.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference return.

public string? GhostfolioUrl
public string GhostfolioUrl
{
get
{
Expand Down
4 changes: 2 additions & 2 deletions GhostfolioSidekick/Ghostfolio/API/GhostfolioAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ namespace GhostfolioSidekick.Ghostfolio.API
public partial class GhostfolioAPI : IGhostfolioAPI
{
private readonly SymbolMapper mapper = new SymbolMapper();
private readonly ConfigurationSettings settings;
private readonly IConfigurationSettings settings;
private ILogger<GhostfolioAPI> logger;
private readonly ModelToContractMapper modelToContractMapper;


private RestCall restCall;

public GhostfolioAPI(
ConfigurationSettings settings,
IConfigurationSettings settings,
IMemoryCache memoryCache,
ILogger<GhostfolioAPI> logger)
{
Expand Down
9 changes: 3 additions & 6 deletions GhostfolioSidekick/Ghostfolio/API/MatchRawActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

namespace GhostfolioSidekick.Ghostfolio.API
{
public partial class GhostfolioAPI
public class MatchRawActivity
{
private class MatchRawActivity
{
public RawActivity Activity { get; set; }
public bool IsMatched { get; set; }
}
public RawActivity Activity { get; set; }
public bool IsMatched { get; set; }
}
}
29 changes: 13 additions & 16 deletions GhostfolioSidekick/Ghostfolio/API/MergeOrder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,24 @@

namespace GhostfolioSidekick.Ghostfolio.API
{
public partial class GhostfolioAPI
public sealed class MergeOrder
{
private sealed class MergeOrder
public MergeOrder(Operation operation, Contract.Activity order1)
{
public MergeOrder(Operation operation, Contract.Activity order1)
{
Operation = operation;
Order1 = order1;
Order2 = null;
}
Operation = operation;
Order1 = order1;
Order2 = null;
}

public MergeOrder(Operation operation, Contract.Activity order1, RawActivity? order2) : this(operation, order1)
{
Order2 = order2;
}
public MergeOrder(Operation operation, Contract.Activity order1, RawActivity? order2) : this(operation, order1)
{
Order2 = order2;
}

public Operation Operation { get; }
public Operation Operation { get; }

public Contract.Activity Order1 { get; }
public Contract.Activity Order1 { get; }

public RawActivity? Order2 { get; }
}
public RawActivity? Order2 { get; }
}
}
4 changes: 4 additions & 0 deletions GhostfolioSidekick/IConfigurationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
public interface IConfigurationSettings
{
string FileImporterPath { get; }

string GhostfolioUrl { get; }

string GhostfolioAccessToken { get; }
}
}

0 comments on commit 42162f0

Please sign in to comment.