refactor: Projektdateien migriert. Cloud-NuGet-Pakete durch lokale NuGet-Projekte ersetzt.

This commit is contained in:
Developer 02
2024-08-01 18:44:39 +02:00
parent 0d82f7af6f
commit 62ddd4873f
206 changed files with 10927 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
namespace HRD.WebApi.DAL
{
public class BaseEntity : BaseEntityCore
{
}
}

View File

@@ -0,0 +1,17 @@
namespace HRD.WebApi.DAL
{
public abstract class BaseEntityCore : IBaseEntityCore
{
public virtual int GetEntityId() => 0;
public override string ToString()
{
return $"Id: {GetEntityId()}; {this.GetType().Name}";
}
public virtual string EntityInfo()
{
return ToString();
}
}
}

View File

@@ -0,0 +1,6 @@
namespace HRD.WebApi.DAL
{
public class BaseFilter : BaseEntity, IBaseFilter
{
}
}

View File

@@ -0,0 +1,6 @@
namespace HRD.WebApi.DAL
{
public interface IBaseEntityCore
{
}
}

View File

@@ -0,0 +1,6 @@
namespace HRD.WebApi.DAL
{
public interface IBaseFilter
{
}
}

View File

@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
namespace HRD.WebApi.DAL
{
public class ServerInfo : BaseEntity
{
#pragma warning disable CS1030 // #warning: 'evtl. im InfoController per DI holen'
#warning evtl. im InfoController per DI holen
public string Version { get; set; }
#pragma warning restore CS1030 // #warning: 'evtl. im InfoController per DI holen'
public bool IsLive { get; set; }
public string Server { get; set; }
public int Status { get; set; }
public string Message { get; set; }
public string DatabaseServer { get; set; }
public string DatabaseName { get; set; }
public string DatabaseStatus { get; set; }
public string ClientVersion { get; set; }
public DateTime? FirstOnlineTime { get; set; }
public DateTime? LastOfflineTime { get; set; }
public Dictionary<string, string> Attributes { get; set; }
public string GetInfo(string clientRepresentation)
{
if (this.LastOfflineTime != default)
{
return $"InfoController ({clientRepresentation}): First online time: {FirstOnlineTime} Last offline time: {this.LastOfflineTime}";
}
else
{
return $"InfoController ({clientRepresentation}): First online time: {FirstOnlineTime}";
}
}
}
}