C# Class Hiro.Compilers.InterfaceStubBuilder

A class that can generate a stub implementation for any given interface type.
Mostra file Open project: philiplaureano/Hiro Class Usage Examples

Public Methods

Method Description
AddStubImplementationFor ( System interfaceType, Mono.Cecil.TypeDefinition type ) : IEnumerable

Implements each one of the methods in the given interfaceType.

By default, each implemented method will throw a NotImplementedException.

Private Methods

Method Description
CreateInterfaceStub ( System interfaceType, Mono.Cecil.TypeDefinition type ) : IEnumerable

Overrides all methods in the given interface type with methods that throw a NotImplementedException.

CreateMethodStub ( Mono.Cecil.TypeDefinition type, Mono.Cecil.ModuleDefinition module, MethodOverrider overrider, MethodInfo method ) : Mono.Cecil.MethodDefinition

Overrides the target method with a method that throws a NotImplementedException.

Method Details

AddStubImplementationFor() public method

Implements each one of the methods in the given interfaceType.
By default, each implemented method will throw a NotImplementedException.
public AddStubImplementationFor ( System interfaceType, Mono.Cecil.TypeDefinition type ) : IEnumerable
interfaceType System The interface type.
type Mono.Cecil.TypeDefinition The host type.
return IEnumerable