Summary description for AspectDefinitionCollection.
Inheritance: NodeCollectionBase
Esempio n. 1
0
		public EngineConfiguration() : base()
		{
			_imports = new ImportDirectiveCollection();
			_interceptors = new InterceptorGlobalDeclarationCollection();
			_mixins = new MixinGlobalDeclarationCollection();
			_aspects = new AspectDefinitionCollection();
		}
Esempio n. 2
0
 public EngineConfiguration() : base()
 {
     _imports      = new ImportDirectiveCollection();
     _interceptors = new InterceptorGlobalDeclarationCollection();
     _mixins       = new MixinGlobalDeclarationCollection();
     _aspects      = new AspectDefinitionCollection();
 }
Esempio n. 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 );
			}
		}
Esempio n. 4
0
		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));
		}