Skip to content

TypeBuilder.InternalTypes

Igor Tkachev edited this page May 20, 2016 · 1 revision

Home / TypeBuilder

InternalTypes.cs

using System;
using System.Runtime.CompilerServices;
using NUnit.Framework;

using BLToolkit.Reflection;

// typeof(TargetType).FullName + "." + TypeBuilderConsts.AssemblyNameSuffix
//
[assembly: InternalsVisibleTo("HowTo.TypeBuilder.InternalTypesTest.TestObject.TypeBuilder")]
[assembly: InternalsVisibleTo("HowTo.TypeBuilder.InternalTypesTest.TestObject.TypeAccessor")]

namespace HowTo.TypeBuilder
{

    [TestFixture]
    public class InternalTypesTest
    {
        internal abstract class TestObject
        {
            public abstract string Value { get; set; }
        }

        [Test]
        public void Test()
        {
            var o = TypeAccessor.CreateInstance<TestObject>();
            Assert.IsNotNull(o);
        }
    }
}
Clone this wiki locally