コード例 #1
0
ファイル: ThreadContext.cs プロジェクト: raimu/kephas
        /// <summary>
        /// Initializes a new instance of the <see cref="ThreadContext"/>
        /// class.
        /// </summary>
        /// <param name="ambientServices">The ambient services.</param>
        /// <param name="storeActions">The actions called when information should be stored in the context.</param>
        /// <param name="restoreActions">The actions called when information should be restored from the context.</param>
        public ThreadContext(IAmbientServices ambientServices, IEnumerable<Action<ThreadContext>> storeActions, IEnumerable<Action<ThreadContext>> restoreActions)
            : base(ambientServices)
        {
            Contract.Requires(ambientServices != null);

            this.storeActions = storeActions;
            this.restoreActions = restoreActions;
        }
コード例 #2
0
ファイル: ContextBase.cs プロジェクト: raimu/kephas
        /// <summary>
        /// Initializes a new instance of the <see cref="ContextBase"/> class.
        /// </summary>
        /// <param name="ambientServices">
        /// The ambient services.
        /// </param>
        protected ContextBase(IAmbientServices ambientServices)
        {
            Contract.Requires(ambientServices != null);

            this.AmbientServices = ambientServices;
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CompositionContainerBuilderContext"/> class.
 /// </summary>
 /// <param name="ambientServices">The ambient services.</param>
 public CompositionContainerBuilderContext(IAmbientServices ambientServices)
     : base(ambientServices)
 {
     Contract.Requires(ambientServices != null);
 }
コード例 #4
0
ファイル: ThreadContextBuilder.cs プロジェクト: raimu/kephas
        /// <summary>
        /// Initializes a new instance of the <see cref="ThreadContextBuilder"/> class.
        /// </summary>
        /// <param name="ambientServices">
        /// The ambient services.
        /// </param>
        public ThreadContextBuilder(IAmbientServices ambientServices)
        {
            Contract.Requires(ambientServices != null);

            this.ambientServices = ambientServices;
        }