C# Class Xunit.Internal.FabricContext

Inheritance: IFabricContext
Mostrar archivo Open project: BjRo/xunitbddextensions Class Usage Examples

Public Methods

Method Description
CreateStub ( Type interfaceType ) : object

Creates a new stub of the specified interface type.

FabricContext ( Type typeToBuild, IMockingEngine mockingEngine, IContainer container, Fabric fabric ) : System

Creates a new instance of the FabricContext class.

InjectExistingInstanceIntoContainer ( Type interfaceType, object instance ) : void

Registers the existing instance specified by instance under the interface specified by interfaceType at the underlying IoC type.

ResolveByFabric ( Type type ) : object

Resolves the type specified by type with the root level fabric.

ResolveInstanceFromContainer ( Type typeToResolveByContainer ) : object

Resolves an instance of the specified type from the underlying IoC container.

ResolveInstancesFromContainer ( Type itemType ) : IEnumerable

Resolves a collection of the itemtype specified by itemType from the underlying IoC container.

Method Details

CreateStub() public method

Creates a new stub of the specified interface type.
public CreateStub ( Type interfaceType ) : object
interfaceType System.Type /// Specifies a type to create a stub for. ///
return object

FabricContext() public method

Creates a new instance of the FabricContext class.
public FabricContext ( Type typeToBuild, IMockingEngine mockingEngine, IContainer container, Fabric fabric ) : System
typeToBuild System.Type /// Specifies the type to build. ///
mockingEngine IMockingEngine /// Specifies the mock factory. ///
container IContainer /// Specifies the container. ///
fabric Fabric /// Specifies the fabric. ///
return System

InjectExistingInstanceIntoContainer() public method

Registers the existing instance specified by instance under the interface specified by interfaceType at the underlying IoC type.
public InjectExistingInstanceIntoContainer ( Type interfaceType, object instance ) : void
interfaceType System.Type /// Specifies the interface type. ///
instance object /// Specifies an existing instance. ///
return void

ResolveByFabric() public method

Resolves the type specified by type with the root level fabric.
public ResolveByFabric ( Type type ) : object
type System.Type /// Specifies the type to resolve. ///
return object

ResolveInstanceFromContainer() public method

Resolves an instance of the specified type from the underlying IoC container.
public ResolveInstanceFromContainer ( Type typeToResolveByContainer ) : object
typeToResolveByContainer System.Type /// The type to resolve. ///
return object

ResolveInstancesFromContainer() public method

Resolves a collection of the itemtype specified by itemType from the underlying IoC container.
public ResolveInstancesFromContainer ( Type itemType ) : IEnumerable
itemType System.Type /// Specifies the item type. ///
return IEnumerable