protected InvocationTypeGenerator(Type targetType, MetaMethod method, MethodInfo callback, bool canChangeTarget,
                                   IInvocationCreationContributor contributor)
 {
     this.targetType      = targetType;
     this.method          = method;
     this.callback        = callback;
     this.canChangeTarget = canChangeTarget;
     this.contributor     = contributor;
 }
Example #2
0
 public MethodWithInvocationGenerator(MetaMethod method, Reference interceptors, Type invocation,
                                      GetTargetExpressionDelegate getTargetExpression,
                                      OverrideMethodDelegate createMethod, IInvocationCreationContributor contributor)
     : base(method, createMethod)
 {
     this.invocation          = invocation;
     this.getTargetExpression = getTargetExpression;
     this.interceptors        = interceptors;
     this.contributor         = contributor;
 }
 public MetaProperty(string name, Type propertyType, Type declaringType, MetaMethod getter, MetaMethod setter,
                     IEnumerable <CustomAttributeBuilder> customAttributes, Type[] arguments)
     : base(declaringType)
 {
     this.name             = name;
     type                  = propertyType;
     this.getter           = getter;
     this.setter           = setter;
     attributes            = PropertyAttributes.None;
     this.customAttributes = customAttributes;
     this.arguments        = arguments ?? Type.EmptyTypes;
 }
Example #4
0
 /// <summary>
 ///   Initializes a new instance of the <see cref = "MetaEvent" /> class.
 /// </summary>
 /// <param name = "name">The name.</param>
 /// <param name = "declaringType">Type declaring the original event being overridden, or null.</param>
 /// <param name = "eventDelegateType"></param>
 /// <param name = "adder">The add method.</param>
 /// <param name = "remover">The remove method.</param>
 /// <param name = "attributes">The attributes.</param>
 public MetaEvent(string name, Type declaringType, Type eventDelegateType, MetaMethod adder, MetaMethod remover,
                  EventAttributes attributes)
     : base(declaringType)
 {
     if (adder == null)
     {
         throw new ArgumentNullException("adder");
     }
     if (remover == null)
     {
         throw new ArgumentNullException("remover");
     }
     this.name    = name;
     type         = eventDelegateType;
     this.adder   = adder;
     this.remover = remover;
     Attributes   = attributes;
 }
 public CompositionInvocationTypeGenerator(Type target, MetaMethod method, MethodInfo callback, bool canChangeTarget,
                                           IInvocationCreationContributor contributor)
     : base(target, method, callback, canChangeTarget, contributor)
 {
 }
Example #6
0
 public InheritanceInvocationTypeGenerator(Type targetType, MetaMethod method, MethodInfo callback,
                                           IInvocationCreationContributor contributor)
     : base(targetType, method, callback, false, contributor)
 {
 }
Example #7
0
 public void AddMethod(MetaMethod method)
 {
     methods.Add(method);
 }
 public MethodWithInvocationGenerator(MetaMethod method, Reference interceptors, Type invocation,
                                      GetTargetExpressionDelegate getTargetExpression,
                                      OverrideMethodDelegate createMethod, IInvocationCreationContributor contributor)
     : this(method, interceptors, invocation, getTargetExpression, null, createMethod, contributor)
 {
 }
Example #9
0
 protected MethodGenerator(MetaMethod method, OverrideMethodDelegate overrideMethod)
 {
     this.method         = method;
     this.overrideMethod = overrideMethod;
 }