Exemple #1
0
        public object Create(Type entityType)
        {
            HasApplyMethod(entityType);

            var eventProvider = new EventProvider(entityType, _eventProcessorCache);
            var orginator     = new Orginator();

            return(CreateProxy(entityType, eventProvider, orginator));
        }
Exemple #2
0
        private object CreateProxy(Type entityType, IInterceptor eventProvider, Orginator orginator)
        {
            var proxyGenerationOptions = new ProxyGenerationOptions();

            proxyGenerationOptions.AddMixinInstance(eventProvider);
            proxyGenerationOptions.AddMixinInstance(orginator);

            return(_proxyGenerator.CreateClassProxy(
                       entityType,
                       proxyGenerationOptions,
                       eventProvider
                       ));
        }