public AspectMap(MemberInfo target, MemberInfo contract, MethodInfo method, IAspectDefinitionCollection aspects) { Method = method; Target = target; Aspects = aspects; Contract = contract; }
public AspectMap(MemberInfo target, MemberInfo contract, MethodInfo method, IAspectDefinitionCollection aspects) { Method = method; Target = target; Aspects = aspects; Contract = contract; }
internal CompositeMethodWeaver(IAspectDefinitionCollection aspectDefinition, IWeavingSettings weavingSettings) : base(weavingSettings) { methodWeaver = new AspectMethodWeaver(aspectDefinition, weavingSettings); MethodDefintionWeaver = methodWeaver.MethodDefintionWeaver; MethodScopeWeaver = methodWeaver.MethodScopeWeaver; MethodEndWeaver = methodWeaver.MethodEndWeaver; }
internal CompositeRaiseEventWeaver(IEventTypeBuilder eventTypeBuilder, EventInfo @event, MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(eventTypeBuilder, method, aspectDefinitions, aspectWeavingSettings) { var typeBuilder = (IAspectTypeDefinition)aspectWeavingSettings.WeavingSettings.TypeDefinition; var eventFieldBuilder = typeBuilder.GetEventBrokerFielTypeDefinition(@event); methodSignatureWeaver = new RaiseEventMethodSignatureWeaver(eventTypeBuilder, typeBuilder, eventFieldBuilder); }
public AspectMethodWeaver(IAspectDefinitionCollection aspectDefinitions, IWeavingSettings weavingSettings) : base(weavingSettings) { var aspectExpression = new AspectExpressionTreeBuilder(aspectDefinitions, weavingSettings).Build(); MethodEndWeaver = new MethodEndWeaver(); MethodScopeWeaver = aspectExpression.Reduce(AspectWeavingSettingsImpl.Empty); MethodDefintionWeaver = new MethodSignatureWeaver(weavingSettings.TypeDefinition); }
protected AbstractAspectMethodWeaver(MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) { IAspectExpression aspectExpression = null; var aspectExpressionBuilder = new AspectExpressionTreeBuilder(aspectDefinitions); this.method = method; methodEndWeaver = new MethodEndWeaver(); aspectExpression = aspectExpressionBuilder.Build(); methodScopeWeaver = aspectExpression.Reduce(aspectWeavingSettings); }
protected AbstractAspectMethodWeaver(MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) { IAspectExpression aspectExpression = null; var aspectExpressionBuilder = new AspectExpressionTreeBuilder(aspectDefinitions); this.method = method; methodEndWeaver = new MethodEndWeaver(); aspectExpression = aspectExpressionBuilder.Build(); methodScopeWeaver = aspectExpression.Reduce(aspectWeavingSettings); }
public AspectsWeaver(IAspectExpression aspectExpression, IAspectDefinitionCollection aspectDefinitions, IWeavingSettings weavingSettings) { this.aspectExpression = aspectExpression; aspectArgsMapperWeaver = new AspectArgsMapperWeaver(); aspectAttributeWeaver = new AspectsAttributeWeaver(aspectDefinitions); settings = new AspectWeavingSettingsImpl { WeavingSettings = weavingSettings, AspectRepository = aspectAttributeWeaver, AspectArgsMapper = aspectArgsMapperWeaver }; }
internal AspectExpressionTreeBuilder(IAspectDefinitionCollection aspectDefinitions) { var aspectVisitor = new AspectVisitor(); IAspectDefinition lastAspectDefinition = null; IAspectExpressionBuilder invocationAspectBuilder = null; IArgumentsWeavingSettings argumentsWeavingSettings = null; List <IAspectExpressionBuilder> aspectExpressionBuilders = null; var aspectsByPriority = aspectDefinitions.OrderBy(aspect => aspect.Aspect.AspectPriority) .ThenBy(aspect => { var value = aspect.Aspect is OnMethodBoundaryAspectAttribute; return(Convert.ToInt32(!value)); }); lastAspectDefinition = aspectDefinitions.First(); argumentsWeavingSettings = lastAspectDefinition.ToArgumentsWeavingSettings(); aspectExpressionBuilders = aspectsByPriority.ToList(definition => definition.BuildAdvices().Accept(aspectVisitor)); invocationAspectBuilder = aspectVisitor.VisitLast(lastAspectDefinition, argumentsWeavingSettings); aspectExpressionBuilders.Add(invocationAspectBuilder); aspectsStack = new Stack <IAspectExpressionBuilder>(aspectExpressionBuilders); }
internal CompositeMethodWeaver(MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(method, aspectDefinitions, aspectWeavingSettings) { }
internal AspectExpression(IAspectExpression aspectExpression, IAspectDefinitionCollection aspectsDefinitions, IWeavingSettings weavingSettings) { this.weavingSettings = weavingSettings; this.aspectExpression = aspectExpression; this.aspectsDefinitions = aspectsDefinitions; }
public AspectPropertyWeaver(MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(method, aspectDefinitions, aspectWeavingSettings) { }
public AspectEventWeaver(IEventTypeBuilder eventTypeBuilder, MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(method, aspectDefinitions, aspectWeavingSettings) { this.eventTypeBuilder = eventTypeBuilder; }
internal CompositeRaiseEventWeaver(IEventTypeBuilder eventTypeBuilder, EventInfo @event, MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(eventTypeBuilder, method, aspectDefinitions, aspectWeavingSettings) { var typeBuilder = (IAspectTypeDefinition)aspectWeavingSettings.WeavingSettings.TypeDefinition; var eventFieldBuilder = typeBuilder.GetEventBrokerFielTypeDefinition(@event); methodSignatureWeaver = new RaiseEventMethodSignatureWeaver(eventTypeBuilder, typeBuilder, eventFieldBuilder); }
public GetPropertyAspectWeaver(IPropertyTypeBuilder propertyTypeBuilder, MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(method, aspectDefinitions, aspectWeavingSettings) { methodSignatureWeaver = new GetPropertyMethodSignatureWeaver(propertyTypeBuilder, aspectWeavingSettings.WeavingSettings.TypeDefinition); }
internal AbstractCompositeMap(Type contractType, Type implementationType, TMember contractMember, TMember implementationMember, IAspectDefinitionCollection aspectDefinitions) : base(contractType, implementationType, contractMember, implementationMember) { AspectDefinitions = aspectDefinitions; HasAspectDefinitions = aspectDefinitions.IsNotNullOrEmpty(); }
internal AbstractCompositeFragmentEventMap(Type contractType, Type implementationType, EventInfo contractEvent, EventInfo implementationEvent, IAspectDefinitionCollection aspectDefinitions) : base(contractType, implementationType, contractEvent, implementationEvent, aspectDefinitions) { }
public AspectPropertyWeaver(MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(method, aspectDefinitions, aspectWeavingSettings) { }
public CompositePropertyMap(Type contractType, Type implementationType, PropertyInfo contractProperty, PropertyInfo implementationProperty, IAspectDefinitionCollection aspectDefinitions) : base(contractType, implementationType, contractProperty, implementationProperty) { AspectDefinitions = aspectDefinitions; HasAspectDefinitions = aspectDefinitions.IsNotNullOrEmpty(); }
internal AbstractCompositeFragmentPropertyMap(Type contractType, Type implementationType, PropertyInfo contractProperty, PropertyInfo implementationProperty, IAspectDefinitionCollection aspectDefinitions) : base(contractType, implementationType, contractProperty, implementationProperty, aspectDefinitions) { }
public AspectsAttributeWeaver(IAspectDefinitionCollection aspectDefinitions) { this.aspectDefinitions = aspectDefinitions; }
public AspectEventWeaver(IEventTypeBuilder eventTypeBuilder, MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(method, aspectDefinitions, aspectWeavingSettings) { this.eventTypeBuilder = eventTypeBuilder; }
public CompositeRaiseEventMap(Type contractType, Type implementationType, EventInfo contractEvent, EventInfo implementationEvent, IAspectDefinitionCollection aspectDefinitions) : base(contractType, implementationType, contractEvent, implementationEvent, aspectDefinitions) { FragmentMethod = contractEvent.GetInvokeMethod(); }
public CompositeSetPropertyWeaver(IPropertyTypeBuilder propertyTypeBuilder, PropertyInfo property, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(property.GetSetMethod(), aspectDefinitions, aspectWeavingSettings) { methodSignatureWeaver = new SetPropertyMethodSignatureWeaver(propertyTypeBuilder, aspectWeavingSettings.WeavingSettings.TypeDefinition); }
public CompositeRaiseEventMap(Type contractType, Type implementationType, EventInfo contractEvent, EventInfo implementationEvent, IAspectDefinitionCollection aspectDefinitions) : base(contractType, implementationType, contractEvent, implementationEvent, aspectDefinitions) { FragmentMethod = contractEvent.GetInvokeMethod(); }
internal CompositeMethodWeaver(MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(method, aspectDefinitions, aspectWeavingSettings) { }
public CompositeMethodMap(Type contractType, Type implementationType, MethodInfo contractMethod, MethodInfo implementationMethod, IAspectDefinitionCollection aspectDefinitions) : base(contractType, implementationType, contractMethod, implementationMethod) { AspectDefinitions = aspectDefinitions; HasAspectDefinitions = aspectDefinitions.IsNotNullOrEmpty(); }
internal CompositeAddEventWeaver(IEventTypeBuilder eventTypeBuilder, MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(eventTypeBuilder, method, aspectDefinitions, aspectWeavingSettings) { methodSignatureWeaver = new AddEventMethodSignatureWeaver(eventTypeBuilder, aspectWeavingSettings.WeavingSettings.TypeDefinition); }
public CompositeGetPropertyWeaver(IPropertyTypeBuilder propertyTypeBuilder, PropertyInfo property, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(property.GetGetMethod(), aspectDefinitions, aspectWeavingSettings) { methodSignatureWeaver = new GetPropertyMethodSignatureWeaver(propertyTypeBuilder, aspectWeavingSettings.WeavingSettings.TypeDefinition); }
internal CompositeGetPropertyMap(Type contractType, Type implementationType, PropertyInfo contractProperty, PropertyInfo implementationProperty, IAspectDefinitionCollection aspectDefinitions) : base(contractType, implementationType, contractProperty, implementationProperty, aspectDefinitions) { FragmentMethod = contractProperty.GetGetMethod(); }
internal CompositeGetPropertyMap(Type contractType, Type implementationType, PropertyInfo contractProperty, PropertyInfo implementationProperty, IAspectDefinitionCollection aspectDefinitions) : base(contractType, implementationType, contractProperty, implementationProperty, aspectDefinitions) { FragmentMethod = contractProperty.GetGetMethod(); }
public GetPropertyAspectWeaver(IPropertyTypeBuilder propertyTypeBuilder, MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(method, aspectDefinitions, aspectWeavingSettings) { methodSignatureWeaver = new GetPropertyMethodSignatureWeaver(propertyTypeBuilder, aspectWeavingSettings.WeavingSettings.TypeDefinition); }
public AspectMap(MemberInfo member, IAspectDefinitionCollection aspects) { Member = member; Aspects = aspects; }
protected AspectMethodWeaver(MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(method, aspectDefinitions, aspectWeavingSettings) { methodSignatureWeaver = new MethodSignatureWeaver(aspectWeavingSettings.WeavingSettings.TypeDefinition); }
internal CompositeRemoveEventWeaver(IEventTypeBuilder eventTypeBuilder, MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(eventTypeBuilder, method, aspectDefinitions, aspectWeavingSettings) { methodSignatureWeaver = new RemoveEventMethodSignatureWeaver(eventTypeBuilder, aspectWeavingSettings.WeavingSettings.TypeDefinition); }
protected AspectMethodWeaver(MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) : base(method, aspectDefinitions, aspectWeavingSettings) { methodSignatureWeaver = new MethodSignatureWeaver(aspectWeavingSettings.WeavingSettings.TypeDefinition); }