Summary description for AspectDefinitionCollection.
Inheritance: NodeCollectionBase
		public EngineConfiguration() : base()
		{
			_imports = new ImportDirectiveCollection();
			_interceptors = new InterceptorGlobalDeclarationCollection();
			_mixins = new MixinGlobalDeclarationCollection();
			_aspects = new AspectDefinitionCollection();
		}
Beispiel #2
0
 public EngineConfiguration() : base()
 {
     _imports      = new ImportDirectiveCollection();
     _interceptors = new InterceptorGlobalDeclarationCollection();
     _mixins       = new MixinGlobalDeclarationCollection();
     _aspects      = new AspectDefinitionCollection();
 }
Beispiel #3
0
		private void CheckAspects(AspectDefinitionCollection aspects)
		{
			foreach(AspectDefinition aspect in aspects)
			{
				AssertUnique( _aspectNames, aspect, aspect.Name, "The name given to an aspect must be unique" );
				AssertNotNull( aspect, aspect.TargetType, "Aspect must have a target type" );
				CheckIncludes( aspect.Mixins );
				CheckPointcuts( aspect.PointCuts );
			}
		}
		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));
		}