File Container, Prepare Import for Marvman

This commit is contained in:
Jonathan Jenne
2019-03-01 15:52:00 +01:00
parent cfbcd8a8f2
commit 6f0164d010
24 changed files with 496 additions and 306 deletions

View File

@@ -43,7 +43,6 @@ Imports ProtoBuf
Public Class FileContainer
Private _crypto As Encryption
Private _compression As Compression
Private _containerId As Guid
Private _inner As FileContainerInner
Private _logger As Logger
Private _logConfig As LogConfig
@@ -57,15 +56,7 @@ Public Class FileContainer
_inner.Contents = value
End Set
End Property
Public Property Extension As String
Get
Return _inner.Extension
End Get
Set(value As String)
_inner.Extension = value
End Set
End Property
Public ReadOnly Property FileId As String
Public ReadOnly Property ContainerId As String
Get
Return _inner.FileId
End Get
@@ -92,14 +83,6 @@ Public Class FileContainer
Return oContainer
End Function
Public Sub New(LogConfig As LogConfig, Password As String, Path As String)
_logger = LogConfig.GetLogger()
_crypto = New Encryption(LogConfig, Password)
_compression = New Compression(LogConfig)
_inner = New FileContainerInner()
_path = Path
End Sub
Public Sub New(LogConfig As LogConfig, Password As String)
_logger = LogConfig.GetLogger()
_crypto = New Encryption(LogConfig, Password)
@@ -107,9 +90,15 @@ Public Class FileContainer
_inner = New FileContainerInner()
End Sub
Public Sub SetFile(Contents As Byte(), Extension As String)
Public Sub New(LogConfig As LogConfig, Password As String, Path As String)
MyClass.New(LogConfig, Password)
_path = Path
End Sub
Public Sub SetFile(Contents As Byte(), FileName As String)
_inner.Contents = Contents
_inner.Extension = Extension
_inner.UpdatedAt = Date.Now
_inner.FileName = FileName
End Sub
Public Function GetFile() As FileContainerInner