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; }
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); }