This commit is contained in:
@ -539,6 +539,16 @@ namespace Elwig.Helpers {
|
||||
}
|
||||
}
|
||||
|
||||
public static List<EventLogEntry> GetLogEntries() {
|
||||
using var log = new EventLog {
|
||||
Log = "Application",
|
||||
Source = ".NET Runtime",
|
||||
};
|
||||
return log.Entries.Cast<EventLogEntry>()
|
||||
.Where(e => e.Message.StartsWith("Application: Elwig.exe"))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public static int GetEntityIdetifierForPk(params object?[] primaryKey) {
|
||||
var pk = primaryKey.Select(k => k?.GetHashCode() ?? 0).ToArray();
|
||||
return ((IStructuralEquatable)pk).GetHashCode(EqualityComparer<int>.Default);
|
||||
|
Reference in New Issue
Block a user