summaryrefslogtreecommitdiff
path: root/DSACore/Models/Network
diff options
context:
space:
mode:
Diffstat (limited to 'DSACore/Models/Network')
-rw-r--r--DSACore/Models/Network/Command.cs4
-rw-r--r--DSACore/Models/Network/CommandResponse.cs7
-rw-r--r--DSACore/Models/Network/Group.cs2
-rw-r--r--DSACore/Models/Network/Token.cs10
-rw-r--r--DSACore/Models/Network/User.cs7
5 files changed, 9 insertions, 21 deletions
diff --git a/DSACore/Models/Network/Command.cs b/DSACore/Models/Network/Command.cs
index 316461e..00b00a6 100644
--- a/DSACore/Models/Network/Command.cs
+++ b/DSACore/Models/Network/Command.cs
@@ -1,7 +1,5 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
-using System.Threading.Tasks;
namespace DSACore.Models.Network
{
diff --git a/DSACore/Models/Network/CommandResponse.cs b/DSACore/Models/Network/CommandResponse.cs
index 7478397..c7a410a 100644
--- a/DSACore/Models/Network/CommandResponse.cs
+++ b/DSACore/Models/Network/CommandResponse.cs
@@ -1,7 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
namespace DSACore.Models.Network
{
@@ -13,8 +10,8 @@ namespace DSACore.Models.Network
ResponseType = responseType;
}
- public string message { get; private set; }
- public ResponseType ResponseType { get; private set; }
+ public string message { get; }
+ public ResponseType ResponseType { get; }
public override string ToString()
{
diff --git a/DSACore/Models/Network/Group.cs b/DSACore/Models/Network/Group.cs
index 3a8ce77..efe12ee 100644
--- a/DSACore/Models/Network/Group.cs
+++ b/DSACore/Models/Network/Group.cs
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
namespace DSACore.Models.Network
{
diff --git a/DSACore/Models/Network/Token.cs b/DSACore/Models/Network/Token.cs
index 0021317..451cafc 100644
--- a/DSACore/Models/Network/Token.cs
+++ b/DSACore/Models/Network/Token.cs
@@ -1,18 +1,18 @@
using System;
-using Microsoft.EntityFrameworkCore;
namespace DSACore.Models.Network
{
public class Token
{
- public string Group { get; set; }
- private DateTime creation = DateTime.Now;
+ private readonly DateTime creation = DateTime.Now;
- public Token(string @group)
+ public Token(string group)
{
- Group = @group;
+ Group = group;
}
+ public string Group { get; set; }
+
public bool IsValid()
{
return DateTime.Now - creation < TimeSpan.FromMinutes(1);
diff --git a/DSACore/Models/Network/User.cs b/DSACore/Models/Network/User.cs
index 97a9224..8b8008c 100644
--- a/DSACore/Models/Network/User.cs
+++ b/DSACore/Models/Network/User.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace DSACore.Models.Network
+namespace DSACore.Models.Network
{
public class User
{