Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / reflection-load-with-context-lib.cs
1 using System;
2
3 namespace B
4 {
5         public class MyAttribute : Attribute {
6                 public Type Type { get; set; }
7                 public MyAttribute (Type t) {
8                         Type = t;
9                 }
10                 public override string ToString () {
11                         return "My " + Type;
12                 }
13         }
14
15         [My (typeof (A.ClassA))]
16         public class ClassB { // A.AnotherClassA
17
18                 public ClassB () {
19                         Console.WriteLine ("IN B");
20                         Console.WriteLine (typeof (ClassB).AssemblyQualifiedName);
21                         var t = Type.GetType ("B.ClassB, reflection-load-with-context-lib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");
22                         Console.WriteLine (t);
23                         t = Type.GetType ("A.ClassA, reflection-load-with-context-second-lib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");
24                         Console.WriteLine ("class a: {0}", t);
25                         if (t == null)
26                                 throw new Exception ("FAIL");
27                 }
28         }
29 }