예제 #1
0
        private T GenerateProxy(IScope scope)
        {
            var interceptor = new ScopeInterceptor(scope);

            var createdObject = _proxyGenerator.CreateInterfaceProxyWithoutTarget <T>(
                _monitor.Interceptor, interceptor);

            return(createdObject);
        }
        public ICreateResponse Create(ICreateRequest request, IScope scope)
        {
            if (!CanCreateObject(request.Type))
            {
                return(new NotCreatedResponse());
            }

            var interceptor   = new ScopeInterceptor(scope);
            var createdObject = _proxyGenerator.CreateInterfaceProxyWithoutTarget(request.Type, interceptor);

            return(new CreatedObjectResponse(createdObject));
        }