Skip to content

ateaseproject/atease

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@Ease

NuGet @Ease is a set of extensions and helpers.

Quick links

Change logs | Project Repository

Installation

Available for .NET Standard 2.0+

NuGet

PM> Install-Package AtEase

Features

  • Extensions for Collections, Enum, String and other types
  • Persian DateTime extension
  • OperationResult for returning an object that shows succeed or faild operation with data and errors.
  • Provide DSL for C# methods

Convert class to Http query string

testClass.ToQueryString();

DateTime

dateTime.ToPersianDateTime(format);  // تبدیل به تاریخ شمسی

Sequential GUID

Guid.NewGuid().AsSequentialGuid();
GuidGeneratorExtensions.NewSequentialGuid();

RegularExpression

string.IsValidShamsiYear(); // تاریخ شمسی است
string.IsValidTime();
string.IsValidEmail();

String

string.IsWord();
string.ToSpacingSentence();
string.ToSentence();
string.ToSnakeCase();
string.FixPersianKeyboardLayou(); // فیکس حروفی عربی و فارسی
string.ToPersianNumber();  // تبدیل اعداد به اعداد فارسی
string.IsNull();
string.IsNullOrEmptyOrWhiteSpace();

Enum

@enum.ToInt();  // enum to int
value.AsEnum<TestEnum>(); // int to enum
@enum.GetDisplayName();
@enum.GetDescription();
EnumToList<Enum>; // get list of values

Collections

collection.IsNullOrEmpty()
collection.IsNotNullOrEmpty()
collection.NotAny()

Numbers

nullableDouble.ToNullableDecimal()
collection.IsZeroOrMin()
collection.IsEven()
collection.IsOdd()
collection.NextRandom()

Numbers to Span

number.Milliseconds()
number.Seconds()
number.Minutes()
number.Hours()
number.Days()
number.Weeks()

Operation System

IsWindows()
IsMacOs()
IsLinux()

string.RunAsCmd(workingDirectory)
string.RunAsWindowsCmd(workingDirectory)
string.RunAsBashCmd(workingDirectory)

Types

object.GetPropertyValue(propertyName)
object.GetFieldValue(fieldName)
object.HasAttribute<CustomAttribute>()
object.SingleAttributeValue<TAttribute>(propertyName,attributeName)
propertyInfo.SingleAttributeValue<TAttribute>(attributeName)

About

@ease is a set of extensions and helpers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •