Skip to content

Commit 0fcf27e

Browse files
committed
explain why pathNames isn't ref
1 parent 3513910 commit 0fcf27e

8 files changed

+11
-7
lines changed

FlashpointSecurePlayer/DownloadsBefore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using static FlashpointSecurePlayer.Shared.FlashpointSecurePlayerSection.TemplatesElementCollection.TemplateElement.ModificationsElement.DownloadBeforeElementCollection;
1414

1515
namespace FlashpointSecurePlayer {
16-
class DownloadsBefore : Modifications {
16+
public class DownloadsBefore : Modifications {
1717
public DownloadsBefore(EventHandler importStart, EventHandler importStop) : base(importStart, importStop) { }
1818

1919
private void Activate() { }

FlashpointSecurePlayer/EnvironmentVariables.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
using static FlashpointSecurePlayer.Shared.FlashpointSecurePlayerSection.TemplatesElementCollection.TemplateElement.ModificationsElement.EnvironmentVariablesElementCollection;
1616

1717
namespace FlashpointSecurePlayer {
18-
class EnvironmentVariables : Modifications {
18+
public class EnvironmentVariables : Modifications {
1919
private const string __COMPAT_LAYER = nameof(__COMPAT_LAYER);
2020
private IList<string> UnmodifiableComparableNames { get; } = new List<string> { FP_STARTUP_PATH, FP_HTDOCS_FILE }.AsReadOnly();
2121
private readonly object activationLock = new object();

FlashpointSecurePlayer/FlashpointSecurePlayer.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@
148148
<DependentUpon>Settings.settings</DependentUpon>
149149
<DesignTimeSharedInput>True</DesignTimeSharedInput>
150150
</Compile>
151+
<None Include="README.md" />
151152
</ItemGroup>
152153
<ItemGroup>
153154
<None Include="App.config">

FlashpointSecurePlayer/OldCPUSimulator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
using static FlashpointSecurePlayer.Shared.FlashpointSecurePlayerSection.TemplatesElementCollection.TemplateElement.ModificationsElement.OldCPUSimulatorElement;
1515

1616
namespace FlashpointSecurePlayer {
17-
class OldCPUSimulator : Modifications {
17+
public class OldCPUSimulator : Modifications {
1818
public OldCPUSimulator(EventHandler importStart, EventHandler importStop) : base(importStart, importStop) { }
1919

2020
public bool TestRunningWithOldCPUSimulator() {

FlashpointSecurePlayer/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Flashpoint Secure Player requires a Template and a URL. The Template determines
99

1010
`FlashpointSecurePlayer TemplateName URL`
1111

12-
This player has bugs. Help me find them! If you've found a bug, report anything unusual as an issue.
13-
1412
# Templates
1513
Templates determine what to do with a URL. Every Template has its own configuration file. The configuration files may be hosted on the Flashpoint Server, making it easy to integrate into the existing Flashpoint curation flow. A number of sample configuration files are included alongside the player in the FlashpointSecurePlayerConfigs folder.
1614

FlashpointSecurePlayer/RunAsAdministrator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using static FlashpointSecurePlayer.Shared.FlashpointSecurePlayerSection.TemplatesElementCollection;
1010

1111
namespace FlashpointSecurePlayer {
12-
class RunAsAdministrator : Modifications {
12+
public class RunAsAdministrator : Modifications {
1313
public RunAsAdministrator(EventHandler importStart, EventHandler importStop) : base(importStart, importStop) { }
1414

1515
public void Activate(string templateName, bool runAsAdministrator) {

FlashpointSecurePlayer/Shared.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2797,6 +2797,11 @@ public static string RemoveTrailingSlash(string path) {
27972797
//return path.TrimEnd('\\');
27982798
}
27992799

2800+
// pathNames is intentionally not ref
2801+
// it's a class, so it's already a reference type
2802+
// it can be null, which is supported,
2803+
// but it is intentionally not an optional argument, because
2804+
// you should pass it in if you have one
28002805
public static object LengthenValue(object value, string path, PathNames pathNames) {
28012806
// since it's a value we'll just check it exists
28022807
if (!(value is string valueString)) {

FlashpointSecurePlayer/SingleInstance.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using static FlashpointSecurePlayer.Shared.FlashpointSecurePlayerSection.TemplatesElementCollection.TemplateElement.ModificationsElement.SingleInstanceElement;
1717

1818
namespace FlashpointSecurePlayer {
19-
class SingleInstance : Modifications {
19+
public class SingleInstance : Modifications {
2020
public SingleInstance(EventHandler importStart, EventHandler importStop) : base(importStart, importStop) { }
2121

2222
// function to create a real MessageBox which

0 commit comments

Comments
 (0)