protected virtual void OnContextAdd(IEvent evt)
        {
            ModularContextEvent castEvent = evt as ModularContextEvent;
            object contextView            = castEvent.ContextView;

            // We might catch out own existence event, so ignore that
            if (contextView == _contextView)
            {
                return;
            }

            if (ValidateContextView(contextView))
            {
                _logger.Debug("Context existence event caught. Configuring child context {0}", castEvent.Context);
                _context.AddChild(castEvent.Context);
            }
        }
コード例 #2
0
		public ModularContextEvent(ModularContextEvent.Type type, IContext context, object contextView)
		{
			_type = type;
			_context = context;
			_contextView = contextView;
		}