C# Class NSubstitute.Core.SubstituteFactory

Inheritance: ISubstituteFactory
Mostra file Open project: nsubstitute/NSubstitute Class Usage Examples

Public Methods

Method Description
Create ( Type typesToProxy, object constructorArguments ) : object

Create a substitute for the given types.

CreatePartial ( Type typesToProxy, object constructorArguments ) : object

Create an instance of the given types, with calls configured to call the base implementation where possible. Parts of the instance can be substituted using Returns().

GetCallRouterCreatedFor ( object substitute ) : ICallRouter
SubstituteFactory ( ISubstitutionContext context, ICallRouterFactory callRouterFactory, IProxyFactory proxyFactory, ICallRouterResolver callRouterResolver ) : System

Private Methods

Method Description
Create ( Type typesToProxy, object constructorArguments, SubstituteConfig config ) : object
GetPrimaryProxyType ( Type typesToProxy ) : Type

Method Details

Create() public method

Create a substitute for the given types.
public Create ( Type typesToProxy, object constructorArguments ) : object
typesToProxy System.Type
constructorArguments object
return object

CreatePartial() public method

Create an instance of the given types, with calls configured to call the base implementation where possible. Parts of the instance can be substituted using Returns().
public CreatePartial ( Type typesToProxy, object constructorArguments ) : object
typesToProxy System.Type
constructorArguments object
return object

GetCallRouterCreatedFor() public method

public GetCallRouterCreatedFor ( object substitute ) : ICallRouter
substitute object
return ICallRouter

SubstituteFactory() public method

public SubstituteFactory ( ISubstitutionContext context, ICallRouterFactory callRouterFactory, IProxyFactory proxyFactory, ICallRouterResolver callRouterResolver ) : System
context ISubstitutionContext
callRouterFactory ICallRouterFactory
proxyFactory IProxyFactory
callRouterResolver ICallRouterResolver
return System