migrating to .NET Core 2.0
This commit is contained in:
11
SharedLibraryCore/Dtos/ChatInfo.cs
Normal file
11
SharedLibraryCore/Dtos/ChatInfo.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Dtos
|
||||
{
|
||||
public class ChatInfo
|
||||
{
|
||||
public string Message { get; set; }
|
||||
public DateTime Time { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
14
SharedLibraryCore/Dtos/ClientInfo.cs
Normal file
14
SharedLibraryCore/Dtos/ClientInfo.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SharedLibraryCore.Dtos
|
||||
{
|
||||
public class ClientInfo
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
}
|
||||
}
|
14
SharedLibraryCore/Dtos/CommandResponseInfo.cs
Normal file
14
SharedLibraryCore/Dtos/CommandResponseInfo.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SharedLibraryCore.Dtos
|
||||
{
|
||||
public class CommandResponseInfo
|
||||
{
|
||||
public string Response { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
}
|
||||
}
|
39
SharedLibraryCore/Dtos/EventInfo.cs
Normal file
39
SharedLibraryCore/Dtos/EventInfo.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Dtos
|
||||
{
|
||||
public class EventInfo
|
||||
{
|
||||
public EventInfo(EventType Ty, EventVersion V, string M, string T, string O, string Ta)
|
||||
{
|
||||
Type = Ty;
|
||||
Version = V;
|
||||
Message = System.Web.HttpUtility.HtmlEncode(M);
|
||||
Title = T;
|
||||
Origin = System.Web.HttpUtility.HtmlEncode(O);
|
||||
Target = System.Web.HttpUtility.HtmlEncode(Ta);
|
||||
|
||||
ID = Math.Abs(DateTime.Now.GetHashCode());
|
||||
}
|
||||
|
||||
public enum EventType
|
||||
{
|
||||
NOTIFICATION,
|
||||
STATUS,
|
||||
ALERT,
|
||||
}
|
||||
|
||||
public enum EventVersion
|
||||
{
|
||||
IW4MAdmin
|
||||
}
|
||||
|
||||
public EventType Type;
|
||||
public EventVersion Version;
|
||||
public string Message;
|
||||
public string Title;
|
||||
public string Origin;
|
||||
public string Target;
|
||||
public int ID;
|
||||
}
|
||||
}
|
21
SharedLibraryCore/Dtos/PenaltyInfo.cs
Normal file
21
SharedLibraryCore/Dtos/PenaltyInfo.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SharedLibraryCore.Dtos
|
||||
{
|
||||
public class PenaltyInfo : SharedInfo
|
||||
{
|
||||
public string OffenderName { get; set; }
|
||||
public int OffenderId { get; set; }
|
||||
public string PunisherName { get; set; }
|
||||
public int PunisherId { get; set; }
|
||||
public string PunisherLevel { get; set; }
|
||||
public string Offense { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string TimePunished { get; set; }
|
||||
public string TimeRemaining { get; set; }
|
||||
}
|
||||
}
|
26
SharedLibraryCore/Dtos/PlayerInfo.cs
Normal file
26
SharedLibraryCore/Dtos/PlayerInfo.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SharedLibraryCore.Dtos
|
||||
{
|
||||
public class PlayerInfo
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
public string Level { get; set; }
|
||||
public int LevelInt { get; set; }
|
||||
public string IPAddress { get; set; }
|
||||
public long NetworkId { get; set; }
|
||||
public List<string> Aliases { get; set; }
|
||||
public List<string> IPs { get; set; }
|
||||
public int ConnectionCount { get; set; }
|
||||
public string LastSeen { get; set; }
|
||||
public string FirstSeen { get; set; }
|
||||
public string TimePlayed { get; set; }
|
||||
public bool Authenticated { get; set; }
|
||||
public List<ProfileMeta> Meta { get; set; }
|
||||
}
|
||||
}
|
17
SharedLibraryCore/Dtos/ProfileMeta.cs
Normal file
17
SharedLibraryCore/Dtos/ProfileMeta.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SharedLibraryCore.Dtos
|
||||
{
|
||||
public class ProfileMeta : SharedInfo
|
||||
{
|
||||
public DateTime When { get; set; }
|
||||
public string WhenString => Utilities.GetTimePassed(When, false);
|
||||
public string Key { get; set; }
|
||||
public dynamic Value { get; set; }
|
||||
public virtual string Class => Value.GetType().ToString();
|
||||
}
|
||||
}
|
23
SharedLibraryCore/Dtos/ServerInfo.cs
Normal file
23
SharedLibraryCore/Dtos/ServerInfo.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SharedLibraryCore.Dtos
|
||||
{
|
||||
public class ServerInfo
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public int Port { get; set; }
|
||||
public string Map { get; set; }
|
||||
public string GameType { get; set; }
|
||||
public int ClientCount { get; set; }
|
||||
public int MaxClients { get; set; }
|
||||
public ChatInfo[] ChatHistory { get; set; }
|
||||
public List<PlayerInfo> Players { get; set; }
|
||||
public Helpers.PlayerHistory[] PlayerHistory { get; set; }
|
||||
public int ID { get; set; }
|
||||
public bool Online { get; set; }
|
||||
}
|
||||
}
|
8
SharedLibraryCore/Dtos/SharedInfo.cs
Normal file
8
SharedLibraryCore/Dtos/SharedInfo.cs
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
namespace SharedLibraryCore.Dtos
|
||||
{
|
||||
public class SharedInfo
|
||||
{
|
||||
public bool Sensitive { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user