public PresentationAspect(IGenericAspect aspect) { this.Name = aspect.Name; foreach (AspectTarget target in aspect.Targets) { PresentationAspectTarget presTarget = new PresentationAspectTarget(this, target); this.Targets.Add(presTarget); } foreach (IPointcut pointcut in aspect.Pointcuts) { PresentationPointcut presPointcut = new PresentationPointcut(this, pointcut); this.Pointcuts.Add(presPointcut); } foreach (object mixin in aspect.Mixins) { string typeName = ""; if (mixin is Type) { typeName = ((Type)mixin).FullName; } else { typeName = (string)mixin; } PresentationMixin presMixin = new PresentationMixin(this, typeName); this.Mixins.Add(presMixin); } }
private static void SerializePointcut(PresentationPointcut pointcut, XmlDocument xmlDoc, XmlNode aspectNode) { XmlNode pointcutNode = xmlDoc.CreateElement("pointcut"); if (pointcut.Name != "") { XmlAttribute nameAttrib = xmlDoc.CreateAttribute("name"); nameAttrib.Value = pointcut.Name; pointcutNode.Attributes.Append(nameAttrib); } aspectNode.AppendChild(pointcutNode); foreach (PresentationPointcutTarget target in pointcut.Targets) SerializePointcutTarget(target, xmlDoc, pointcutNode); foreach (PresentationInterceptor interceptor in pointcut.Interceptors) SerializeInterceptor(interceptor, xmlDoc, pointcutNode); }
public PresentationInterceptor(PresentationPointcut pointcut, string interceptor) { this.pointcut = pointcut; this.typeName = interceptor; }
public PresentationInterceptor(PresentationPointcut pointcut) { this.pointcut = pointcut; }
private void ShowPointcutMethods(PresentationPointcut pointcut) { listViewMaster = pointcut; ShowAppliedMethods(pointcut.AppliedOnMethods); }
private void RemovePointcut(PresentationPointcut pointcut) { pointcut.Aspect.Pointcuts.Remove(pointcut); RefreshAll(); }
private void AddPointcutTarget(PresentationPointcut pointcut) { PresentationPointcutTarget pointcutTarget = new PresentationPointcutTarget(pointcut); pointcutTarget.Signature = "[New Pointcut Target]"; pointcutTarget.TargetType = PointcutTargetType.Signature; pointcut.Targets.Add(pointcutTarget); RefreshAll(); }
private void AddPointcut(PresentationAspect aspect) { PresentationPointcut pointcut = new PresentationPointcut(aspect); pointcut.Name = "New Pointcut"; aspect.Pointcuts.Add(pointcut); RefreshAll(); }
private void AddInterceptor(PresentationPointcut pointcut) { PresentationInterceptor interceptor = new PresentationInterceptor(pointcut); interceptor.TypeName = "[New Interceptor]"; pointcut.Interceptors.Add(interceptor); RefreshAll(); }