Ejemplo n.º 1
0
 static TypeAccessor()
 {
     // Explicitly typed type constructor to prevent 'BeforeFieldInit' jit optimization.
     // See http://blogs.msdn.com/davidnotario/archive/2005/02/08/369593.aspx for details.
     //
     // For us, this means that
     //
     // TypeFactory.SetGlobalAssembly();
     // SomeObject o = TypeAccessor.CreateInstance<SomeObject>();
     //
     // May be executed in reverse order. Usually, there is no problem,
     // but sometimes the order is important.
     // See UnitTests\CS\TypeBuilder\InternalTypesTest.cs for an example.
     //
     _instance = TypeAccessor.GetAccessor(typeof(T));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="XmlIncludeAbstractAttribute"/> class.
 /// </summary>
 /// <param name="type">The <see cref="Type"/> of an abstract class to
 /// include its BLToolkit extensions.</param>
 public XmlIncludeAbstractAttribute(Type type)
     : base(TypeAccessor.GetAccessor(type).Type)
 {
 }