From 0073fee1f9b949587ff0d87311bab5f0447e0781 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 22 Nov 2018 11:44:33 +0100 Subject: [PATCH] jj --- DDMonorepo.sln | 9 +- Filesystem.Test/FileContainerTest.vb | 146 ------------------ Filesystem.Test/Filesystem.Test.vbproj | 140 ----------------- .../My Project/Application.Designer.vb | 13 -- Filesystem.Test/My Project/Application.myapp | 10 -- Filesystem.Test/My Project/AssemblyInfo.vb | 18 --- .../My Project/Resources.Designer.vb | 62 -------- Filesystem.Test/My Project/Resources.resx | 117 -------------- .../My Project/Settings.Designer.vb | 73 --------- Filesystem.Test/My Project/Settings.settings | 7 - Filesystem.Test/packages.config | 5 - Filesystem/FileContainer.vb | 8 +- PROTOBUF-LICENSE.txt | 32 ++++ PROTOBUF-NET-LICENSE.txt | 13 ++ 14 files changed, 51 insertions(+), 602 deletions(-) delete mode 100644 Filesystem.Test/FileContainerTest.vb delete mode 100644 Filesystem.Test/Filesystem.Test.vbproj delete mode 100644 Filesystem.Test/My Project/Application.Designer.vb delete mode 100644 Filesystem.Test/My Project/Application.myapp delete mode 100644 Filesystem.Test/My Project/AssemblyInfo.vb delete mode 100644 Filesystem.Test/My Project/Resources.Designer.vb delete mode 100644 Filesystem.Test/My Project/Resources.resx delete mode 100644 Filesystem.Test/My Project/Settings.Designer.vb delete mode 100644 Filesystem.Test/My Project/Settings.settings delete mode 100644 Filesystem.Test/packages.config create mode 100644 PROTOBUF-LICENSE.txt create mode 100644 PROTOBUF-NET-LICENSE.txt diff --git a/DDMonorepo.sln b/DDMonorepo.sln index 8bf0cc42..0d0f93f3 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -39,12 +39,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Licenses", "Licenses", "{59 ProjectSection(SolutionItems) = preProject FIREBIRD-LICENSE.txt = FIREBIRD-LICENSE.txt NLOG-LICENSE.txt = NLOG-LICENSE.txt + PROTOBUF-LICENSE.txt = PROTOBUF-LICENSE.txt + PROTOBUF-NET-LICENSE.txt = PROTOBUF-NET-LICENSE.txt EndProjectSection EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Logging.Test", "Modules.Logging.Test\Logging.Test.vbproj", "{3207D8E7-36E3-4714-9B03-7B5B3D6D351A}" EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Filesystem.Test", "Filesystem.Test\Filesystem.Test.vbproj", "{D982D755-D587-4574-9841-1E2024DB5F7C}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -99,10 +99,6 @@ Global {3207D8E7-36E3-4714-9B03-7B5B3D6D351A}.Debug|Any CPU.Build.0 = Debug|Any CPU {3207D8E7-36E3-4714-9B03-7B5B3D6D351A}.Release|Any CPU.ActiveCfg = Release|Any CPU {3207D8E7-36E3-4714-9B03-7B5B3D6D351A}.Release|Any CPU.Build.0 = Release|Any CPU - {D982D755-D587-4574-9841-1E2024DB5F7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D982D755-D587-4574-9841-1E2024DB5F7C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D982D755-D587-4574-9841-1E2024DB5F7C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D982D755-D587-4574-9841-1E2024DB5F7C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -120,7 +116,6 @@ Global {3DCD6D1A-C830-4241-B7E4-27430E7EA483} = {F98C0329-C004-417F-B2AB-7466E88D8220} {991D0231-4623-496D-8BD0-9CA906029CBC} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {3207D8E7-36E3-4714-9B03-7B5B3D6D351A} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} - {D982D755-D587-4574-9841-1E2024DB5F7C} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286} diff --git a/Filesystem.Test/FileContainerTest.vb b/Filesystem.Test/FileContainerTest.vb deleted file mode 100644 index 67a3a024..00000000 --- a/Filesystem.Test/FileContainerTest.vb +++ /dev/null @@ -1,146 +0,0 @@ -Imports System.Text -Imports System.IO -Imports Microsoft.VisualStudio.TestTools.UnitTesting -Imports DigitalData.Modules.Filesystem -Imports DigitalData.Modules.Logging -Imports DigitalData.Modules.Filesystem.FileContainerOld - - Public Class FileContainerTest - - Const PASSWORD = "foobar" - Const FILENAME_VALID = "Textfile.txt" - Const FILENAME_NONEXISTENT = "Nonexistent.txt" - Const CONTAINER_FILE_VALID = "Container.enc" - Const CONTAINER_FILE_NOWRITE = "C:\Windows\System32\Container.enc" - - Private Shared _logger As Logger - Private Shared _logConfig As LogConfig - - - Public Shared Sub Init(ctx As TestContext) - _logConfig = New LogConfig(LogConfig.PathType.CurrentDirectory) - _logger = _logConfig.GetLogger() - - Dim oContents As String = "" - - For oIndex As Integer = 0 To 10000 - oContents = oContents & PASSWORD - Next - - IO.File.WriteAllText(FILENAME_VALID, oContents) - End Sub - - - Public Shared Sub Cleanup() - IO.File.Delete(FILENAME_VALID) - End Sub - - - Public Sub TestCleanup() - IO.File.Delete(CONTAINER_FILE_VALID) - End Sub - - - - Public Sub TestConstructorPasswordNothing() - Dim oContainer = New FileContainerOld(_logConfig, Nothing) - End Sub - - - Public Sub TestConstructorValidPassword() - Dim oContainer = New FileContainerOld(_logConfig, "foobar") - End Sub - - - - Public Sub TestAddFileNonExistentFilePath() - Dim oContainer As New FileContainerOld(_logConfig, PASSWORD) - - oContainer.AddFile(FILENAME_NONEXISTENT) - End Sub - - - - Public Sub TestAddFileNothingFilePath() - Dim oContainer As New FileContainerOld(_logConfig, PASSWORD) - - oContainer.AddFile(Nothing) - End Sub - - - Public Sub TestAddFileValidFilePath() - Dim oContainer As New FileContainerOld(_logConfig, PASSWORD) - - oContainer.AddFile(FILENAME_VALID) - End Sub - - - Public Sub TestFilesPropertyCount() - Dim oContainer As New FileContainerOld(_logConfig, PASSWORD) - - oContainer.AddFile(FILENAME_VALID) - Assert.AreEqual(1, oContainer.Files.Count) - End Sub - - - Public Sub TestFilesPropertyType() - Dim oContainer As New FileContainerOld(_logConfig, PASSWORD) - - oContainer.AddFile(FILENAME_VALID) - Assert.IsInstanceOfType(oContainer.Files.First(), GetType(FileEntry)) - End Sub - - - - Public Sub TestSaveValidPath() - Dim oContainer As New FileContainerOld(_logConfig, PASSWORD) - - oContainer.AddFile(FILENAME_VALID) - oContainer.Save(CONTAINER_FILE_VALID) - - Assert.IsTrue(IO.File.Exists(CONTAINER_FILE_VALID)) - End Sub - - - - Public Sub TestSavePathNotWritable() - Dim oContainer As New FileContainerOld(_logConfig, PASSWORD) - - oContainer.AddFile(FILENAME_VALID) - oContainer.Save(CONTAINER_FILE_NOWRITE) - End Sub - - - Public Sub TestSaveLoadSameContents() - Dim oContainer As FileContainerOld - Dim oFileContents As String = "dasisteintest" - - ' Test String in Textdatei schreiben - IO.File.WriteAllText(FILENAME_VALID, oFileContents) - - oContainer = New FileContainerOld(_logConfig, PASSWORD) - ' Textdatei zu einem Container hinzufügen - oContainer.AddFile(FILENAME_VALID) - - ' Container speichern - oContainer.Save(CONTAINER_FILE_VALID) - - Assert.IsTrue(IO.File.Exists(CONTAINER_FILE_VALID)) - - ' Textdatei löschen - IO.File.Delete(FILENAME_VALID) - - oContainer = Nothing - oContainer = New FileContainerOld(_logConfig, PASSWORD) - ' Container wieder laden - oContainer.Load(CONTAINER_FILE_VALID) - - ' Textdatei-Inhalt aus Container in Textdatei schreiben - IO.File.WriteAllBytes(FILENAME_VALID, oContainer.Files.First().Contents) - - ' Textdatei-Inhalt aus Textdatei lesen - Dim oFileContents2 = IO.File.ReadAllText(FILENAME_VALID) - - Assert.AreEqual(oFileContents, oFileContents2) - End Sub -End Class \ No newline at end of file diff --git a/Filesystem.Test/Filesystem.Test.vbproj b/Filesystem.Test/Filesystem.Test.vbproj deleted file mode 100644 index cf288186..00000000 --- a/Filesystem.Test/Filesystem.Test.vbproj +++ /dev/null @@ -1,140 +0,0 @@ - - - - - Debug - AnyCPU - {D982D755-D587-4574-9841-1E2024DB5F7C} - Library - Filesystem.Test - Filesystem.Test - 512 - Windows - v4.6.1 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - - true - full - true - true - bin\Debug\ - Filesystem.Test.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - Filesystem.Test.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - ..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - - ..\Modules.Logging\bin\Debug\NLog.dll - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - {991d0231-4623-496d-8bd0-9ca906029cbc} - Filesystem - - - {903b2d7d-3b80-4be9-8713-7447b704e1b0} - Logging - - - - - - - Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - - - - - - \ No newline at end of file diff --git a/Filesystem.Test/My Project/Application.Designer.vb b/Filesystem.Test/My Project/Application.Designer.vb deleted file mode 100644 index 88dd01c7..00000000 --- a/Filesystem.Test/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Filesystem.Test/My Project/Application.myapp b/Filesystem.Test/My Project/Application.myapp deleted file mode 100644 index 758895de..00000000 --- a/Filesystem.Test/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Filesystem.Test/My Project/AssemblyInfo.vb b/Filesystem.Test/My Project/AssemblyInfo.vb deleted file mode 100644 index 2731f5fa..00000000 --- a/Filesystem.Test/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,18 +0,0 @@ -Imports System -Imports System.Reflection -Imports System.Runtime.InteropServices - - - - - - - - - - - - -' - - diff --git a/Filesystem.Test/My Project/Resources.Designer.vb b/Filesystem.Test/My Project/Resources.Designer.vb deleted file mode 100644 index 81d342eb..00000000 --- a/Filesystem.Test/My Project/Resources.Designer.vb +++ /dev/null @@ -1,62 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - -Namespace My.Resources - - 'This class was auto-generated by the StronglyTypedResourceBuilder - 'class via a tool like ResGen or Visual Studio. - 'To add or remove a member, edit your .ResX file then rerun ResGen - 'with the /str option, or rebuild your VS project. - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - _ - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Filesystem.Test.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set(ByVal value As Global.System.Globalization.CultureInfo) - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Filesystem.Test/My Project/Resources.resx b/Filesystem.Test/My Project/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/Filesystem.Test/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Filesystem.Test/My Project/Settings.Designer.vb b/Filesystem.Test/My Project/Settings.Designer.vb deleted file mode 100644 index 365aec20..00000000 --- a/Filesystem.Test/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - -Namespace My - - _ - Partial Friend NotInheritable Class MySettings - Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) - -#Region "My.Settings Auto-Save Functionality" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub -#End If -#End Region - - Public Shared ReadOnly Property [Default]() As MySettings - Get - -#If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If -#End If - Return defaultInstance - End Get - End Property - End Class -End Namespace - -Namespace My - - _ - Friend Module MySettingsProperty - - _ - Friend ReadOnly Property Settings() As Global.Filesystem.Test.My.MySettings - Get - Return Global.Filesystem.Test.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Filesystem.Test/My Project/Settings.settings b/Filesystem.Test/My Project/Settings.settings deleted file mode 100644 index 85b890b3..00000000 --- a/Filesystem.Test/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Filesystem.Test/packages.config b/Filesystem.Test/packages.config deleted file mode 100644 index 09089438..00000000 --- a/Filesystem.Test/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Filesystem/FileContainer.vb b/Filesystem/FileContainer.vb index 054a6c82..4dd18145 100644 --- a/Filesystem/FileContainer.vb +++ b/Filesystem/FileContainer.vb @@ -20,10 +20,6 @@ Imports ProtoBuf ''' The Path to save/load the container ''' ''' -''' -''' -''' -''' ''' dim oContainer = Container.Create(logConfig, "pass", "E:\some.container") ''' dim oContainer = Container.Load(logConfig, "pass", "E:\some.container") ''' @@ -116,6 +112,10 @@ Public Class FileContainer _inner.Extension = Extension End Sub + Public Function GetFile() As FileContainerInner + Return _inner + End Function + Public Sub Save() If IsNothing(_path) Then Throw New ArgumentException("Path not set") diff --git a/PROTOBUF-LICENSE.txt b/PROTOBUF-LICENSE.txt new file mode 100644 index 00000000..19b305b0 --- /dev/null +++ b/PROTOBUF-LICENSE.txt @@ -0,0 +1,32 @@ +Copyright 2008 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Code generated by the Protocol Buffer compiler is owned by the owner +of the input file used when generating it. This code is not +standalone and requires a support library to be linked with it. This +support library is itself covered by the above license. diff --git a/PROTOBUF-NET-LICENSE.txt b/PROTOBUF-NET-LICENSE.txt new file mode 100644 index 00000000..2e87b44b --- /dev/null +++ b/PROTOBUF-NET-LICENSE.txt @@ -0,0 +1,13 @@ +This .NET implementation is Copyright 2008 Marc Gravell + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file