Esempio n. 1
0
        public Block(IRequest request)
        {
            if (request == null)
            {
                throw new ArgumentNullException("request");
            }

            query = request as IQuery;

            Context = request.CreateBlockContext();
            Context.UnregisterService <IBlock>();
            Context.RegisterInstance <IBlock>(this);

            Parent = request as IBlock;
        }
Esempio n. 2
0
        internal Block(IRequest request)
            : base(request as IEventSource)
        {
            if (request == null)
            {
                throw new ArgumentNullException("request");
            }

            query = request as IQuery;

            Context = request.Context.CreateBlockContext();
            Context.UnregisterService <IBlock>();
            Context.RegisterInstance <IBlock>(this);

            Parent = request as IBlock;

            Access = new RequestAccess(this);
        }