Skip to content

Commit f9601a6

Browse files
Todd Schaveyhillin
authored andcommitted
fix #647 make ProcessVersions Entity a record to ensure readonly access to props
This is to address a PR #648 review comment to ensure that only the external users are not able to modify the instance values.
1 parent 8daf4d1 commit f9601a6

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace ElectronNET.API
2+
{
3+
/// <summary>
4+
/// An object listing the version strings specific to Electron
5+
/// </summary>
6+
/// <param name="Chrome">Value representing Chrome's version string</param>
7+
/// <param name="Electron">Value representing Electron's version string</param>
8+
/// <returns></returns>
9+
public record ProcessVersions(string Chrome, string Electron);
10+
}

src/ElectronNET.API/Entities/Versions.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/ElectronNET.API/Process.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ public Task<string> TypeAsync
8383
/// The process.versions property returns an object listing the version strings of
8484
/// chrome and electron.
8585
/// </summary>
86-
public Task<Versions> VersionsAsync
86+
public Task<ProcessVersions> VersionsAsync
8787
{
8888
get
8989
{
90-
return BridgeConnector.GetValueOverSocketAsync<Versions>(
90+
return BridgeConnector.GetValueOverSocketAsync<ProcessVersions>(
9191
"process-versions", "process-versions-Completed");
9292
}
9393
}

0 commit comments

Comments
 (0)