Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProxyFactory"/> class.
        /// </summary>
        /// <param name="strongNamedAssembly"></param>
        /// <param name="canSaveAssembly"></param>
        /// <param name="interceptionFilter">The interception filter.</param>
        public ProxyFactory(bool strongNamedAssembly = false,bool canSaveAssembly = false, IInterceptionFilter interceptionFilter = null)
        {
            _typeBuilderFactory = new ProxyTypeBuilderFactory(strongNamedAssembly, canSaveAssembly);

            if (interceptionFilter == null)
                interceptionFilter = new NonInterceptedInterceptionFilter();

            _interceptionFilter = interceptionFilter;

            _proxyTemplateCache = new LockOnWriteCache<IProxyDefinition, IProxyTemplate>();
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProxyFactory"/> class.
        /// </summary>
        /// <param name="strongNamedAssembly"></param>
        /// <param name="canSaveAssembly"></param>
        /// <param name="interceptionFilter">The interception filter.</param>
        public ProxyFactory(bool strongNamedAssembly = false, bool canSaveAssembly = false, IInterceptionFilter interceptionFilter = null)
        {
            _typeBuilderFactory = new ProxyTypeBuilderFactory(strongNamedAssembly, canSaveAssembly);

            if (interceptionFilter == null)
            {
                interceptionFilter = new NonInterceptedInterceptionFilter();
            }

            _interceptionFilter = interceptionFilter;

            _proxyTemplateCache = new LockOnWriteCache <IProxyDefinition, IProxyTemplate>();
        }