1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace AspectSharp
.Lang
.AST
19 public enum TargetStrategyEnum
29 /// Summary description for TargetTypeDefinition.
32 public class TargetTypeDefinition
: NodeBase
34 private TypeReference _singleType
;
35 private String _namespaceRoot
;
36 private TypeReferenceCollection _excludes
;
37 private TargetStrategyEnum _strategy
= TargetStrategyEnum
.Undefined
;
38 private TypeReference _customMatcherType
;
39 private TypeReference _assignType
;
40 private bool _includeSubNamespace
= false;
42 public TargetTypeDefinition( TypeReference typeRef
) : this()
47 public TargetTypeDefinition()
49 _strategy
= TargetStrategyEnum
.SingleType
;
52 public TypeReference SingleType
54 get { return _singleType; }
55 set { _singleType = value; }
58 public TypeReference CustomMatcherType
60 get { return _customMatcherType; }
61 set { _customMatcherType = value; }
64 public TypeReference AssignType
66 get { return _assignType; }
67 set { _assignType = value; }
70 public TargetStrategyEnum TargetStrategy
72 get { return _strategy; }
73 set { _strategy = value; }
76 public String NamespaceRoot
78 get { return _namespaceRoot; }
79 set { _namespaceRoot = value; }
82 public bool IncludeSubNamespace
84 get { return _includeSubNamespace; }
85 set { _includeSubNamespace = value; }
88 public TypeReferenceCollection Excludes
92 if (_excludes
== null)
94 _excludes
= new TypeReferenceCollection();
100 public override void Accept(IVisitor visitor
)
102 visitor
.OnTargetTypeDefinition(this);