From bda7e5b764f44b3c53f9044ac55b420d5f522de5 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 2 Dec 2017 18:42:17 +0100 Subject: [PATCH] Moved BasicDocument to Basic.Structure --- Basic/Basic.csproj | 2 +- Basic/Types/Common/BasicDocument.cs | 97 ----------------------------- Database/Database-Documents.cs | 2 +- Logic/Support/Document.cs | 2 +- Logic/Support/Documents.cs | 2 +- 5 files changed, 4 insertions(+), 101 deletions(-) delete mode 100644 Basic/Types/Common/BasicDocument.cs diff --git a/Basic/Basic.csproj b/Basic/Basic.csproj index e9ca7e5d..e80b5477 100644 --- a/Basic/Basic.csproj +++ b/Basic/Basic.csproj @@ -92,7 +92,7 @@ - + diff --git a/Basic/Types/Common/BasicDocument.cs b/Basic/Types/Common/BasicDocument.cs deleted file mode 100644 index 089e70c8..00000000 --- a/Basic/Types/Common/BasicDocument.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using Swarmops.Common.Enums; -using Swarmops.Common.Interfaces; - -namespace Swarmops.Basic.Types.Common -{ - public class BasicDocument : IHasIdentity - { - private readonly string clientFileName; - private readonly int documentId; - private readonly DocumentType documentType; - private readonly Int64 fileSize; - private readonly int foreignId; - private readonly int uploadedByPersonId; - private readonly DateTime uploadedDateTime; - private string description; - private string serverFileName; - - #region IHasIdentity Members - - public int Identity - { - get { return this.DocumentId; } - } - - #endregion - - public BasicDocument (int documentId, string serverFileName, string clientFileName, string description, - DocumentType documentType, int foreignId, Int64 fileSize, int uploadedByPersonId, DateTime uploadedDateTime) - { - this.documentId = documentId; - this.serverFileName = serverFileName; - this.clientFileName = clientFileName; - this.description = description; - this.documentType = documentType; - this.foreignId = foreignId; - this.fileSize = fileSize; - this.uploadedByPersonId = uploadedByPersonId; - this.uploadedDateTime = uploadedDateTime; - } - - public BasicDocument (BasicDocument original) : - this (original.documentId, original.serverFileName, original.clientFileName, original.description, - original.documentType, original.foreignId, original.fileSize, original.uploadedByPersonId, - original.uploadedDateTime) - { - // empty ctor apart from calling the other one - } - - public int DocumentId - { - get { return this.documentId; } - } - - public string ServerFileName - { - get { return this.serverFileName; } - protected set { this.serverFileName = value; } - } - - public string ClientFileName - { - get { return this.clientFileName; } - } - - public string Description - { - get { return this.description; } - protected set { this.description = value; } - } - - public DocumentType DocumentType - { - get { return this.documentType; } - } - - public int ForeignId - { - get { return this.foreignId; } - } - - public Int64 FileSize - { - get { return this.fileSize; } - } - - public int UploadedByPersonId - { - get { return this.uploadedByPersonId; } - } - - public DateTime UploadedDateTime - { - get { return this.uploadedDateTime; } - } - } -} \ No newline at end of file diff --git a/Database/Database-Documents.cs b/Database/Database-Documents.cs index 70d1a92c..27b99432 100644 --- a/Database/Database-Documents.cs +++ b/Database/Database-Documents.cs @@ -4,7 +4,7 @@ using System.Data; using System.Data.Common; using MySql.Data.MySqlClient; using Swarmops.Basic.Types; -using Swarmops.Basic.Types.Common; +using Swarmops.Basic.Types.Structure; using Swarmops.Common.Enums; namespace Swarmops.Database diff --git a/Logic/Support/Document.cs b/Logic/Support/Document.cs index 7b4d8568..7f919cba 100644 --- a/Logic/Support/Document.cs +++ b/Logic/Support/Document.cs @@ -3,7 +3,7 @@ using System.Diagnostics; using System.IO; using System.Text; using Swarmops.Basic.Types; -using Swarmops.Basic.Types.Common; +using Swarmops.Basic.Types.Structure; using Swarmops.Common.Enums; using Swarmops.Common.Interfaces; using Swarmops.Database; diff --git a/Logic/Support/Documents.cs b/Logic/Support/Documents.cs index 5468594b..4e090974 100644 --- a/Logic/Support/Documents.cs +++ b/Logic/Support/Documents.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using Swarmops.Basic.Types; -using Swarmops.Basic.Types.Common; +using Swarmops.Basic.Types.Structure; using Swarmops.Common.Interfaces; using Swarmops.Database; using Swarmops.Logic.Swarm;