Rearrangements

Migrate to Sdk projects.
Migrate tests to xUnit.
Bump version 1.2.0.
Migrate to NetStandar2.0.
This commit is contained in:
2021-06-17 03:04:17 +02:00
parent 4b10a142c9
commit 52a5737806
12 changed files with 405 additions and 315 deletions

View File

@@ -13,20 +13,27 @@ Alternativelly you can copy and reference the assembly resulting of the project
### VAR.UrlCompressor
Add the resulting assembly as reference in your projects, and this line on code:
using VAR.UrlCompressor;
```csharp
using VAR.UrlCompressor;
```
Compress an URL with:
```csharp
string compressedUrl = UrlCompressor.Compress("https:\\google.com");
// compressedUrl = "Hk30TGDxt8jOOW6"
```
Decompress an URL with:
```csharp
string decompressedUrl = UrlCompressor.Decompress("Hk30TGDxt8jOOW6");
// decompressedUrl = "https:\\google.com";
```
For extra compression use host conversions. For example:
```csharp
Dictionary<string, string> hostConversions = new Dictionary<string, string> {
{ "google", "G" }
{ "com", "C" }
@@ -35,16 +42,16 @@ For extra compression use host conversions. For example:
// compressedUrl = "oMyuFVR41"
string decompressedUrl = UrlCompressor.Decompress("oMyuFVR41");
// decompressedUrl = "https:\\google.com";
```
### UrlCompressor.Tests
It is a simple console application, to test basic funcitionallity of the library.
## Building
A Visual Studio 2017 solution is provided. Simply, click build on the IDE.
A Visual Studio solution is provided. Simply, click build on the IDE.
A .nuget package can be build using:
VAR.UrlCompressor\Build.NuGet.cmd
The build generates a DLL and a Nuget package.
## Contributing
1. Fork it!
@@ -55,27 +62,3 @@ A .nuget package can be build using:
## Credits
* Valeriano Alfonso Rodriguez.
## License
The MIT License (MIT)
Copyright (c) 2016-2017 Valeriano Alfonso Rodriguez
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.