Teani.Helper
1.0.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Teani.Helper --version 1.0.2
NuGet\Install-Package Teani.Helper -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Teani.Helper" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Teani.Helper --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Teani.Helper, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Teani.Helper as a Cake Addin #addin nuget:?package=Teani.Helper&version=1.0.2 // Install Teani.Helper as a Cake Tool #tool nuget:?package=Teani.Helper&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
What is Teani.Helper?
Teani.Helper is a simple little library build to ease a bit the development by gaining some results without the boring part of writing all the time the same lines of codes.
What it contains?
- A simple logger class which can write log items into the harddrive;
- Azure Blob Storage Manager (List, Upload, Download and Size);
- IOExtensions
(Here more will be added).
Where can I get it?
First, install NuGet. Then, install Teani.Helper from the package manager console.
Examples:
Logger
It adds elements into a queue and write them to the harddrive as soon is possible.
//Initialization
Log.Start();
//Writing some messages
Log.Write(eMessageType.Debug, "Debug not stored");
Log.Write(eMessageType.Information, "Some information");
Log.Write(eMessageType.Success, "Some success");
Log.Write(eMessageType.Error, "Some error");
Log.Write(eMessageType.Warning, "Some warning");
Log.Write(new Exception("Some exception, no stack"));
//Declaring that debug messages should also be stored.
Log.StoreDebugMessages = true;
Log.Write(Tni.Helper.Entities.eMessageType.Debug, "Debug stored");
Output of the logs
{"RecordedAt":"2022-11-04T10:33:22.1985371+02:00","MessageType":5,"Message":"Debug not stored"}
{"RecordedAt":"2022-11-04T10:33:22.203045+02:00","MessageType":1,"Message":"Some information"}
{"RecordedAt":"2022-11-04T10:33:22.2030473+02:00","MessageType":4,"Message":"Some success"}
{"RecordedAt":"2022-11-04T10:33:22.2030477+02:00","MessageType":2,"Message":"Some error"}
{"RecordedAt":"2022-11-04T10:33:22.2030479+02:00","MessageType":3,"Message":"Some warning"}
{"RecordedAt":"2022-11-04T10:33:22.2031597+02:00","MessageType":2,"Message":"Some exception, no stack"}
{"RecordedAt":"2022-11-04T10:33:22.2032215+02:00","MessageType":5,"Message":"Debug stored"}
Azure Blob Storage Manager
var asm = new AzureStorageManager("{YourAzureConnectionString}");
//Specifying each time the container.
var container = "YourWorkingContainer";
var list = await asm.GetList(container);
var size = await asm.GetSize(container);
await asm.UploadFile(new FileInfo(@"d:\temp\testfile.json"), true, container);
FileInfo downloadedFile = await asm.DownloadFile(new FileInfo(@"c:\temp\testfile.json"), container);
//Specifying the work container
asm.WorkContainer = container;
list = await asm.GetList();
size = await asm.GetSize();
await asm.UploadFile(new FileInfo(@"d:\temp\testfile.json"), true);
FileInfo downloadedFile = await asm.DownloadFile(new FileInfo(@"c:\temp\testfile.json"));
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Azure.Storage.Blobs (>= 12.14.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.