internal TopSetPropertyInterceptionAspectWeaver(IPropertyAspectDefinition aspectDefinition, IAspectWeavingSettings aspectWeavingSettings, FieldInfo weavedType) : base(aspectDefinition, aspectWeavingSettings, weavedType) { argumentsWeavingSettings.BindingsDependency = weavedType; argumentsWeavingSettings.Parameters = new[] { aspectDefinition.Member.PropertyType }; argumentsWeaver = new TopSetPropertyInterceptionArgumentsWeaver(aspectDefinition.Member, argumentsWeavingSettings, aspectWeavingSettings); weaver = new MethodScopeWeaversQueue(methodScopeWeavers); }
internal static Type ToAspectArgumentImpl(this IPropertyAspectDefinition aspectDefinition) { var property = aspectDefinition.Member; var method = aspectDefinition.IsGetPropertyAspectDefinition() ? property.GetGetMethod() : property.GetSetMethod(); return(aspectDefinition.ToAspectArgumentImpl(method)); }
internal BindingSetPropertyInterceptionAspectWeaver(IPropertyAspectDefinition aspectDefinition, IAspectWeavingSettings aspectWeavingSettings, FieldInfo weavedType) : base(aspectDefinition, aspectWeavingSettings, weavedType) { IMethodScopeWeaver finallyWeaver = null; argumentsWeavingSettings.BindingsDependency = weavedType; argumentsWeavingSettings.Parameters = new[] { aspectDefinition.Member.PropertyType }; finallyWeaver = new FinallyBindingPropertyAspectWeaver(aspectDefinition.Member, argumentsWeavingSettings, aspectWeavingSettings); argumentsWeaver = new BindingSetPropertyInterceptionArgumentsWeaver(aspectDefinition.Member, argumentsWeavingSettings, aspectWeavingSettings); weaver = new TryFinallyAspectWeaver(methodScopeWeavers, new[] { finallyWeaver }); }
private static BindingSettings ToPropertyBindingSettings(this IPropertyAspectDefinition aspectDefinition) { var aspectArgumentType = aspectDefinition.GetArgumentType(); var aspectArgumentImplType = aspectDefinition.ToAspectArgumentImpl(); var genericArguments = aspectArgumentImplType.GetGenericArguments(); return(new BindingSettings { MemberType = MemberTypes.Property, MemberInfo = aspectDefinition.Member, ArgumentType = aspectArgumentImplType, BindingType = aspectArgumentType.MakeGenericPropertyBinding(genericArguments) }); }
internal static Type ToAspectArgumentImpl(this IAspectDefinition aspectDefinition) { IPropertyAspectDefinition propertyAspectDefinition = null; var methodAspectDefinition = aspectDefinition as IMethodAspectDefinition; if (methodAspectDefinition.IsNotNull()) { return(methodAspectDefinition.ToAspectArgumentImpl()); } propertyAspectDefinition = aspectDefinition as IPropertyAspectDefinition; if (propertyAspectDefinition.IsNotNull()) { return(propertyAspectDefinition.ToAspectArgumentImpl()); } return(((IEventAspectDefinition)aspectDefinition).ToAspectArgumentImpl()); }
internal static BindingSettings ToBindingSettings(this IAspectDefinition aspectDefinition) { IPropertyAspectDefinition propertyAspectDefinition = null; var methodAspectDefinition = aspectDefinition as IMethodAspectDefinition; if (methodAspectDefinition.IsNotNull()) { return(methodAspectDefinition.ToMethodBindingSettings()); } propertyAspectDefinition = aspectDefinition as IPropertyAspectDefinition; if (propertyAspectDefinition.IsNotNull()) { return(propertyAspectDefinition.ToPropertyBindingSettings()); } return(((IEventAspectDefinition)aspectDefinition).ToEventBindingSettings()); }
internal AbstractPartialAspectPropertyExpression(IAspectExpression aspectExpression, IPropertyAspectDefinition aspectDefinition = null) : base(aspectDefinition) { this.aspectExpression = aspectExpression; }
internal AbstractPartialPropertyInterceptionBindingWeaver(IAspectExpression aspectExpression, IPropertyAspectDefinition aspectDefinition, IAspectWeavingSettings aspectWeavingSettings) : base(aspectDefinition, aspectWeavingSettings) { this.aspectExpression = aspectExpression; }
public SetPropertyBindingTypeReflectorBuilder(IPropertyAspectDefinition aspectDefinition) { lazyBindingTypeReflector = new Core.Lib.Lazy <IAspectExpression, IAspectWeavingSettings, IBindingTypeReflector>((setAspectExpression, aspectWeavingSettings) => { return(new IsolatedSetPropertyInterceptionBindingWeaver(setAspectExpression, aspectDefinition, aspectWeavingSettings)); }); }
internal AbstractPropertyInterceptionBindingWeaver(IPropertyAspectDefinition aspectDefinition, IAspectWeavingSettings aspectWeavingSettings) : base(aspectDefinition) { this.aspectWeavingSettings = aspectWeavingSettings; lazyWeavedType = new Core.Lib.Lazy<FieldInfo>(WeaveType); }
internal IsolatedGetPropertyInterceptionBindingWeaver(IAspectExpression aspectExpression, IPropertyAspectDefinition aspectDefinition, IAspectWeavingSettings aspectWeavingSettings) : base(aspectExpression, aspectDefinition, aspectWeavingSettings) { }
internal IsolatedFullPropertyInterceptionBindingWeaver(IAspectExpression getAspectExpression, IAspectExpression setAspectExpression, IPropertyAspectDefinition aspectDefinition, IAspectWeavingSettings aspectWeavingSettings) : base(aspectDefinition, aspectWeavingSettings) { this.getAspectExpression = getAspectExpression; this.setAspectExpression = setAspectExpression; }
internal TopGetPropertyInterceptionAspectExpression(IAspectExpression aspectExpression, IPropertyAspectDefinition aspectDefinition = null) : base(aspectExpression, aspectDefinition) { }
internal BindingSetPropertyAspectDecoratorExpression(IPropertyAspectDefinition aspectDefinition) { this.aspectDefinition = aspectDefinition; }
internal AbstractPropertyInterceptionBindingWeaver(IPropertyAspectDefinition aspectDefinition, IAspectWeavingSettings aspectWeavingSettings) : base(aspectDefinition) { this.aspectWeavingSettings = aspectWeavingSettings; lazyWeavedType = new Core.Lib.Lazy <FieldInfo>(WeaveType); }
internal TopSetPropertyFragmentInterceptionAspectExpression(IAspectExpression aspectExpression, IPropertyAspectDefinition aspectDefinition, IBindingTypeReflectorBuilder propertyBuilder) : base(aspectExpression, propertyBuilder, aspectDefinition) { }
internal AbstractAspectPropertyExpression(IPropertyAspectDefinition aspectDefinition = null) { this.aspectDefinition = aspectDefinition; }
public SetPropertyBindingTypeReflectorBuilder(IPropertyAspectDefinition aspectDefinition) { lazyBindingTypeReflector = new Core.Lib.Lazy<IAspectExpression, IAspectWeavingSettings, IBindingTypeReflector>((setAspectExpression, aspectWeavingSettings) => { return new IsolatedSetPropertyInterceptionBindingWeaver(setAspectExpression, aspectDefinition, aspectWeavingSettings); }); }
internal AbstractPartialPropertyFragmentAspectExpression(IAspectExpression aspectExpression, IBindingTypeReflectorBuilder propertyBuilder, IPropertyAspectDefinition aspectDefinition = null) : base(aspectExpression, aspectDefinition) { this.propertyBuilder = propertyBuilder; }
internal BindingGetPropertyFragmentInterceptionAspectExpression(IAspectExpression aspectExpression, IPropertyAspectDefinition aspectDefinition, IBindingTypeReflectorBuilder propertyBuilder) : base(aspectExpression, propertyBuilder, aspectDefinition) { }
internal BindingSetPropertyInterceptionAspectExpression(IAspectExpression aspectExpression, IPropertyAspectDefinition aspectDefinition = null) : base(aspectExpression, aspectDefinition) { }