C# 클래스 Spring.Objects.Factory.Support.MethodInjectingInstantiationStrategy.MethodInjectingTypeBuilder

A System.Type factory that generates subclasses of those classes that have been configured for the Method-Injection form of Dependency Injection.

This class is designed as for one-shot usage; i.e. it must be used to generate exactly one method injected subclass and then discarded (it maintains state in instance fields).

파일 보기 프로젝트 열기: spring-projects/spring-net

Private Properties

프로퍼티 타입 설명
CalculateMethodAttributes MethodAttributes
DefineConstructors System.Reflection.Emit.TypeBuilder
DefineFields System.Reflection.Emit.TypeBuilder
DefineMethods System.Reflection.Emit.TypeBuilder
DefineProperties System.Reflection.Emit.TypeBuilder
DefineReplacedMethod void
DefineReturnValueIfAny System.Reflection.Emit.LocalBuilder
DefineType System.Reflection.Emit.TypeBuilder
DefineWritePropertyForMethodReplacement void
PushArguments void
SetupTheReturnValueIfAny void

공개 메소드들

메소드 설명
BuildType ( ) : Type

Builds a System.Type suitable for Method-Injection.

MethodInjectingTypeBuilder ( ModuleBuilder module, Spring.Objects.Factory.Support.RootObjectDefinition objectDefinition ) : System

Creates a new instance of the MethodInjectingTypeBuilder class.

비공개 메소드들

메소드 설명
CalculateMethodAttributes ( MethodInfo method ) : MethodAttributes
DefineConstructors ( TypeBuilder typeBuilder ) : TypeBuilder
DefineFields ( TypeBuilder typeBuilder ) : TypeBuilder
DefineMethods ( TypeBuilder typeBuilder ) : TypeBuilder

Defines overrides for those methods that are configured with an appropriate Spring.Objects.Factory.Support.MethodOverride.

DefineProperties ( TypeBuilder typeBuilder ) : TypeBuilder
DefineReplacedMethod ( TypeBuilder typeBuilder, MethodInfo method, FieldBuilder field ) : void

Override the supplied method with the logic encapsulated by the Spring.Objects.Factory.Support.IMethodReplacer defined by the supplied field.

DefineReturnValueIfAny ( MethodInfo method, ILGenerator il ) : LocalBuilder

Generates the MSIL for a return value if the supplied method returns a value.

DefineType ( ) : TypeBuilder
DefineWritePropertyForMethodReplacement ( TypeBuilder typeBuilder, string propertyName, FieldBuilder field ) : void

Simply generates the IL for a write only property for the IMethodReplacer System.Type.

PushArguments ( ParameterInfo methodParameters, ILGenerator il ) : void

Pushes (sets up) the arguments for a call to the Spring.Objects.Factory.Support.IMethodReplacer.Implement(object, MethodInfo, object[]) method of an appropriate Spring.Objects.Factory.Support.IMethodReplacer.

SetupTheReturnValueIfAny ( LocalBuilder returnValue, ILGenerator il ) : void

Generates the MSIL for actually returning a return value if the supplied returnValue is not .

메소드 상세

BuildType() 공개 메소드

Builds a System.Type suitable for Method-Injection.
public BuildType ( ) : Type
리턴 System.Type

MethodInjectingTypeBuilder() 공개 메소드

Creates a new instance of the MethodInjectingTypeBuilder class.
/// If either of the supplied arguments is . ///
public MethodInjectingTypeBuilder ( ModuleBuilder module, Spring.Objects.Factory.Support.RootObjectDefinition objectDefinition ) : System
module System.Reflection.Emit.ModuleBuilder /// The in which /// the generated is to be defined. ///
objectDefinition Spring.Objects.Factory.Support.RootObjectDefinition /// The object definition that is the target of the method injection. ///
리턴 System