Пример #1
0
        private AspectRepository(AspectRepository parentRepository)
        {
            Contract.Requires(parentRepository != null);

            this.ParentRepository     = parentRepository;
            this.DynamicProxyProvider = parentRepository.DynamicProxyProvider;
            RequireInitialization     = true;
        }
Пример #2
0
        public AspectRepository(IDynamicProxyProvider dynamicProxyProvider)
        {
            Contract.Requires(dynamicProxyProvider != null);

            this.DynamicProxyProvider      = dynamicProxyProvider;
            RegisteredCreationTypes        = new HashSet <Type>();
            AllCreationTypes               = new HashSet <Type>();
            RegisteredMethodTypes          = new HashSet <Type>();
            AllMethodTypes                 = new HashSet <Type>();
            RegisteredRules                = new List <KeyValuePair <Func <Type, bool>, IInterceptor> >();
            AllRulesTypes                  = new List <KeyValuePair <Func <Type, bool>, IInterceptor> >();
            BeforeCreationAspectDictionary = new Dictionary <Type, List <Action> >();
            AfterCreationAspectDictionary  = new Dictionary <Type, List <Action <object> > >();
            BeforeMethodAspectDictionary   = new Dictionary <KeyValuePair <Type, MethodInfo>, List <Action <object, object[]> > >();
            AroundMethodAspectDictionary   = new Dictionary <KeyValuePair <Type, MethodInfo>, List <Func <object, object[], Func <object[], object>, object> > >();
            AfterMethodAspectDictionary    = new Dictionary <KeyValuePair <Type, MethodInfo>, List <Func <object, object[], object, object> > >();
            InterceptorsDictionary         = new Dictionary <Type, List <IInterceptor> >();
            ComponentServices              = new ConcurrentDictionary <IComponentRegistration, Type[]>(1, 127);
        }