Builds a proxy type using inheritance.
In order for this builder to work, target methods have to be either , or belong to an interface.
Inheritance: Spring.Proxy.AbstractProxyTypeBuilder
        public void WithSealedClass()
        {
            InheritanceProxyTypeBuilder builder = (InheritanceProxyTypeBuilder)GetProxyBuilder();

            builder.TargetType = typeof(SealedClass);
            builder.BuildProxyType();
        }
示例#2
0
        public void WithSealedClass()
        {
            InheritanceProxyTypeBuilder builder = (InheritanceProxyTypeBuilder)GetProxyBuilder();

            builder.TargetType = typeof(SealedClass);
            Assert.Throws <ArgumentException>(() => builder.BuildProxyType());
        }