AssistantFramework.Extensions
1.0.1
dotnet add package AssistantFramework.Extensions --version 1.0.1
NuGet\Install-Package AssistantFramework.Extensions -Version 1.0.1
<PackageReference Include="AssistantFramework.Extensions" Version="1.0.1" />
paket add AssistantFramework.Extensions --version 1.0.1
#r "nuget: AssistantFramework.Extensions, 1.0.1"
// Install AssistantFramework.Extensions as a Cake Addin #addin nuget:?package=AssistantFramework.Extensions&version=1.0.1 // Install AssistantFramework.Extensions as a Cake Tool #tool nuget:?package=AssistantFramework.Extensions&version=1.0.1
Assistant Framework Extensions
Description
This project includes categorized extension methods to avoid repetitive code that can be used frequently for your applications.
Goal
The use of extension methods reduces code duplication even though it requires writing a lot of methods. It maintains the code standard. It avoids mistakes. Increases code readability. It reduces maintenance cost. It provides better maintainability and refactoring by creating a centralized structure.
Dependencies
- This project has been developing in NET 6
- AssistantFramework.Constants <Version="1.0.1">
- AssistantFramework.Models <Version="1.0.0">
- Microsoft.AspNetCore.App <FrameworkReference>
- Microsoft.AspNetCore.Http.Abstractions <Version="2.2.0">
- Microsoft.AspNetCore.Mvc.Abstractions" <Version="2.2.0">
- Microsoft.AspNetCore.Http" <Version="2.2.2">
- Microsoft.Extensions.Configuration.Abstractions" <Version="6.0.0">
- Microsoft.Extensions.DependencyInjection" <Version="6.0.0">
Getting Started
Added classes for the following extension methods;
. ActionFilterExtension
GetActionExecutingContextModel()
. CollectionExtensions
RemoveAll()
. ConfigurationExtension
GetConfigurationObject()
. DateTimeExtensions
GetUtcNow()
GetNow()
. DictionaryExtensions
Get()
. EnumExtension
GetAttributeOfType()
. FormFileExtensions
GetBytes()
. HttpContextExtensions
GetCorrelationId()
GetApiVersion()
GetItem()
. ModelStateExtension
GetErrors()
. ReflectionExtensions
GetDescription()
. StopwatchExtensions
GetElapsedTime()
. StringExtension
IsValidJson()
VerifyBodyContent
IsHtml()
ToCamelCase()
. TypeConverterExtension
ToDateTime()
ToInt16()
ToInt32()
ToInt64()
ToBoolean()
ToFloat()
ToDecimal()
ToDouble()
IsNumber()
IsWholeNumber()
IsDecimalNumber()
IsBoolean()
. TypeIsControlExtension
The following methods can be used for object,ICollection<T>,Guid,char,char[],string,string[],DateTime,bool,byte,sbyte,short,ushort,int,uint,long,ulong,float,double,decimal,JsonElement,e.g types
IsNullOrEmpty()
IsNotNullOrEmpty()
IsEqual()
IsNotEqual()
IsArrayEqual()
IsNotArrayEqual()
IsLessThan()
IsNotLessThan()
IsEqualOrLessThan()
IsNotEqualOrLessThan()
IsGreaterThan()
IsNotGreaterThan()
IsEqualOrGreaterThan()
IsNotEqualOrGreaterThan()
IsCorrectFormat()
IsNotCorrectFormat()
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. |
-
net6.0
- AssistantFramework.Constants (>= 1.0.1)
- AssistantFramework.Models (>= 1.0.0)
- Microsoft.AspNetCore.Http (>= 2.2.2)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 6.0.0)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added classes for the following extension methods;
. ActionFilterExtension
. CollectionExtensions
. ConfigurationExtension
. DateTimeExtensions
. DictionaryExtensions
. EnumExtension
. FormFileExtensions
. HttpContextExtensions
. ModelStateExtension
. ReflectionExtensions
. StopwatchExtensions
. StringExtension
. TypeConverterExtension
. TypeIsControlExtension