コード例 #1
0
ファイル: AspectPerCFlowAttribute.cs プロジェクト: erhan0/aop
        private IEnumerable <IPointcut> GetPointcuts(AspectDefinition aspect, string pointcutRef)
        {
            var pointcuts = aspect.GetPointcuts(pointcutRef).ToArray();

            if (!pointcuts.Any())
            {
                throw new PointcutNotFoundException(pointcutRef, aspect.Name);
            }

            return(pointcuts);
        }
コード例 #2
0
        private IEnumerable <IPointcut> GetPointcuts(AspectDefinition aspect)
        {
            if (string.IsNullOrEmpty(ActivateOnPointcut))
            {
                return(Enumerable.Empty <IPointcut>());
            }

            var pointcuts = aspect.GetPointcuts(ActivateOnPointcut).ToArray();

            if (!pointcuts.Any())
            {
                throw new PointcutNotFoundException(ActivateOnPointcut, aspect.Name);
            }

            return(pointcuts);
        }