C# Class Castle.MonoRail.Views.Brail.ExpandDuckTypedExpressions_WorkaroundForDuplicateVirtualMethods

This is here because we need to overcome a tendecy of Dynamic Proxy to generate virtual override that do not match exactly what the compiler does. This means that when you do GetMethod("Foo") and DP has proxied it, you would get an exception because it would recognize two methods with this name. We recognize when we are trying to invoke something that DP has build and act accordingly. The code is mostly taken fro Boo.Lang.Runtime.RuntimeServices, and modified to understand that when the type is from DP, is should use DeclareOnly
Inheritance: Boo.Lang.Compiler.Steps.ExpandDuckTypedExpressions
Mostra file Open project: nats/castle-1.0.3-mono Class Usage Examples

Public Methods

Method Description
GetProperty ( object target, string name ) : object
GetSlice ( object target, string name, object args ) : object
Invoke ( object target, string name, object args ) : object
SetProperty ( object target, string name, object value ) : object
SetSlice ( object target, string name, object args ) : object

Protected Methods

Method Description
InitializeDuckTypingServices ( ) : void

Private Methods

Method Description
GetArraySlice ( object target, object args ) : object
GetDefaultMemberName ( Type type ) : String
GetGetMethod ( PropertyInfo property ) : MethodInfo
GetMember ( Type type, string name ) : System.Reflection.MemberInfo[]
GetResolvedMethod ( IType type, string name ) : IMethod
GetSetMethod ( PropertyInfo property ) : MethodInfo
GetSlice ( object target, MemberInfo member, object args ) : object
IsGetArraySlice ( object target, object args ) : bool
IsSetArraySlice ( object target, object args ) : bool
MemberNotSupported ( MemberInfo member ) : void
ResolveFlagsToUse ( Type type, BindingFlags flags ) : BindingFlags
SelectSliceMember ( MemberInfo found, object &args, SetOrGet sliceKind ) : MemberInfo
SetArraySlice ( object target, object args ) : object
SetSlice ( object target, MemberInfo member, object args ) : object

Method Details

GetProperty() public static method

public static GetProperty ( object target, string name ) : object
target object
name string
return object

GetSlice() public static method

public static GetSlice ( object target, string name, object args ) : object
target object
name string
args object
return object

InitializeDuckTypingServices() protected method

protected InitializeDuckTypingServices ( ) : void
return void

Invoke() public static method

public static Invoke ( object target, string name, object args ) : object
target object
name string
args object
return object

SetProperty() public static method

public static SetProperty ( object target, string name, object value ) : object
target object
name string
value object
return object

SetSlice() public static method

public static SetSlice ( object target, string name, object args ) : object
target object
name string
args object
return object