VOOZH about

URL: https://www.nuget.org/packages/Black.Beard.Helpers/

⇱ NuGet Gallery | Black.Beard.Helpers 2.0.59




Black.Beard.Helpers 2.0.59

dotnet add package Black.Beard.Helpers --version 2.0.59
 
 
NuGet\Install-Package Black.Beard.Helpers -Version 2.0.59
 
 
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="Black.Beard.Helpers" Version="2.0.59" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Black.Beard.Helpers" Version="2.0.59" />
 
Directory.Packages.props
<PackageReference Include="Black.Beard.Helpers" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Black.Beard.Helpers --version 2.0.59
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Black.Beard.Helpers, 2.0.59"
 
 
#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.
#:package Black.Beard.Helpers@2.0.59
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Black.Beard.Helpers&version=2.0.59
 
Install as a Cake Addin
#tool nuget:?package=Black.Beard.Helpers&version=2.0.59
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Black.Beard.Helpers

👁 NuGet

Introduction

Black.Beard.Helpers is a powerful .NET utility library that streamlines file system operations, content manipulation, URI handling, and network tasks. It provides a comprehensive set of extension methods and helper classes designed to reduce boilerplate code and improve developer productivity when working with file systems and content resources.

Key benefits:

  • Intuitive API design with fluent interfaces and method chaining for improved code readability
  • Cross-platform compatibility ensuring consistent behavior across Windows, macOS, and Linux
  • Robust error handling with clear exception patterns and informative messages
  • Performance optimizations for common content operations
  • Extensive content encoding support with automatic detection and conversion

Installation

Prerequisites

  • .NET Standard 2.0+
  • .NET Core 2.0+ / .NET 5.0+
  • .NET Framework 4.6.1+

Package Manager

Install-Package Black.Beard.Helpers

.NET CLI

dotnet add package Black.Beard.Helpers

Package Reference

<PackageReference Include="Black.Beard.Helpers" Version="1.0.0" />

Features

Generic singleton

use a generic method for store datas in a singleton

using Bb;

// global
StaticContainer.Set(new MyClass())
var value = StaticContainer.Get<MyClass>();

// For the current thread
StaticThreadContainer.Set(new MyClass())
var value = StaticThreadContainer.Get<MyClass>();

File and Directory Management

Easily work with files and directories using intuitive extension methods.

using Bb;

// Create directory if it doesn't exist
DirectoryInfo dir = @"C:\temp\projects".CreateFolderIfNotExists();

// Write content to files with encoding options
FileInfo log = new FileInfo("application.log");
log.WriteFile("Application started", append: true);

// Copy files between directories
var source = new FileInfo("document.pdf");
bool success = source.CopyToDirectory(@"C:\backup", overwrite: false);

Path Operations

Handle file paths consistently across platforms.

using Bb;

// Convert between string paths and FileInfo/DirectoryInfo
FileInfo file = @"C:\config\settings.json".AsFile();
DirectoryInfo dir = @"C:\logs".AsDirectory();

// Platform-aware path comparison
bool areEqual = @"C:\Program Files".IsPathEquals(@"c:\program files");
// true on Windows, false on Linux

// Safely combine path segments
string path = @"C:\projects".Combine("src", "main", "resources");
// "C:\projects\src\main\resources"

using Bb;

// Create URIs with path segments
Uri api = "https://api.example.com".ToUri("v2", "users");
// https://api.example.com/v2/users

// Find available ports and create URIs
int port = 8000;
Uri serviceUri = "http".ToUri("localhost", ref port, "api");
// port will be updated to an available port number

// Combine URL parts safely
string url = UriExtensions.Combine(
 "https://example.com", 
 "search", 
 "?q=dotnet", 
 "&page=1"
);
// https://example.com/search?q=dotnet&page=1

HTTP and Network Helpers

Simplify HTTP operations and network resource handling.

using Bb;
using System.IO;

// Download content from a URL to a file
Uri source = new Uri("https://example.com/files/document.pdf");
FileInfo target = new FileInfo("document.pdf");
source.Download(target);

// Find available network ports
int port = HttpHelper.GetAvailablePort(8080);
Console.WriteLine($"Port {port} is available for use");

Platform Support

Black.Beard.Helpers is designed to work seamlessly across different operating systems:

  • Automatic platform detection for path comparison and formatting
  • Path normalization for consistent handling of forward/backward slashes
  • Case sensitivity awareness that adapts to the operating system
  • Encoding detection and conversion that works reliably across platforms

License

This library is licensed under the MIT License - see the LICENSE file for details. This library is licensed under the MIT License.

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Black.Beard.Helpers:

Package Downloads
Black.Beard.Roslyn

Helper for compile Csharp at runtime

Black.Beard.Web.Server

Provide a service base for just concentrate your services

Black.Beard.Policies

The Black.Beard.Policies library is designed to help developers manage and evaluate authorization policies in .NET applications. It provides a flexible syntax for defining rules based on user claims, roles, and other contextual data. With this library, you can easily create, organize, and enforce complex access control policies, making it suitable for scenarios where fine-grained security and dynamic rule evaluation are required. It also integrates with web applications and supports external identity providers like Keycloak for authentication testing.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.59 469 4/4/2025
2.0.58 251 4/3/2025
2.0.57 255 4/3/2025
2.0.56 242 4/2/2025
2.0.55 245 4/2/2025
2.0.54 355 3/31/2025
2.0.53 228 3/27/2025
2.0.51 233 3/17/2025
2.0.50 237 3/13/2025
2.0.49 443 1/12/2025
2.0.47 318 12/7/2024
2.0.46 187 11/29/2024
2.0.45 176 11/27/2024
2.0.44 216 11/27/2024
2.0.43 196 11/24/2024
2.0.42 224 11/24/2024
2.0.41 280 11/19/2024
2.0.40 410 10/28/2024
2.0.39 721 9/23/2024
2.0.38 224 5/18/2024
Loading failed