コード例 #1
0
 public InternalContextAdapterImpl(IContext c)
 {
     this.context = c;
     if (!(c is IInternalHousekeepingContext))
     {
         this.icb = new InternalContextBase();
     }
     else
     {
         this.icb = (IInternalHousekeepingContext)this.context;
     }
     if (c is IInternalEventContext)
     {
         this.iec = (IInternalEventContext)this.context;
     }
 }
コード例 #2
0
        /// <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 IInternalHousekeepingContext)
            {
                internalHousekeepingContext = (IInternalHousekeepingContext)context;
            }
            else
            {
                internalHousekeepingContext = new InternalContextBase();
            }

            IInternalEventContext internalEventContext = context as IInternalEventContext;

            if (internalEventContext != null)
            {
                this.internalEventContext = internalEventContext;
            }
        }
コード例 #3
0
		/// <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 IInternalHousekeepingContext)
			{
				internalHousekeepingContext = (IInternalHousekeepingContext) context;
			}
			else
			{
				internalHousekeepingContext = new InternalContextBase();
			}

			IInternalEventContext internalEventContext = context as IInternalEventContext;
			if (internalEventContext != null)
			{
				this.internalEventContext = internalEventContext;
			}
		}
コード例 #4
0
		/// <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 IInternalHousekeepingContext))
			{
				icb = new InternalContextBase();
			}
			else
			{
				icb = (IInternalHousekeepingContext) context;
			}

			if (c is IInternalEventContext)
			{
				iec = (IInternalEventContext) context;
			}
		}