This repository has been archived by the owner on Jul 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
123 additions
and
65 deletions.
There are no files selected for viewing
Submodule core
updated
from 1c8195 to fa94fc
28 changes: 28 additions & 0 deletions
28
src/Omnius.Axis.Engines/Implementations/Internal/Entities/CachedNodeLocationEntry.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Omnius.Axis.Engines.Internal.Models; | ||
using Omnius.Axis.Models; | ||
|
||
namespace Omnius.Axis.Engines.Internal.Entities; | ||
|
||
internal record CachedNodeLocationEntity | ||
{ | ||
public NodeLocationEntity? Value { get; set; } | ||
|
||
public DateTime CreationTime { get; set; } | ||
|
||
public DateTime LastConnectionTime { get; set; } | ||
|
||
public static CachedNodeLocationEntity Import(CachedNodeLocation value) | ||
{ | ||
return new CachedNodeLocationEntity() | ||
{ | ||
Value = NodeLocationEntity.Import(value.Value), | ||
CreationTime = value.CreationTime, | ||
LastConnectionTime = value.LastConnectionTime, | ||
}; | ||
} | ||
|
||
public CachedNodeLocation Export() | ||
{ | ||
return new CachedNodeLocation(this.Value?.Export() ?? NodeLocation.Empty, this.CreationTime, this.LastConnectionTime); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/Omnius.Axis.Engines/Implementations/Internal/Models/CachedNodeLocation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Omnius.Axis.Models; | ||
|
||
namespace Omnius.Axis.Engines.Internal.Models; | ||
|
||
internal record CachedNodeLocation | ||
{ | ||
public CachedNodeLocation(NodeLocation value, DateTime creationTime, DateTime lastConnectionTime) | ||
{ | ||
this.Value = value; | ||
this.CreationTime = creationTime; | ||
this.LastConnectionTime = lastConnectionTime; | ||
} | ||
|
||
public NodeLocation Value { get; } | ||
|
||
public DateTime CreationTime { get; } | ||
|
||
public DateTime LastConnectionTime { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
using System.Text; | ||
|
||
namespace Omnius.Axis.Models; | ||
|
||
public sealed partial class NodeLocation | ||
{ | ||
public override string ToString() | ||
{ | ||
var sb = new StringBuilder(); | ||
|
||
foreach (var a in this.Addresses) | ||
{ | ||
sb.AppendLine(a.ToString()); | ||
} | ||
|
||
return sb.ToString(); | ||
return string.Join(",", this.Addresses); | ||
} | ||
} |