netfx-Guard
1.3.3.2
dotnet add package netfx-Guard --version 1.3.3.2
NuGet\Install-Package netfx-Guard -Version 1.3.3.2
<PackageReference Include="netfx-Guard" Version="1.3.3.2" />
paket add netfx-Guard --version 1.3.3.2
#r "nuget: netfx-Guard, 1.3.3.2"
// Install netfx-Guard as a Cake Addin #addin nuget:?package=netfx-Guard&version=1.3.3.2 // Install netfx-Guard as a Cake Tool #tool nuget:?package=netfx-Guard&version=1.3.3.2
The only argument validation file you need, with full refactoring support and strong-typing.
Examples:
Guard.NotNull(() => value, value)
Guard.NotNullOrEmpty(
() => stringValue, stringValue)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (36)
Showing the top 5 NuGet packages that depend on netfx-Guard:
Package | Downloads |
---|---|
netfx-Reflector
Strong-typed static reflection via Reflect: // Void static method MethodInfo cw = Reflect.GetMethod( () => Console.WriteLine); // Instance void method MethodInfo mi = Reflect<IView>.GetMethod(v => v.Show); // Boolean returning instance method MethodInfo pi = Reflect<IViewModel> .GetMethod<bool>(v => v.Save); |
|
netfx-System.Collections.Generic.IEnumerable.Traverse
Traverse an enumerable tree, depth or breadth first. Example: var dirs = new DirectoryInfo("C:\\") .Traverse(TraverseKind.BreadthFirst, dir => dir.EnumerateDirectories()); |
|
netfx-System.AmbientSingleton
Provides an easy way to implement the singleton (anti?) pattern so that it is ambient-safe, propagates with a call context and can be overriden per ambient (i.e. in tests). |
|
netfx-Patterns.EventSourcing
Provides the core APIs to implement the event sourcing pattern and an application event bus. |
|
Adapter.Interfaces.Source
Only two APIs are provided: the IAdapterService and its facade extension method As in the Adapters type. You can chose to use the former service directly instead of the convenience extension method. You don't lose any testability in doing either way, although you do need to pass around the adapter service in one case. ======= Example ======= // Calling code assumes there is a service always setup before invoking. // If there isn't, an InvalidOperationException is thrown automatically. // Use adapter extension method As as needed, i.e. // say we need to use it as an MSBuild project, if possible IMSBuildProject msbuild = project.As<IMSBuildProject>(); if (msbuild != null) // do MSBuild stuff with it. |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on netfx-Guard:
Repository | Stars |
---|---|
moq/moq.spikes
The most popular and friendly mocking framework for .NET
|
|
ploeh/Hyprlinkr
A URI building helper library for ASP.NET Web API
|