A collection of useful extension methods.
License
—
Deps
0
Install Size
—
Vulns
✓ 0
Published
Feb 3, 2026
$ dotnet add package fm.Extensions.CommonA collection of useful extension methods.
Configure any kind of object in a fluent way.
var client = services.GetRequiredService<HttpClient>().Configure(c => c.BaseAddress = new Uri("https://localhost"));
Transform an existing object into a new one. This is very useful when the expression before the transformation is very large and you want to operate on it without assigning a local variable.
new {
Id = 1,
Name = "fm",
}.Transform(o => JsonSerializer.Serialize(o)).ShouldBe("""{"Id":1,"Name":"fm"}""");
The main types provided by this library are:
ArrayExtensionsCollectionExtensionsConsoleHelperConvertibleExtensionsDictionaryExtensionsDoubleExtensionsEnumerableExtensionsExceptionExtensionsInt32ExtensionsListExtensionsNetworkCredentialExtensionsNetworkCredentialHelperObjectExtensionsSecureStringExtensionsStringBuilderExtensionsStringExtensionUriExtensions