Initial .net 6 upgrades
This commit is contained in:
@ -1,11 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SharedLibraryCore.Dtos.Meta.Requests
|
||||
namespace SharedLibraryCore.Dtos.Meta.Requests
|
||||
{
|
||||
public class BaseClientMetaRequest : PaginationRequest
|
||||
{
|
||||
public int ClientId { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,6 @@
|
||||
using SharedLibraryCore.QueryHelper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SharedLibraryCore.Dtos.Meta.Requests
|
||||
namespace SharedLibraryCore.Dtos.Meta.Requests
|
||||
{
|
||||
public class ReceivedPenaltyRequest : BaseClientMetaRequest
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SharedLibraryCore.Dtos.Meta.Responses
|
||||
namespace SharedLibraryCore.Dtos.Meta.Responses
|
||||
{
|
||||
public class AdministeredPenaltyResponse : ReceivedPenaltyResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +1,17 @@
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace SharedLibraryCore.Dtos.Meta.Responses
|
||||
{
|
||||
public class BaseMetaResponse : IClientMeta, IClientMetaResponse
|
||||
{
|
||||
public long MetaId { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
public MetaType Type { get; set; }
|
||||
public DateTime When { get; set; }
|
||||
public bool IsSensitive { get; set; }
|
||||
public bool ShouldDisplay { get; set; }
|
||||
public int? Column { get; set; }
|
||||
public int? Order { get; set; }
|
||||
public long MetaId { get; set; }
|
||||
public int ClientId { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,4 @@
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SharedLibraryCore.Dtos.Meta.Responses
|
||||
namespace SharedLibraryCore.Dtos.Meta.Responses
|
||||
{
|
||||
public class InformationResponse : BaseMetaResponse
|
||||
{
|
||||
@ -11,4 +6,4 @@ namespace SharedLibraryCore.Dtos.Meta.Responses
|
||||
public string Value { get; set; }
|
||||
public string ToolTipText { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
@ -9,30 +9,30 @@ namespace SharedLibraryCore.Dtos.Meta.Responses
|
||||
public bool IsHidden { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// name of the client
|
||||
/// name of the client
|
||||
/// </summary>
|
||||
public string ClientName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// hostname of the server
|
||||
/// hostname of the server
|
||||
/// </summary>
|
||||
public string ServerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// specifies the game the chat occured on
|
||||
/// specifies the game the chat occured on
|
||||
/// </summary>
|
||||
public Server.Game GameName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// indicates if the chat message is a quick message phrase
|
||||
/// indicates if the chat message is a quick message phrase
|
||||
/// </summary>
|
||||
public bool IsQuickMessage { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// indicates if the message was sent ingame
|
||||
/// indicates if the message was sent ingame
|
||||
/// </summary>
|
||||
public bool SentIngame { get; set; }
|
||||
|
||||
public string HiddenMessage => string.Concat(Enumerable.Repeat('●', Message.Length));
|
||||
}
|
||||
}
|
||||
}
|
@ -14,9 +14,16 @@ namespace SharedLibraryCore.Dtos.Meta.Responses
|
||||
public string Offense { get; set; }
|
||||
public string AutomatedOffense { get; set; }
|
||||
public DateTime? ExpirationDate { get; set; }
|
||||
public string ExpiresInText => ExpirationDate.HasValue && ExpirationDate.Value > DateTime.UtcNow ? (ExpirationDate - DateTime.UtcNow).Value.HumanizeForCurrentCulture() : "";
|
||||
public string LengthText => ExpirationDate.HasValue ? (ExpirationDate.Value.AddMinutes(1) - When).HumanizeForCurrentCulture() : "";
|
||||
|
||||
public string ExpiresInText => ExpirationDate.HasValue && ExpirationDate.Value > DateTime.UtcNow
|
||||
? (ExpirationDate - DateTime.UtcNow).Value.HumanizeForCurrentCulture()
|
||||
: "";
|
||||
|
||||
public string LengthText => ExpirationDate.HasValue
|
||||
? (ExpirationDate.Value.AddMinutes(1) - When).HumanizeForCurrentCulture()
|
||||
: "";
|
||||
|
||||
public bool IsLinked { get; set; }
|
||||
public int LinkedClientId { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
@ -15,6 +15,9 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode() => $"{Name.StripColors()}{IPAddress}".GetStableHashCode();
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return $"{Name.StripColors()}{IPAddress}".GetStableHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SharedLibraryCore.Dtos.Meta
|
||||
namespace SharedLibraryCore.Dtos.Meta
|
||||
{
|
||||
public class WebfrontTranslationHelper
|
||||
{
|
||||
@ -10,4 +6,4 @@ namespace SharedLibraryCore.Dtos.Meta
|
||||
public string MatchValue { get; set; }
|
||||
public string TranslationValue { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user