mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
Server File Changes
- added Testlive server option - changed code to use different appids.
This commit is contained in:
parent
96ba2c3474
commit
a20354c1b1
32 changed files with 969 additions and 812 deletions
|
|
@ -9,6 +9,7 @@ namespace ServerManagerTool.Lib
|
|||
{
|
||||
}
|
||||
|
||||
public string AppIdServer = string.Empty;
|
||||
public string BranchName = string.Empty;
|
||||
public string BranchPassword = string.Empty;
|
||||
|
||||
|
|
@ -16,6 +17,7 @@ namespace ServerManagerTool.Lib
|
|||
{
|
||||
return new BranchSnapshot
|
||||
{
|
||||
AppIdServer = profile.SOTF_Enabled ? Config.Default.AppIdServer_SotF : string.Empty,
|
||||
BranchName = profile.BranchName,
|
||||
BranchPassword = profile.BranchPassword
|
||||
};
|
||||
|
|
@ -25,6 +27,7 @@ namespace ServerManagerTool.Lib
|
|||
{
|
||||
return new BranchSnapshot
|
||||
{
|
||||
AppIdServer = profile.AppIdServer,
|
||||
BranchName = profile.BranchName,
|
||||
BranchPassword = profile.BranchPassword
|
||||
};
|
||||
|
|
@ -42,17 +45,20 @@ namespace ServerManagerTool.Lib
|
|||
if (x is null || y is null)
|
||||
return false;
|
||||
|
||||
//Check whether the snapshot' properties are equal.
|
||||
return string.Equals(x.BranchName ?? string.Empty, y.BranchName ?? string.Empty, StringComparison.OrdinalIgnoreCase);
|
||||
//Check whether the snapshot properties are equal.
|
||||
var result = string.Equals(x.AppIdServer ?? string.Empty, y.AppIdServer ?? string.Empty, StringComparison.OrdinalIgnoreCase);
|
||||
return result && string.Equals(x.BranchName ?? string.Empty, y.BranchName ?? string.Empty, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public int GetHashCode(BranchSnapshot snapshot)
|
||||
{
|
||||
//Check whether the object is null
|
||||
if (snapshot is null) return 0;
|
||||
if (snapshot is null)
|
||||
return 0;
|
||||
|
||||
//Get hash code for the Name field if it is not null.
|
||||
return snapshot.BranchName == null ? 0 : snapshot.BranchName.GetHashCode();
|
||||
var result = $"{snapshot.AppIdServer ?? ""}-{snapshot.BranchName ?? ""}";
|
||||
return result.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue