1 // Copyright 2004-2007 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 Castle
.DynamicProxy
.Tests
.Classes
20 [NonInheritableAttribute
]
21 public class AttributedClass
23 [NonInheritableAttribute
]
24 public virtual void Do1()
29 [ComplexNonInheritableAttribute(1, 2, true, "class", FileAccess
.Write
)]
30 public class AttributedClass2
32 [ComplexNonInheritableAttribute(2, 3, "Do1", Access
= FileAccess
.ReadWrite
)]
33 public virtual void Do1()
37 [ComplexNonInheritableAttribute(3, 4, "Do2", IsSomething
=true)]
38 public virtual void Do2()
44 [AttributeUsage(AttributeTargets
.All
, Inherited
=false)]
45 public class NonInheritableAttribute
: Attribute
50 [AttributeUsage(AttributeTargets
.All
, Inherited
= false)]
51 public class ComplexNonInheritableAttribute
: Attribute
54 public bool isSomething
;
56 public FileAccess access
;
58 public ComplexNonInheritableAttribute(int id
, int num
, string name
)
65 public ComplexNonInheritableAttribute(int id
, int num
, bool isSomething
, string name
, FileAccess access
)
69 this.isSomething
= isSomething
;
84 public bool IsSomething
86 get { return isSomething; }
87 set { isSomething = value; }
95 public FileAccess Access
97 get { return access; }
98 set { access = value; }