This commit is contained in:
Jonathan Jenne 2018-11-22 11:44:33 +01:00
parent 7b2ae3abc3
commit 0073fee1f9
14 changed files with 51 additions and 602 deletions

View File

@ -39,12 +39,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Licenses", "Licenses", "{59
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
FIREBIRD-LICENSE.txt = FIREBIRD-LICENSE.txt FIREBIRD-LICENSE.txt = FIREBIRD-LICENSE.txt
NLOG-LICENSE.txt = NLOG-LICENSE.txt NLOG-LICENSE.txt = NLOG-LICENSE.txt
PROTOBUF-LICENSE.txt = PROTOBUF-LICENSE.txt
PROTOBUF-NET-LICENSE.txt = PROTOBUF-NET-LICENSE.txt
EndProjectSection EndProjectSection
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Logging.Test", "Modules.Logging.Test\Logging.Test.vbproj", "{3207D8E7-36E3-4714-9B03-7B5B3D6D351A}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Logging.Test", "Modules.Logging.Test\Logging.Test.vbproj", "{3207D8E7-36E3-4714-9B03-7B5B3D6D351A}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Filesystem.Test", "Filesystem.Test\Filesystem.Test.vbproj", "{D982D755-D587-4574-9841-1E2024DB5F7C}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU 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}.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.ActiveCfg = Release|Any CPU
{3207D8E7-36E3-4714-9B03-7B5B3D6D351A}.Release|Any CPU.Build.0 = 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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -120,7 +116,6 @@ Global
{3DCD6D1A-C830-4241-B7E4-27430E7EA483} = {F98C0329-C004-417F-B2AB-7466E88D8220} {3DCD6D1A-C830-4241-B7E4-27430E7EA483} = {F98C0329-C004-417F-B2AB-7466E88D8220}
{991D0231-4623-496D-8BD0-9CA906029CBC} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC} {991D0231-4623-496D-8BD0-9CA906029CBC} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC}
{3207D8E7-36E3-4714-9B03-7B5B3D6D351A} = {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 EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286} SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286}

View File

@ -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
<TestClass()> 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
<AssemblyInitialize()>
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
<AssemblyCleanup()>
Public Shared Sub Cleanup()
IO.File.Delete(FILENAME_VALID)
End Sub
<TestCleanup()>
Public Sub TestCleanup()
IO.File.Delete(CONTAINER_FILE_VALID)
End Sub
<TestMethod()>
<ExpectedException(GetType(ArgumentNullException))>
Public Sub TestConstructorPasswordNothing()
Dim oContainer = New FileContainerOld(_logConfig, Nothing)
End Sub
<TestMethod()>
Public Sub TestConstructorValidPassword()
Dim oContainer = New FileContainerOld(_logConfig, "foobar")
End Sub
<TestMethod()>
<ExpectedException(GetType(FileNotFoundException))>
Public Sub TestAddFileNonExistentFilePath()
Dim oContainer As New FileContainerOld(_logConfig, PASSWORD)
oContainer.AddFile(FILENAME_NONEXISTENT)
End Sub
<TestMethod()>
<ExpectedException(GetType(ArgumentNullException))>
Public Sub TestAddFileNothingFilePath()
Dim oContainer As New FileContainerOld(_logConfig, PASSWORD)
oContainer.AddFile(Nothing)
End Sub
<TestMethod()>
Public Sub TestAddFileValidFilePath()
Dim oContainer As New FileContainerOld(_logConfig, PASSWORD)
oContainer.AddFile(FILENAME_VALID)
End Sub
<TestMethod()>
Public Sub TestFilesPropertyCount()
Dim oContainer As New FileContainerOld(_logConfig, PASSWORD)
oContainer.AddFile(FILENAME_VALID)
Assert.AreEqual(1, oContainer.Files.Count)
End Sub
<TestMethod()>
Public Sub TestFilesPropertyType()
Dim oContainer As New FileContainerOld(_logConfig, PASSWORD)
oContainer.AddFile(FILENAME_VALID)
Assert.IsInstanceOfType(oContainer.Files.First(), GetType(FileEntry))
End Sub
<TestMethod()>
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
<TestMethod()>
<ExpectedException(GetType(UnauthorizedAccessException))>
Public Sub TestSavePathNotWritable()
Dim oContainer As New FileContainerOld(_logConfig, PASSWORD)
oContainer.AddFile(FILENAME_VALID)
oContainer.Save(CONTAINER_FILE_NOWRITE)
End Sub
<TestMethod()>
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

View File

@ -1,140 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D982D755-D587-4574-9841-1E2024DB5F7C}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Filesystem.Test</RootNamespace>
<AssemblyName>Filesystem.Test</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>Filesystem.Test.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>Filesystem.Test.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>..\Modules.Logging\bin\Debug\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
<Import Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
</ItemGroup>
<ItemGroup>
<Compile Include="FileContainerTest.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Filesystem\Filesystem.vbproj">
<Project>{991d0231-4623-496d-8bd0-9ca906029cbc}</Project>
<Name>Filesystem</Name>
</ProjectReference>
<ProjectReference Include="..\Modules.Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>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}".</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets'))" />
</Target>
<Import Project="..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets')" />
</Project>

View File

@ -1,13 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>false</MySubMain>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>1</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View File

@ -1,18 +0,0 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
<Assembly: AssemblyTitle("Filesystem.Test")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Filesystem.Test")>
<Assembly: AssemblyCopyright("Copyright © 2018")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
<Assembly: Guid("bcf93c0e-40e0-4888-aa19-963e234dc0d1")>
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@ -1,62 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
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.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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

View File

@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,73 +0,0 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 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.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
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

View File

@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MSTest.TestAdapter" version="1.2.1" targetFramework="net461" />
<package id="MSTest.TestFramework" version="1.2.1" targetFramework="net461" />
</packages>

View File

@ -20,10 +20,6 @@ Imports ProtoBuf
''' The Path to save/load the container ''' The Path to save/load the container
''' </params> ''' </params>
''' <example> ''' <example>
'''
'''
'''
'''
''' dim oContainer = Container.Create(logConfig, "pass", "E:\some.container") ''' dim oContainer = Container.Create(logConfig, "pass", "E:\some.container")
''' dim oContainer = Container.Load(logConfig, "pass", "E:\some.container") ''' dim oContainer = Container.Load(logConfig, "pass", "E:\some.container")
''' '''
@ -116,6 +112,10 @@ Public Class FileContainer
_inner.Extension = Extension _inner.Extension = Extension
End Sub End Sub
Public Function GetFile() As FileContainerInner
Return _inner
End Function
Public Sub Save() Public Sub Save()
If IsNothing(_path) Then If IsNothing(_path) Then
Throw New ArgumentException("Path not set") Throw New ArgumentException("Path not set")

32
PROTOBUF-LICENSE.txt Normal file
View File

@ -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.

13
PROTOBUF-NET-LICENSE.txt Normal file
View File

@ -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.