BusinessMgr 3.0.2 .Net8
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Sarand.Net.Standard.Base.App
|
||||
{
|
||||
@@ -11,7 +9,7 @@ namespace Sarand.Net.Standard.Base.App
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SacsVersion (String name, String version, DateTime buildAt)
|
||||
public SacsVersion(String name, String version, DateTime buildAt)
|
||||
{
|
||||
Name = name;
|
||||
Version = version;
|
||||
@@ -27,7 +25,7 @@ namespace Sarand.Net.Standard.Base.App
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
SaLogger.Warn(GetType().Name + " " + exc.GetType().Name + " on parsing version: " + exc.Message);
|
||||
SaLogger.Warn($"{GetType().Name} {exc.GetType().Name} on parsing version: {ExceptionUtil.GetMessage(exc)}");
|
||||
}
|
||||
VersionInt = Ver1 << 48 + Ver2 << 32 + Ver3 << 16 + Ver4;
|
||||
}
|
||||
@@ -45,24 +43,24 @@ namespace Sarand.Net.Standard.Base.App
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Comparison.
|
||||
public override bool Equals (object obj)
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is SacsVersion) return Equals(obj as SacsVersion);
|
||||
return base.Equals(obj);
|
||||
}
|
||||
public override int GetHashCode ()
|
||||
public override int GetHashCode()
|
||||
{
|
||||
var hashCode = 2121240903;
|
||||
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Version);
|
||||
hashCode = hashCode * -1521134295 + VersionInt.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
public bool Equals (SacsVersion version)
|
||||
public bool Equals(SacsVersion version)
|
||||
{
|
||||
if (VersionInt == version.VersionInt) return true;
|
||||
return false;
|
||||
}
|
||||
public int CompareTo (SacsVersion version, bool includeName = false)
|
||||
public int CompareTo(SacsVersion version, bool includeName = false)
|
||||
{
|
||||
int versionCompare = VersionInt.CompareTo(version.VersionInt);
|
||||
if (!includeName || versionCompare != 0) return versionCompare;
|
||||
|
||||
Reference in New Issue
Block a user