public RemoveEventDecoratorWeaver(IEventTypeBuilder eventTypeBuilder, EventInfo @event, IWeavingSettings weavingSettings) : base(@event.GetRemoveMethod(), weavingSettings) { MethodEndWeaver = new MethodEndWeaver(); MethodScopeWeaver = new RemoveEventDecoratorScopeWeaver(method, weavingSettings); MethodDefintionWeaver = new RemoveEventMethodSignatureWeaver(eventTypeBuilder, weavingSettings.TypeDefinition); }
public MethodDecoratorWeaver(IWeavingSettings weavingSettings) : base(weavingSettings) { MethodEndWeaver = new MethodEndWeaver(); MethodScopeWeaver = new MethodDecoratorScopeWeaver(weavingSettings); MethodDefintionWeaver = new MethodSignatureWeaver(weavingSettings.TypeDefinition); }
public SetPropertyDecoratorWeaver(MethodInfo method, IWeavingSettings weavingSettings) : base(method, weavingSettings) { MethodEndWeaver = new MethodEndWeaver(); MethodScopeWeaver = new SetPropertyDecoratorScopeWeaver(method, weavingSettings); MethodDefintionWeaver = new SetPropertySignatureWeaver(weavingSettings.TypeDefinition); }
public MethodDecoratorWeaver(MethodInfo method, IWeavingSettings weavingSettings) : base(method, weavingSettings) { MethodEndWeaver = new MethodEndWeaver(); MethodScopeWeaver = new MethodDecoratorScopeWeaver(method, weavingSettings); MethodDefintionWeaver = new MethodSignatureWeaver(weavingSettings.TypeDefinition); }
internal CompositeMethodWeaver(IAspectDefinitionCollection aspectDefinition, IWeavingSettings weavingSettings) : base(weavingSettings) { methodWeaver = new AspectMethodWeaver(aspectDefinition, weavingSettings); MethodDefintionWeaver = methodWeaver.MethodDefintionWeaver; MethodScopeWeaver = methodWeaver.MethodScopeWeaver; MethodEndWeaver = methodWeaver.MethodEndWeaver; }
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); }
internal AbstractMethodAspectWeaver(IAspectDefinition aspectDefinition, IAspectWeavingSettings aspectWevingSettings) { advices = aspectDefinition.Advices; this.aspectDefinition = aspectDefinition; this.aspectWeavingSettings = aspectWevingSettings; weavingSettings = aspectWevingSettings.WeavingSettings; aspectRepository = aspectWevingSettings.AspectRepository; argumentsWeavingSetings = aspectDefinition.ToArgumentsWeavingSettings(); aspectDefinition.Advices.ForEach(advice => advice.Accept(adviceDiscoveryVistor)); }
internal AbstractAspectWeaver(IAspectDefinition aspectDefinition, IAspectWeavingSettings aspectWeavingSettings) { advices = aspectDefinition.Advices; this.aspectDefinition = aspectDefinition; this.aspectWeavingSettings = aspectWeavingSettings; bindingSettings = aspectDefinition.ToBindingSettings(); weavingSettings = aspectWeavingSettings.WeavingSettings; aspectRepository = aspectWeavingSettings.AspectRepository; argumentsWeavingSettings = aspectDefinition.ToArgumentsWeavingSettings(); aspectDefinition.Advices.ForEach(advice => advice.Accept(adviceDiscoveryVistor)); }
internal AbstractAspectArgsMappingWeaver(IAspectWeavingSettings aspectWeavingSettings, IArgumentsSettings argumentsSettings) { Type[] @params = null; this.argumentsSettings = argumentsSettings; this.aspectWeavingSettings = aspectWeavingSettings; aspectArgumentType = argumentsSettings.ArgumentType; weavingSettings = aspectWeavingSettings.WeavingSettings; localBuilderRepository = aspectWeavingSettings.LocalBuilderRepository; @params = argumentsSettings.ArgumentType.GetGenericArguments(); parameters = argumentsSettings.Parameters; mappingParameters = @params.Skip(1).ToArray(); }
internal AspectExpressionTreeBuilder(IAspectDefinitionCollection aspectDefinitions, IWeavingSettings weavingSettings) { var aspectVisitor = new AspectVisitor(); IAspectDefinition firstAspectDefinition = 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)); }); this.weavingSettings = weavingSettings; this.aspectsDefinitions = aspectDefinitions; firstAspectDefinition = aspectDefinitions.First(); argumentsWeavingSettings = firstAspectDefinition.ToArgumentsWeavingSettings(); aspectExpressionBuilders = aspectsByPriority.ToList(definition => definition.Accept(aspectVisitor)); invocationAspectBuilder = aspectVisitor.VisitInvocation(firstAspectDefinition, argumentsWeavingSettings); aspectExpressionBuilders.Add(invocationAspectBuilder); aspectsStack = new Stack <IAspectExpressionBuilder>(aspectExpressionBuilders); }
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 }; }
public RemoveEventDecoratorScopeWeaver(MethodInfo method, IWeavingSettings weavingSettings) : base(method, weavingSettings) { }
public MethodDecoratorScopeWeaver(IWeavingSettings weavingSettings) : base(weavingSettings) { }
public SetPropertyDecoratorScopeWeaver(MethodInfo method, IWeavingSettings weavingSettings) : base(method, weavingSettings) { }
protected AbstractMethodWeaver(MethodInfo method, IWeavingSettings weavingSettings) { this.method = method; this.weavingSettings = weavingSettings; }
public AbstractMethodWeaver(IWeavingSettings weavingSettings) { this.weavingSettings = weavingSettings; }
internal AbstractBranchedMethodScopeWeaver(MethodInfo method, IWeavingSettings weavingSettings) : base(method, weavingSettings) { }
protected AbstractAddRemoveEventMethodScopeWeaver(MethodInfo method, IWeavingSettings weavingSettings) : base(method, weavingSettings) { }
internal AbstractBranchedMethodScopeWeaver(IWeavingSettings weavingSettings) : base(weavingSettings) { }
public PropertySetDecoratorScopeWeaver(IWeavingSettings weavingSettings) : base(weavingSettings) { }
internal AspectExpression(IAspectExpression aspectExpression, IAspectDefinitionCollection aspectsDefinitions, IWeavingSettings weavingSettings) { this.weavingSettings = weavingSettings; this.aspectExpression = aspectExpression; this.aspectsDefinitions = aspectsDefinitions; }
public AddEventDecoratorWeaver(IEventTypeBuilder eventTypeBuilder, EventInfo @event, IWeavingSettings weavingSettings) : base(@event.GetAddMethod(), weavingSettings) { MethodEndWeaver = new MethodEndWeaver(); MethodScopeWeaver = new AddEventDecoratorScopeWeaver(method, weavingSettings); MethodDefintionWeaver = new AddEventMethodSignatureWeaver(eventTypeBuilder, weavingSettings.TypeDefinition); }