Wizard.Container 1.0.0

dotnet add package Wizard.Container --version 1.0.0
                    
NuGet\Install-Package Wizard.Container -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Wizard.Container" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wizard.Container" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Wizard.Container" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Wizard.Container --version 1.0.0
                    
#r "nuget: Wizard.Container, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Wizard.Container@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Wizard.Container&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Wizard.Container&version=1.0.0
                    
Install as a Cake Tool

First of all

Create a Wizard instance

var wizard = new Wizard();

Now teach the Wizard to do magic

Registering a magic using one type

wizard.Register(typeof (Magic));

Registering a magic using one type and named instance

wizard.Register(typeof (Magic), "InstanceName");

Registering a magic using one generic type

wizard.Register<Magic>();

Registering a magic using one generic type and named instance

wizard.Register<Magic>("InstanceName");

Registering a magic using polymorphism

wizard.Register(typeof (Magic), typeof (TableHopping));

Registering a magic using polymorphism and generics

wizard.Register<Magic, TableHopping>();

Registering a magic using polymorphism, generic and named instance

wizard.Register<Magic, TableHopping>("InstanceName")

Registering a magic using delegate

wizard.Register(typeof (Magic), args => new TableHopping(param1, param2...));

Registering a magic using delegate and generics

wizard.Register<Magic>(args => new TableHopping(param1, param2...));

Registering a magic to support custom arguments

wizard.Register(typeof (Magic), args => new TableHopping(args.param1, args.param2));

Registering a magic to support custom arguments and named instance

wizard.Register(typeof (Magic), args => new TableHopping(args.param1, args.param2), "InstanceName");

You can check if the Wizard learned some magic

Checking a registered magic using type

wizard.IsRegistered(typeof(Magic));

Checking a registered magic using generic

wizard.IsRegistered<Magic>();

Checking a registered magic using type and named instance

wizard.IsRegistered(typeof(Magic), "InstanceName");

Checking a registered magic using generic and named instance

wizard.IsRegistered<Magic>("InstanceName");

You may want to forget some magic...

Unregistering a magic

wizard.Unregister(typeof (Magic));

Unregistering a magic using named instance

wizard.Unregister(typeof (Magic), "InstanceName");

Unregistering a magic using generics

wizard.Unregister<Magic>();

Unregistering a magic using generics and named instance

wizard.Unregister<Magic>(InstanceName);

Unregistering all

wizard.UnregisterAll();

Now that you have learned all, you can do magic!

Creating a magic

wizard.Create(typeof (Magic));

Creating a magic using generics

wizard.Create<Magic>();

Creating a magic using generics and named instance

wizard.Create<Magic>("InstanceName")

Creating a magic using custom arguments

wizard.Create(typeof (Magic), new { param1 = "some value", param2 = new Random().Next() });

Creating a magic using custom arguments and named instance

wizard.Create(typeof (Magic), new { param1 = "some value", param2 = new Random().Next() }, "InstanceName");

Creating a magic using generics and custom arguments

wizard.Create<Magic>(new { param1 = "some value", param2 = new Random().Next() });

Creating a magic using generics, custom arguments and named instance

wizard.Create<Magic>(new { param1 = "some value", param2 = new Random().Next() }, "InstanceName");

Congratulations, now you're a Wizard Master!

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 1,552 11/21/2017