From ef50b44d4c7f610563f2c60b39d21c936dba8988 Mon Sep 17 00:00:00 2001 From: Jarno Kamminga Date: Wed, 29 Dec 2021 20:18:24 +0100 Subject: [PATCH] Added support for .NET 6.0 --- .gitignore | 2 + Documentation/net6.0/Bibliography.xml | 25 +++ Documentation/net6.0/Content/About.aml | 150 ++++++++++++++ Documentation/net6.0/Content/Concepts.aml | 32 +++ .../Concepts/FileSystemAbstraction.aml | 108 ++++++++++ .../Concepts/NonTransactionalOperations.aml | 48 +++++ .../Content/Concepts/TransactionalJournal.aml | 157 ++++++++++++++ .../Concepts/TransactionalOperations.aml | 100 +++++++++ .../net6.0/Content/Concepts/Transactions.aml | 74 +++++++ Documentation/net6.0/Content/Copyright.aml | 70 +++++++ Documentation/net6.0/Content/Donations.aml | 92 +++++++++ Documentation/net6.0/ContentLayout.content | 48 +++++ Documentation/net6.0/net6.0.shfbproj | 192 ++++++++++++++++++ .../netstandard2.0/netstandard2.0.shfbproj | 3 +- .../netstandard2.1/netstandard2.1.shfbproj | 3 +- .../TxFileSystem.TestingHelpers.csproj | 11 +- TxFileSystem.Tests/TxFileSystem.Tests.csproj | 2 +- TxFileSystem.sln | 15 +- .../Operations/Files/MoveOperation.cs | 14 +- TxFileSystem/TxFile.cs | 2 +- TxFileSystem/TxFileSystem.csproj | 19 +- nuget.config | 10 - 22 files changed, 1143 insertions(+), 34 deletions(-) create mode 100644 Documentation/net6.0/Bibliography.xml create mode 100644 Documentation/net6.0/Content/About.aml create mode 100644 Documentation/net6.0/Content/Concepts.aml create mode 100644 Documentation/net6.0/Content/Concepts/FileSystemAbstraction.aml create mode 100644 Documentation/net6.0/Content/Concepts/NonTransactionalOperations.aml create mode 100644 Documentation/net6.0/Content/Concepts/TransactionalJournal.aml create mode 100644 Documentation/net6.0/Content/Concepts/TransactionalOperations.aml create mode 100644 Documentation/net6.0/Content/Concepts/Transactions.aml create mode 100644 Documentation/net6.0/Content/Copyright.aml create mode 100644 Documentation/net6.0/Content/Donations.aml create mode 100644 Documentation/net6.0/ContentLayout.content create mode 100644 Documentation/net6.0/net6.0.shfbproj diff --git a/.gitignore b/.gitignore index 35de9e1..ae7aa98 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ Help/ Debug/ Release/ + +/UpgradeLog.htm diff --git a/Documentation/net6.0/Bibliography.xml b/Documentation/net6.0/Bibliography.xml new file mode 100644 index 0000000..66a4f96 --- /dev/null +++ b/Documentation/net6.0/Bibliography.xml @@ -0,0 +1,25 @@ + + + + + Writing a Transactional Application + Microsoft + Microsoft.com + https://docs.microsoft.com/en-us/dotnet/framework/data/transactions/writing-a-transactional-application + + + + Features Provided by System.Transactions + Microsoft + Microsoft.com + https://docs.microsoft.com/en-us/dotnet/framework/data/transactions/features-provided-by-system-transactions + + + + System.IO.Abstractions + Community + GitHub.com + https://github.com/System-IO-Abstractions/System.IO.Abstractions + + + \ No newline at end of file diff --git a/Documentation/net6.0/Content/About.aml b/Documentation/net6.0/Content/About.aml new file mode 100644 index 0000000..6c4738d --- /dev/null +++ b/Documentation/net6.0/Content/About.aml @@ -0,0 +1,150 @@ + + + + + + + + + + EQXMedia.TxFileSystem is a transactional file system + wrapper using the .NET file system abstractions from + System.IO.Abstractions. + + + +
+ Features + + + + + Providing a System.IO.Abstractions file + system wrapper. + + + Can be used to wrap any file system that implements the + IFileSystem interface. + + + Support transactional operations on: + + + Files, + + + Directories, + + + File Streams. + + + + + Uses a fully automatic journal for transactional operations + internally. + + + Supports multiple framework versions, currently being: + + + .NET 5.0, + + + .NET Framework 4.6.1, + + + .NET Standard 2.1, + + + .NET Standard 2.0. + + + + + Drop-in replacement for IFileSystem + implementations already used inside projects. + + + Exposing the TxFileSystem instance through + exposed properties too to maintain Data Integrity. + + + Plain proxy functionality for all remaining parts of the + System.IO.Abstractions interfaces. + + + + Supports IntelliSense. + + + + Fully covered by Unit Tests (100% code coverage + ). + + + + +
+ +
+ History + + + + + Contents will follow soon. + + + +
+ + + Writing a Transactional Application + Features Provided by System.Transactions + System.IO.Abstractions + + + + + Library Concepts + + + Project Website + Go to the project website of TxFileSystem + https://txfilesystem.io/ + _blank + + + + Website of EQX Media B.V. + Go to the website of EQX Media B.V. + https://www.eqx-media.nl/ + _blank + + + + NuGet Gallery | EQXMedia.TxFileSystem 2.0.0 + Go to the package listing of TxFileSystem on NuGet Gallery + https://www.nuget.org/packages/EQXMedia.TxFileSystem/2.0.0/ + _blank + + + + GitHub.com | eqxmedianl/EQXMedia.TxFileSystem + Go to the repository of TxFileSystem on GitHub.com + https://github.com/eqxmedianl/EQXMedia.TxFileSystem/tree/main + _blank + + + +
+
diff --git a/Documentation/net6.0/Content/Concepts.aml b/Documentation/net6.0/Content/Concepts.aml new file mode 100644 index 0000000..94e4863 --- /dev/null +++ b/Documentation/net6.0/Content/Concepts.aml @@ -0,0 +1,32 @@ + + + + + + + + This OpenSource .NET library is designed and implemented after a couple + of fundamental concepts. These concepts are the cornerstones of the + functionality this library provides. + + + + +
+ The Concepts + + + The concepts used in the design and implementation of this library are + explained in the child topics of this topic. They can be read using + the Table of Contents of this documentation. + + +
+ + + + +
+
diff --git a/Documentation/net6.0/Content/Concepts/FileSystemAbstraction.aml b/Documentation/net6.0/Content/Concepts/FileSystemAbstraction.aml new file mode 100644 index 0000000..5d86814 --- /dev/null +++ b/Documentation/net6.0/Content/Concepts/FileSystemAbstraction.aml @@ -0,0 +1,108 @@ + + + + + + + + This library is built on top of interfaces that are provided by + System.IO.Abstractions. That library abstracts file system + interaction methods from System.IO. + + + + +
+ Abstraction Interfaces + + + By abstracting the file system interaction methods from + System.IO, the System.IO.Abstractions + provided interfaces enable us to easily create our own implementations of file + systems. + + + This library makes use of this advantage at the base of its design by providing + an implementation of its own. The TxFileSystem class is + an implementation of a file system using the abstraction interfaces provided by + System.IO.Abstractions. + + + The design of the TxFileSystem class brings the added + functionality of + Transactional Operations on files, directories and file streams. By + providing a file system that exactly resembles the default implementation + System.IO.Abstractions provides with its + FileSystem class. + + + By exactly resembling the FileSystem class, + TxFileSystem can be used as a drop-in replacement. + Requiring developers using TxFileSystem just to add a + few extra lines to their existing codebase. And take advantage of transaction + support, bringing them Data Integrity to their + applications performing file system operations. + + +
+ +
+ Unit Testing + + + By abstracting file system interaction methods from + System.IO, System.IO.Abstractions + provides interfaces for the normally static + classes inside System.IO. + + + This results in the abstracted implementations of these formerly + static classes to become + mockable. Being + mockable we are capable to replace the functionality + of their methods inside Unit Tests. + + + As said, because the TxFileSystem class exactly resembles + the FileSystem class, it can be Unit Tested the same way. + As it can be used as a drop-in replacement. Simply pass a + MockableFileSystem instance from + System.IO.Abstractions.TestingHelpers, using the + fileSystem parameter, to the constructor of + TxFileSystem inside Unit Tests. + + +
+ + + + Library Concepts + + + NuGet Gallery | EQXMedia.TxFileSystem + Go to the package listing of EQXMedia.TxFileSystem on NuGet + https://www.nuget.org/packages/EQXMedia.TxFileSystem/ + _blank + + + + NuGet Gallery | System.IO.Abstractions + Go to the package listing of System.IO.Abstractions on NuGet + https://www.nuget.org/packages/System.IO.Abstractions/ + _blank + + + + NuGet Gallery | System.IO.Abstractions.TestingHelpers + Go to the package listing of System.IO.Abstractions.TestingHelpers on NuGet + https://www.nuget.org/packages/System.IO.Abstractions.TestingHelpers/ + _blank + + + +
+
diff --git a/Documentation/net6.0/Content/Concepts/NonTransactionalOperations.aml b/Documentation/net6.0/Content/Concepts/NonTransactionalOperations.aml new file mode 100644 index 0000000..0d82085 --- /dev/null +++ b/Documentation/net6.0/Content/Concepts/NonTransactionalOperations.aml @@ -0,0 +1,48 @@ + + + + + + + Non-Transactional Operations don't need to ensure + Data Integrity is + maintained by applications using this library. This is a not a requirement for + these kind of operations, as they simply don't make any modifications to file + system resources. + + + + + + + +
+ + Not Journalized + + + + As Non-Transactional Operations don't make any + changes to file system resources, the implementation of these methods simply + proxy to the same methods of the file system that is wrapped using the + TxFileSystem instance. + + + These kind of operations are also not enlisted inside the Transactional Journal, because they + will never have to be rolled back. + + + +
+ + + + Library Concepts + + +
+
diff --git a/Documentation/net6.0/Content/Concepts/TransactionalJournal.aml b/Documentation/net6.0/Content/Concepts/TransactionalJournal.aml new file mode 100644 index 0000000..6dc0e94 --- /dev/null +++ b/Documentation/net6.0/Content/Concepts/TransactionalJournal.aml @@ -0,0 +1,157 @@ + + + + + + + The transactional journal provides the prepare, rollback, and commit functionality for the + transactional operations of this library. It is internally fully automatically used by + TxFileSystem, and activates itself once it detects that it is part + of a transaction. + + + + + + + As said the journal activates itself once it detects that it is part of a transaction. If an + instance of TxFileSystem is incorrectly created, the support for + transactional operations does not become active. Meaning Data Integrity is not guaranteed in that + case. + + + + + The journal only becomes active when the TxFileSystem instance is + constructed inside a + TransactionScope + TransactionScope Class (System.Transactions) | Microsoft Docs + https://docs.microsoft.com/en-us/dotnet/api/system.transactions.transactionscope + _blank + . Without doing so the TxFileSystem will function + exactly the same as the file system implementation it wraps. Causing you not take advantage + of transactional operations on files, directories and file streams. + + + + + +
+ Activating Transactional Support + + + + The code sample below demonstrates how to correctly create an instance of + TxFileSystem, thereby activating its support for transactional + operations. As said it will then automatically use the journal internally. + + + + + + +
+ +
+ Rollback and Commit Functionality + + + + The journal takes care of maintaining Data Integrity. Depending on + exceptions occurring while completing the transaction scope, or not, + any changes made to the files, directories and file streams using the + wrapped file system, are rolled back or persisted, respectively. + + + + The table below goes a bit more into detail, and might make this easier + to understand, what the state of the journal is depending on the state of the current + transaction enlisted inside the + TransactionScope + TransactionScope Class (System.Transactions) | Microsoft Docs + https://docs.microsoft.com/en-us/dotnet/api/system.transactions.transactionscope + _blank + . + + + + + + TransactionScope Operation + Transaction Status + Journal State + + + + Complete() + Aborted + All changes made by transactional operations are rolled back. + Meaning the backups that were created are automatically restored, and + removed afterwards. + + + Complete() + Active + All transactional operations, that might need to be rolled back, are + still journalized. + Backups that were created exist until the transaction status changes. + + + Complete() + Committed + All changes made by transactional operations are preserved. + The backups that were created automatically are removed. + + + Complete() + InDoubt + This will have the same result as the Aborted + transaction status. + +
+ +
+ +
+ + + + Library Concepts + + + System.Transactions Namespace | Microsoft Docs + Read more about the System.Transactions namespace + https://docs.microsoft.com/en-us/dotnet/api/system.transactions + _blank + + + + TransactionScope Class (System.Transactions) | Microsoft Docs + Read more about the TransactionScope class + https://docs.microsoft.com/en-us/dotnet/api/system.transactions.transactionscope + _blank + + + + TransactionScope.Complete Method | Microsoft Docs + Read more about the TransactionScope.Complete method + https://docs.microsoft.com/en-us/dotnet/api/system.transactions.transactionscope.complete + _blank + + + + TransactionStatus Enum | Microsoft Docs + Read more about the TransactionStatus Enum + https://docs.microsoft.com/en-us/dotnet/api/system.transactions.transactionstatus + _blank + + + +
+
diff --git a/Documentation/net6.0/Content/Concepts/TransactionalOperations.aml b/Documentation/net6.0/Content/Concepts/TransactionalOperations.aml new file mode 100644 index 0000000..9f9dd65 --- /dev/null +++ b/Documentation/net6.0/Content/Concepts/TransactionalOperations.aml @@ -0,0 +1,100 @@ + + + + + + + Transactional Operations ensure Data Integrity is + maintained by applications using this library. This is a requirement + for these kind of operations, as they make modifications to file + system resources. + + + + + + + +
+ + Operation Types + + + + + Three kind of Transactional Operations + exist inside this library, being: + + + + File Operations, + Directory Operations, + File Stream Operations. + + + + All operations using Transactions + function fully automatic. No extra code required, as long as you ensure + TxFileSystem instances are created inside a + TransactionScope, to activate the + Transaction + Journal. + + + + +
+ +
+ + Transactional Journal + + + + + In order to maintain Data Integrity , the + TxFileSystem class inside this library uses a + Transactional Journal, + in which Transactional Operations are + enlisted. + + + + All Transactional Operations performed, + using the methods of the object instances exposed by properties of + TxFileSystem, are journalized. This ensures these + operations can be rolled back in case exceptions occur inside the + TransactionScope. + + + + +
+ + + + + Library Concepts + + + System.Transactions Namespace | Microsoft Docs + Read more about the System.Transactions namespace + https://docs.microsoft.com/en-us/dotnet/api/system.transactions + _blank + + + + TransactionScope Class (System.Transactions) | Microsoft Docs + Read more about the TransactionScope class + https://docs.microsoft.com/en-us/dotnet/api/system.transactions.transactionscope + _blank + + + +
+
diff --git a/Documentation/net6.0/Content/Concepts/Transactions.aml b/Documentation/net6.0/Content/Concepts/Transactions.aml new file mode 100644 index 0000000..7eda359 --- /dev/null +++ b/Documentation/net6.0/Content/Concepts/Transactions.aml @@ -0,0 +1,74 @@ + + + + + + + Transactions can be used inside applications to ensure all logic inside + them is performed or not. This is a efficient way to keep + Data Integrity. + + + +
+ Data Integrity + + + Data Integrity inside an application is + often one of the most important requirements of software designs. We + will take microservice designs as an example to illustrate this + better. + + + In case a message payload is processed, resulting in data inside a + database to be added, modified or removed, it is very important that + all these actions are performed. If both the operations on the + messaging mechanism and the database succeed, then Data Integrity is + preserved. + + + If on the other hand an exception occurs while performing one of these + operations, the message might be removed from the message queue, and + only half of the manipulations on the data inside the database might + have took place. + + + By using transactions inside an application we gain the possibility of + all of these operations to be rolled back in case of exceptions. That + way the Data Integrity is kept intact. + + + The TxFileSystem class provided by this + library makes the above also applicable to file system operations. + Using this library you can maintain + Data Integrity> using several storage + solutions and messaging mechanisms. + + +
+ + + + Library Concepts + + + Writing a Transactional Application | Microsoft Docs + Read about Writing a Transactional Application at Microsoft.com + https://docs.microsoft.com/en-us/dotnet/framework/data/transactions/writing-a-transactional-application + _blank + + + + Features Provided by System.Transactions | Microsoft Docs + Read about Features Provided by System.Transactions at Microsoft.com + https://docs.microsoft.com/en-us/dotnet/framework/data/transactions/features-provided-by-system-transactions + _blank + + + +
+
diff --git a/Documentation/net6.0/Content/Copyright.aml b/Documentation/net6.0/Content/Copyright.aml new file mode 100644 index 0000000..702b043 --- /dev/null +++ b/Documentation/net6.0/Content/Copyright.aml @@ -0,0 +1,70 @@ + + + + + + + This OpenSource .NET library is published under the + BSD-4-Clause License + Skip to the BSD-4-Clause License + #License + _self + . The development is funded by a Dutch company, and designed and + implemented by the company's owner, who also is a Senior Software Consultant. + + + +
+ License + + + +
+ +
+ Publisher + + + EQX Media B.V. is a software development house and marketing + agency from The Netherlands. All copyrights of this library is strictly reserved by them. + Yet, the library is published and licensed under the + BSD-4-Clause License + Skip to the BSD-4-Clause License + #License + _self + . + + +
+ +
+ Developer + + + Jarno Kamminga is the architect who designed this library + and also the developer that implemented it. + + +
+ + + + + Jarno Kamminga on LinkedIn + Go to profile of Jarno Kamminga on LinkedIn + https://www.eqx-media.nl/ + _blank + + + + Website of EQX Media B.V. + Go to the website of EQX Media B.V. + https://www.eqx-media.nl/ + _blank + + + +
+
diff --git a/Documentation/net6.0/Content/Donations.aml b/Documentation/net6.0/Content/Donations.aml new file mode 100644 index 0000000..bcfc02d --- /dev/null +++ b/Documentation/net6.0/Content/Donations.aml @@ -0,0 +1,92 @@ + + diff --git a/Documentation/net6.0/ContentLayout.content b/Documentation/net6.0/ContentLayout.content new file mode 100644 index 0000000..8b44a5a --- /dev/null +++ b/Documentation/net6.0/ContentLayout.content @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Documentation/net6.0/net6.0.shfbproj b/Documentation/net6.0/net6.0.shfbproj new file mode 100644 index 0000000..ecfce4f --- /dev/null +++ b/Documentation/net6.0/net6.0.shfbproj @@ -0,0 +1,192 @@ + + + + .NET 5.0 + + All classes of this library that provide the transactional support for file system operations reside in this namespace. + + All classes of this library that provide the transactional support for file system operations reside in this namespace. + All classes of exceptions thrown by this library reside in this namespace. + + + + + + + + + + + + v4.6.1 + + net5.0 + Debug + AnyCPU + 2.0 + {fa209a4e-2ff5-4910-987e-904c0460863a} + 2017.9.26.0 + + Documentation + Documentation + Documentation + + .NET Core/.NET Standard/.NET 5.0+ + ..\Generated\net5.0\ + TxFileSystem Documentation - .NET 5.0 + en-US + HtmlHelp1, Website + C# + VS2013 + True + True + False + False + OnlyWarningsAndErrors + 100 + TxFileSystem + 1.0.0.0 + MemberName + AboveNamespaces + False + False + 2 + False + Blank + ..\..\TxFileSystem\ + False + Copyright.htm#License + Copyright %28c%29 2021, EQX Media B.V. - All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected, ProtectedInternalAsProtected, NonBrowsable + + + + + + + VS + 100 + EQX Media BV + TxFileSystem + -1 + -1 + 100 + 100 + Msdn + TxFileSystem is an OpenSource .NET library developed by &lt%3ba href=&quot%3bhttps://www.eqx-media.nl/&quot%3b title=&quot%3bGo to the website of EQX Media B.V.&quot%3b target=&quot%3b_blank&quot%3b&gt%3bEQX Media B.V.&lt%3b/a&gt%3b and licensed under the &lt%3ba href=&quot%3bCopyright.htm#License&quot%3b title=&quot%3bRead the BSD-4-Clause License&quot%3b target=&quot%3b_self&quot%3b&gt%3bBSD-4-Clause License&lt%3b/a&gt%3b&lt%3bbr /&gt%3b +&lt%3bbr /&gt%3b + &lt%3bp&gt%3bTxFileSystem is an OpenSource .NET Library designed and implemented by &lt%3ba href=&quot%3bhttps://www.linkedin.com/in/jarnokamminga/&quot%3b target=&quot%3b_blank&quot%3b&gt%3bJarno Kamminga&lt%3b/a&gt%3b. Development is initially primarily funded by &lt%3ba href=&quot%3bhttps://www.eqx-media.nl/&quot%3b title=&quot%3bGo to the website of EQX Media B.V.&quot%3b target=&quot%3b_blank&quot%3b&gt%3bEQX Media B.V.&lt%3b/a&gt%3b&lt%3b/p&gt%3b + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TxFileSystem + {998daf5a-a5b9-4a8e-a29d-43910b0c52e0} + True + + + + + ..\..\packages\system.io.abstractions\13.2.9\lib\net5.0\System.IO.Abstractions.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnBuildSuccess + + + ..\Generated\net5.0\ + + \ No newline at end of file diff --git a/Documentation/netstandard2.0/netstandard2.0.shfbproj b/Documentation/netstandard2.0/netstandard2.0.shfbproj index 2198c3c..f061304 100644 --- a/Documentation/netstandard2.0/netstandard2.0.shfbproj +++ b/Documentation/netstandard2.0/netstandard2.0.shfbproj @@ -7,6 +7,7 @@ Summary, Parameter, Returns, AutoDocumentCtors, Namespace, TypeParameter, AutoDocumentDispose + @@ -14,7 +15,7 @@ - v2.0 + v4.0 netstandard2.0 diff --git a/Documentation/netstandard2.1/netstandard2.1.shfbproj b/Documentation/netstandard2.1/netstandard2.1.shfbproj index 63f4c6d..ad7fdbf 100644 --- a/Documentation/netstandard2.1/netstandard2.1.shfbproj +++ b/Documentation/netstandard2.1/netstandard2.1.shfbproj @@ -8,13 +8,14 @@ Summary, Parameter, Returns, AutoDocumentCtors, Namespace, TypeParameter, AutoDocumentDispose {b7959812-1bae-496d-b727-567b6e582e03} + - v2.0 + v4.0 netstandard2.1 diff --git a/TxFileSystem.TestingHelpers/TxFileSystem.TestingHelpers.csproj b/TxFileSystem.TestingHelpers/TxFileSystem.TestingHelpers.csproj index c15c0a8..caa1bea 100644 --- a/TxFileSystem.TestingHelpers/TxFileSystem.TestingHelpers.csproj +++ b/TxFileSystem.TestingHelpers/TxFileSystem.TestingHelpers.csproj @@ -1,7 +1,7 @@  - netstandard2.0;netstandard2.1;net5.0;net461; + netstandard2.0;netstandard2.1;net5.0;net6.0;net461; 2.0.0 false @@ -14,10 +14,15 @@ https://txfilesystem.io/ eqxmedia-logo.png https://github.com/eqxmedianl/EQXMedia.TxFileSystem.git - 2.0.2 + 2.1.0 TransactionScope, File, Directory, FileStream, Transaction, NET, dotnet, IO Git - Version 2.0.2 + Version 2.1.0 +------------- + +● Added support for .NET 6.0. + +Version 2.0.2 ------------- ● Increased version number according to EQXMedia.TxFileSystem. diff --git a/TxFileSystem.Tests/TxFileSystem.Tests.csproj b/TxFileSystem.Tests/TxFileSystem.Tests.csproj index 92ad497..5530c34 100644 --- a/TxFileSystem.Tests/TxFileSystem.Tests.csproj +++ b/TxFileSystem.Tests/TxFileSystem.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0;netcoreapp2.1;netcoreapp3.1;net5.0;net461 + netcoreapp2.0;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net461 2.0.0 false diff --git a/TxFileSystem.sln b/TxFileSystem.sln index 35ba060..e0eef5c 100644 --- a/TxFileSystem.sln +++ b/TxFileSystem.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31019.35 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TxFileSystem", "TxFileSystem\TxFileSystem.csproj", "{998DAF5A-A5B9-4A8E-A29D-43910B0C52E0}" EndProject @@ -43,7 +43,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{82 Documentation\Examples\TxFileSystem_Examples.cs = Documentation\Examples\TxFileSystem_Examples.cs EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TxFileSystem.TestingHelpers", "TxFileSystem.TestingHelpers\TxFileSystem.TestingHelpers.csproj", "{76D72CDF-024B-4EBB-8DB8-1507B279285E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TxFileSystem.TestingHelpers", "TxFileSystem.TestingHelpers\TxFileSystem.TestingHelpers.csproj", "{76D72CDF-024B-4EBB-8DB8-1507B279285E}" +EndProject +Project("{7CF6DF6D-3B04-46F8-A40B-537D21BCA0B4}") = "net6.0", "Documentation\net6.0\net6.0.shfbproj", "{FA209A4E-2FF5-4910-987E-904C0460863A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -82,6 +84,12 @@ Global {76D72CDF-024B-4EBB-8DB8-1507B279285E}.Documentation|Any CPU.Build.0 = Debug|Any CPU {76D72CDF-024B-4EBB-8DB8-1507B279285E}.Release|Any CPU.ActiveCfg = Release|Any CPU {76D72CDF-024B-4EBB-8DB8-1507B279285E}.Release|Any CPU.Build.0 = Release|Any CPU + {FA209A4E-2FF5-4910-987E-904C0460863A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA209A4E-2FF5-4910-987E-904C0460863A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA209A4E-2FF5-4910-987E-904C0460863A}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {FA209A4E-2FF5-4910-987E-904C0460863A}.Documentation|Any CPU.Build.0 = Documentation|Any CPU + {FA209A4E-2FF5-4910-987E-904C0460863A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA209A4E-2FF5-4910-987E-904C0460863A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -93,6 +101,7 @@ Global {30EAD1F5-B804-458F-8B77-5EBA48AF5FF7} = {713EC071-8A8C-410F-8C1F-C44F8A831683} {B7959812-1BAE-496D-B727-567B6E582E03} = {713EC071-8A8C-410F-8C1F-C44F8A831683} {8234BD58-60CC-4633-BD9C-A99BDF8F0E10} = {713EC071-8A8C-410F-8C1F-C44F8A831683} + {FA209A4E-2FF5-4910-987E-904C0460863A} = {713EC071-8A8C-410F-8C1F-C44F8A831683} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7076B68C-14D6-4D20-A715-F5FB506D15CF} diff --git a/TxFileSystem/Operations/Files/MoveOperation.cs b/TxFileSystem/Operations/Files/MoveOperation.cs index c2a7d92..d291cc0 100644 --- a/TxFileSystem/Operations/Files/MoveOperation.cs +++ b/TxFileSystem/Operations/Files/MoveOperation.cs @@ -2,14 +2,14 @@ { using global::EQXMedia.TxFileSystem.Abstractions; -#if NET5_0 +#if NET_GTE_5_0 using global::EQXMedia.TxFileSystem.Backups; #endif internal sealed class MoveOperation : FileOperation, IExecutingOperation { private readonly string _destPath = null; -#if NET5_0 +#if NET_GTE_5_0 private readonly bool? _overwrite; #endif @@ -19,7 +19,7 @@ public MoveOperation(TxFile file, string path, string destPath) _destPath = destPath; } -#if NET5_0 +#if NET_GTE_5_0 public MoveOperation(TxFile file, string path, string destPath, bool overwrite) : base(file, path) { @@ -32,7 +32,7 @@ public MoveOperation(TxFile file, string path, string destPath, bool overwrite) public override OperationType OperationType => OperationType.Move; -#if NET5_0 +#if NET_GTE_5_0 public override void Backup() { base.Backup(); @@ -48,7 +48,7 @@ public void Execute() { Journalize(this); -#if NET5_0 +#if NET_GTE_5_0 if (_overwrite.HasValue) { _file.TxFileSystem.FileSystem.File.Move(_path, _destPath, _overwrite.Value); @@ -63,12 +63,12 @@ public override void Rollback() { new MoveOperation(_file, _destPath, _path).Execute(); -#if NET5_0 +#if NET_GTE_5_0 RestoreOverwrittenDestinationFile(); #endif } -#if NET5_0 +#if NET_GTE_5_0 private void RestoreOverwrittenDestinationFile() { var backupFile = _file.GetBackupPath(_destPath, _tempFileUuid); diff --git a/TxFileSystem/TxFile.cs b/TxFileSystem/TxFile.cs index 9b94dde..79dea4c 100644 --- a/TxFileSystem/TxFile.cs +++ b/TxFileSystem/TxFile.cs @@ -296,7 +296,7 @@ public void Move(string sourceFileName, string destFileName) new MoveOperation(this, sourceFileName, destFileName).Execute(); } -#if NET5_0 +#if NET_GTE_5_0 /// /// /// diff --git a/TxFileSystem/TxFileSystem.csproj b/TxFileSystem/TxFileSystem.csproj index c562d49..d073644 100644 --- a/TxFileSystem/TxFileSystem.csproj +++ b/TxFileSystem/TxFileSystem.csproj @@ -1,13 +1,13 @@  - netstandard2.0;netstandard2.1;net5.0;net461; + netstandard2.0;netstandard2.1;net5.0;net6.0;net461; EQX Media B.V. Jarno Kamminga https://github.com/eqxmedianl/EQXMedia.TxFileSystem.git Git EQXMedia.TxFileSystem - 2.0.2 + 2.1.0 TxFileSystem is a transactional file system wrapper using the .NET file system abstraction from System.IO.Abstractions. Use this file system wrapper in combination with System.Transactions.TransactionScope to perform transactional operations on: @@ -16,7 +16,7 @@ Use this file system wrapper in combination with System.Transactions.Transaction ● FileStreams. All other parts of the interfaces in System.IO.Abstractions are simply proxied to the true file system being wrapped. - Version 2.0.2 + Version 2.1.0 ------------- ● Providing a System.IO.Abstractions file system wrapper. @@ -38,7 +38,8 @@ All other parts of the interfaces in System.IO.Abstractions are simply proxied t ○ .NET Framework 4.6.1, ○ .NET Standard 2.0, ○ .NET Standard 2.1, - ○ .NET 5.0. + ○ .NET 5.0, + ○ .NET 6.0. ● Unit Testing all supported framework versions. ● Fully covered by Unit Tests (100% code coverage). © EQX Media B.V. All rights reserved. @@ -86,9 +87,13 @@ All other parts of the interfaces in System.IO.Abstractions are simply proxied t ASYNC_IO;ENUMERATING_IO;PATH_NG - - - ASYNC_IO;ENUMERATING_IO;PATH_NG;SUPPORTED_OS_PLATFORM + + + ASYNC_IO;ENUMERATING_IO;NET_GTE_5_0;PATH_NG;SUPPORTED_OS_PLATFORM + + + + ASYNC_IO;ENUMERATING_IO;NET_GTE_5_0;PATH_NG diff --git a/nuget.config b/nuget.config index 3d73db3..ffcab79 100644 --- a/nuget.config +++ b/nuget.config @@ -1,15 +1,5 @@ - - - - - - - - - -