コード例 #1
0
        public PresentationPointcut(PresentationAspect aspect, IPointcut pointcut)
        {
            this.aspect = aspect;

            this.Name = pointcut.Name;

            foreach (PointcutTarget target in pointcut.Targets)
            {
                PresentationPointcutTarget presTarget = new PresentationPointcutTarget(this, target);
                this.Targets.Add(presTarget);
            }

            foreach (object interceptor in pointcut.Interceptors)
            {
                string typeName = "";
                if (interceptor is Type)
                {
                    typeName = ((Type)interceptor).FullName;
                }
                else
                {
                    typeName = (string)interceptor;
                }

                PresentationInterceptor presInterceptor = new PresentationInterceptor(this, typeName);
                this.Interceptors.Add(presInterceptor);
            }
        }
コード例 #2
0
        public InterceptorNode(PresentationInterceptor interceptor)
            : base(interceptor.TypeName)
        {
            this.interceptor = interceptor;

            this.ImageIndex = 7;
            this.SelectedImageIndex = 7;
        }
コード例 #3
0
        public PresentationPointcut(PresentationAspect aspect, IPointcut pointcut)
        {
            this.aspect = aspect;

            this.Name = pointcut.Name;

            foreach (PointcutTarget target in pointcut.Targets)
            {
                PresentationPointcutTarget presTarget = new PresentationPointcutTarget(this, target);
                this.Targets.Add(presTarget);
            }

            foreach (object interceptor in pointcut.Interceptors)
            {
                string typeName = "";
                if (interceptor is Type)
                    typeName = ((Type)interceptor).FullName;
                else
                    typeName = (string)interceptor;

                PresentationInterceptor presInterceptor = new PresentationInterceptor(this, typeName);
                this.Interceptors.Add(presInterceptor);
            }
        }
コード例 #4
0
        private static void SerializeInterceptor(PresentationInterceptor interceptor, XmlDocument xmlDoc, XmlNode pointcutNode)
        {
            XmlNode interceptorNode = xmlDoc.CreateElement("interceptor");

            XmlAttribute typeAttrib = xmlDoc.CreateAttribute("type");
            typeAttrib.Value = interceptor.TypeName;
            interceptorNode.Attributes.Append(typeAttrib);

            pointcutNode.AppendChild(interceptorNode);
        }
コード例 #5
0
 public InterceptorProperties(PresentationInterceptor interceptor)
 {
     this.interceptor = interceptor;
 }
コード例 #6
0
        private void ShowInterceptorMethods(PresentationInterceptor interceptor)
        {
            listViewMaster = interceptor;

            ShowAppliedMethods(interceptor.AppliedOnMethods);
        }
コード例 #7
0
 private void RemoveInterceptor(PresentationInterceptor interceptor)
 {
     interceptor.Pointcut.Interceptors.Remove(interceptor);
     RefreshAll();
 }
コード例 #8
0
 private void AddInterceptor(PresentationPointcut pointcut)
 {
     PresentationInterceptor interceptor = new PresentationInterceptor(pointcut);
     interceptor.TypeName = "[New Interceptor]";
     pointcut.Interceptors.Add(interceptor);
     RefreshAll();
 }