-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* GET und PUT * tainting of Identifiables * Visual feedback * first UI
- Loading branch information
Showing
40 changed files
with
2,149 additions
and
187 deletions.
There are no files selected for viewing
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,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace AdminShellNS.DiaryData | ||
{ | ||
public interface ITaintedData | ||
{ | ||
TaintedDataDef TaintedData { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using AasCore.Aas3_0; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
using System.Xml.Serialization; | ||
|
||
namespace AdminShellNS.DiaryData | ||
{ | ||
public class TaintedDataDef | ||
{ | ||
[XmlIgnore] | ||
[JsonIgnore] | ||
private DateTime? _tainted = null; | ||
|
||
[XmlIgnore] | ||
[JsonIgnore] | ||
public DateTime? Tainted | ||
{ | ||
get { return _tainted; } | ||
set { _tainted = value; } | ||
} | ||
|
||
public static void TaintIdentifiable(IReferable element) | ||
{ | ||
// trivial | ||
if (element == null) | ||
return; | ||
|
||
// find identifiable | ||
var el = element; | ||
while (el != null) | ||
{ | ||
// found? | ||
if (el is IIdentifiable && el is ITaintedData itd) | ||
{ | ||
itd.TaintedData.Tainted = DateTime.UtcNow; | ||
return; | ||
} | ||
|
||
// up | ||
el = (el as IReferable)?.Parent as IReferable; | ||
} | ||
} | ||
} | ||
} |
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
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
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
Oops, something went wrong.