AspectSharp.Core.Matchers.DefaultJoinPointMatcher.FlagsMatchMethodType C# (CSharp) Метод

FlagsMatchMethodType() защищенный Метод

protected FlagsMatchMethodType ( MethodInfo method, PointCutDefinition pointcut ) : bool
method System.Reflection.MethodInfo
pointcut AspectSharp.Lang.AST.PointCutDefinition
Результат bool
		protected virtual bool FlagsMatchMethodType(MethodInfo method, PointCutDefinition pointcut)
		{
			if (!method.IsSpecialName && ((int) (pointcut.Flags & PointCutFlags.Method)) == 0)
			{
				return false;
			}

			if (method.IsSpecialName)
			{
				if (pointcut.Flags == PointCutFlags.Method)
				{
					return false;
				}

				if (((int) (pointcut.Flags & PointCutFlags.Property)) == 0)
				{
					bool isPropertyGet = method.Name.StartsWith("get");

					if ((!isPropertyGet && ((int) (pointcut.Flags & PointCutFlags.PropertyRead)) != 0) ||
						(isPropertyGet && ((int) (pointcut.Flags & PointCutFlags.PropertyWrite) != 0)))
					{
						return false;
					}
				}
			}

			return true;
		}
	}