/// <summary> Attached the EventCartridge to the context /// * /// Final because not something one should mess with lightly :) /// * /// </summary> /// <param name="context">context to attach to /// </param> /// <returns>true if successful, false otherwise /// /// </returns> public bool attachToContext(IContext context) { if (context is InternalEventContext) { InternalEventContext iec = (InternalEventContext)context; iec.AttachEventCartridge(this); return(true); } else { return(false); } }
/// <summary> CTOR takes a Context and wraps it, delegating all 'data' calls /// to it. /// /// For support of internal contexts, it will create an InternalContextBase /// if need be. /// </summary> public InternalContextAdapterImpl(IContext c) { context = c; if (!(c is InternalHousekeepingContext)) { icb = new InternalContextBase(); } else { icb = (InternalHousekeepingContext)context; } if (c is InternalEventContext) { iec = (InternalEventContext)context; } }
/// <summary> CTOR takes a Context and wraps it, delegating all 'data' calls /// to it. /// /// For support of internal contexts, it will create an InternalContextBase /// if need be. /// </summary> public InternalContextAdapterImpl(IContext c) { context = c; if (!(c is InternalHousekeepingContext)) { icb = new InternalContextBase(); } else { icb = (InternalHousekeepingContext) context; } if (c is InternalEventContext) { iec = (InternalEventContext) context; } }