Esempio n. 1
0
        /// <summary>
        /// Copies the configuration from the supplied
        /// <paramref name="otherConfiguration"/> into this instance.
        /// </summary>
        /// <param name="otherConfiguration">
        /// The configuration to be copied.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// If the supplied <paramref name="otherConfiguration"/> is
        /// <see langword="null"/>.
        /// </exception>
        public virtual void CopyFrom(ProxyConfig otherConfiguration)
        {
            AssertUtils.ArgumentNotNull(otherConfiguration, "otherConfiguration");

            this.optimize              = otherConfiguration.optimize;
            this.proxyTargetType       = otherConfiguration.proxyTargetType;
            this.proxyTargetAttributes = otherConfiguration.proxyTargetAttributes;
            this.exposeProxy           = otherConfiguration.exposeProxy;
            this.frozen          = otherConfiguration.frozen;
            this.aopProxyFactory = otherConfiguration.aopProxyFactory;
        }
Esempio n. 2
0
 public AopProxyAttribute(Type factoryType)
 {
     this.proxyFactory = (IAopProxyFactory)Activator.CreateInstance(factoryType);
 }
Esempio n. 3
0
        /// <summary>
        /// Copies the configuration from the supplied
        /// <paramref name="otherConfiguration"/> into this instance.
        /// </summary>
        /// <param name="otherConfiguration">
        /// The configuration to be copied.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// If the supplied <paramref name="otherConfiguration"/> is
        /// <see langword="null"/>.
        /// </exception>
        public virtual void CopyFrom(ProxyConfig otherConfiguration)
        {
            AssertUtils.ArgumentNotNull(otherConfiguration, "otherConfiguration");

            this.optimize = otherConfiguration.optimize;
            this.proxyTargetType = otherConfiguration.proxyTargetType;
            this.proxyTargetAttributes = otherConfiguration.proxyTargetAttributes;
            this.exposeProxy = otherConfiguration.exposeProxy;
            this.frozen = otherConfiguration.frozen;
            this.aopProxyFactory = otherConfiguration.aopProxyFactory;
        }
Esempio n. 4
0
 public AProxyTypeAttribute(Type factoryType)
 {
     _factory = RClass.CreateInstance <IAopProxyFactory>(factoryType);
 }
 public AopProxyAttribute(Type factoryType)
 {
     this.proxyFactory = (IAopProxyFactory)Activator.CreateInstance(factoryType);
 }