AspectSharp.Core.Matchers.DefaultAspectMatcher.Match C# (CSharp) Метод

Match() публичный Метод

public Match ( Type targetType, AspectDefinitionCollection aspects ) : AspectSharp.Lang.AST.AspectDefinition[]
targetType System.Type
aspects AspectSharp.Lang.AST.AspectDefinitionCollection
Результат AspectSharp.Lang.AST.AspectDefinition[]
		public AspectDefinition[] Match(Type targetType, AspectDefinitionCollection aspects)
		{
			// TODO: think about caches here...

			ArrayList list = new ArrayList();

			foreach (AspectDefinition aspect in aspects)
			{
				IClassMatcher matcher = ObtainClassMatcher(aspect);

				if (matcher.Match(targetType, aspect))
				{
					list.Add(aspect);
				}
			}

			return (AspectDefinition[]) list.ToArray(typeof (AspectDefinition));
		}