Skip to content

.NET library that simplifies the null checking in your system.

Notifications You must be signed in to change notification settings

tal952/Null-safe-chain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Null-safe-chain

Null-safe-chain is a high-performance .NET library that simplifies the null checking in your system.

here are some examples:

var result = employee.NullSafeChain(x => x.Person.Address.City); //Properties chain
var result = employee.NullSafeChain(x => ((Dog) x.Person.Pet).Collar); // Casting
var result = employee.NullSafeChain(x => (x.Person.Pet as Dog).Collar); // As operand
var result = employee.NullSafeChain(x => x.GetEmployeeByName("Jain").Person); // Method call
var result = employee.NullSafeChain(x => x.Manages.FirstOrDefault(y => y.Name == "Jain").Person); // Extension method call

About

.NET library that simplifies the null checking in your system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages