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; }
public MetaProperty(PropertyInfo property, MetaMethod getter, MetaMethod setter, IEnumerable <CustomAttributeBuilder> customAttributes, Type[] arguments) : base(property) { this.getter = getter; this.setter = setter; attributes = PropertyAttributes.None; this.customAttributes = customAttributes; this.arguments = arguments ?? Type.EmptyTypes; }
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, PropertyAttributes attributes, IEnumerable <CustomAttributeBuilder> customAttributes) : base(declaringType) { this.name = name; this.type = propertyType; this.getter = getter; this.setter = setter; this.attributes = attributes; this.customAttributes = customAttributes; }
public MetaProperty(string name, Type propertyType, Type declaringType, MetaMethod getter, MetaMethod setter, IEnumerable <CustomAttributeBuilder> customAttributes, Type[] arguments) : base(declaringType) { this.name = name; this.type = propertyType; this.getter = getter; this.setter = setter; this.attributes = PropertyAttributes.None; this.customAttributes = customAttributes; this.arguments = arguments ?? Type.EmptyTypes; }
/// <summary> /// Initializes a new instance of the <see cref = "MetaEvent" /> class. /// </summary> /// <param name = "event">The event.</param> /// <param name = "adder">The add method.</param> /// <param name = "remover">The remove method.</param> /// <param name = "attributes">The attributes.</param> public MetaEvent(EventInfo @event, MetaMethod adder, MetaMethod remover, EventAttributes attributes) : base(@event) { if (adder == null) { throw new ArgumentNullException(nameof(adder)); } if (remover == null) { throw new ArgumentNullException(nameof(remover)); } this.adder = adder; this.remover = remover; Attributes = attributes; }
/// <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 overriten, 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; this.type = eventDelegateType; this.adder = adder; this.remover = remover; this.Attributes = attributes; }
public MethodWithInvocationGenerator( MetaMethod method, IExpression interceptors, Type invocation, GetTargetExpressionDelegate getTargetExpression, OverrideMethodDelegate createMethod, IInvocationCreationContributor contributor ) : this( method, interceptors, invocation, getTargetExpression, null, createMethod, contributor ) { }
/// <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 overriten, 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(EventInfo @event, MetaMethod adder, MetaMethod remover, EventAttributes attributes) : base(@event.DeclaringType) { if (adder == null) { throw new ArgumentNullException("adder"); } if (remover == null) { throw new ArgumentNullException("remover"); } this.Event = @event; this.name = @event.Name; type = @event.EventHandlerType; this.adder = adder; this.remover = remover; Attributes = attributes; }
public ForwardingMethodGenerator(MetaMethod method, OverrideMethodDelegate overrideMethod, GetTargetReferenceDelegate getTargetReference) : base(method, overrideMethod) { this.getTargetReference = getTargetReference; }
public void AddMethod(MetaMethod method) { methods.Add(method); }
public InterfaceInvocationTypeGenerator(Type target, MetaMethod method, MethodInfo callback, bool canChangeTarget) : base(target, method, callback, canChangeTarget) { }
protected MethodGenerator(MetaMethod method, OverrideMethodDelegate overrideMethod) { this.method = method; this.overrideMethod = overrideMethod; }
public CompositionInvocationTypeGenerator(Type target, MetaMethod method, MethodInfo callback, bool canChangeTarget, IInvocationCreationContributor contributor) : base(target, method, callback, canChangeTarget, contributor) { }
public InheritanceInvocationTypeGenerator(Type targetType, MetaMethod method, IMethodInfo callback, IInvocationCreationContributor contributor) : base(targetType, method, callback, false, contributor) { }
public MinimalisticMethodGenerator(MetaMethod method, OverrideMethodDelegate overrideMethod) : base(method, overrideMethod) { }
protected MethodGenerator(MetaMethod method, CreateMethodDelegate createMethod) { this.method = method; this.createMethod = createMethod; }
public DelegateTypeGenerator(MetaMethod method, Type targetType) { this.method = method; this.targetType = targetType; }
public ClassInvocationTypeGenerator(Type targetType, MetaMethod method, MethodInfo callback) : base(targetType, method, callback, false) { }
public void AddMethod(MetaMethod method) { methods.Add(method); methodsIndex.Add(method.Method, method); // shouldn't get added twice }