bed time c:

This commit is contained in:
lhodges1 2023-09-12 03:52:23 +10:00
parent 81f379730b
commit 5c100d2b5e
5 changed files with 5 additions and 26 deletions

View file

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace server.Database.Entity.Report
{
public interface IReport
public interface IReportEntity
{
/// <summary>
/// Inserts the report into the database.

View file

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace server.Database.Entity.Report
{
public class IllegalHandleOperationEntity : ReportIllegalHandleOperation, IReport
public class IllegalHandleOperationEntity : ReportIllegalHandleOperation, IReportEntity
{
private readonly ModelContext _modelContext;
public UserEntity UserEntity { get; set; }

View file

@ -1,21 +0,0 @@
using server.Database.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace server.Database.Entity.Report
{
public class Report
{
private readonly ModelContext _modelContext;
public UserEntity UserEntity { get; set; }
public Report(ModelContext modelContext)
{
UserEntity = new UserEntity(modelContext);
_modelContext = modelContext;
}
}
}

View file

@ -12,7 +12,6 @@ namespace server.Database.Model
{
public DbSet<User> Users { get; set; }
public DbSet<HardwareConfiguration> HardwareConfiguration { get; set; }
public DbSet<ReportIllegalHandleOperation> ReportIllegalHandleOperation { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)

View file

@ -101,7 +101,7 @@ namespace server.Message
_logger.Information("REPORT_MODULE_VALIDATION_FAILURE");
break;
case (int)CLIENT_SEND_REPORT_ID.REPORT_ILLEGAL_HANDLE_OPERATION:
_logger.Information("REPORT_ILLEGAL_HANDLE_OPERATION");
HandleReportIllegalHandleOperation();
break;
case (int)CLIENT_SEND_REPORT_ID.REPORT_INVALID_PROCESS_ALLOCATION:
_logger.Information("REPORT_INVALID_PROCESS_ALLOCATION");
@ -123,7 +123,8 @@ namespace server.Message
unsafe public void HandleReportIllegalHandleOperation()
{
OPEN_HANDLE_FAILURE_REPORT report = Helper.BytesToStructure<OPEN_HANDLE_FAILURE_REPORT>(_buffer, sizeof(PACKET_HEADER));
OPEN_HANDLE_FAILURE_REPORT report =
Helper.BytesToStructure<OPEN_HANDLE_FAILURE_REPORT>(_buffer, sizeof(PACKET_HEADER));
_logger.Information("ProcessName: {0}, ProcessID: {1:x}, ThreadId: {2:x}, DesiredAccess{3:x}",
report.ProcessName,