コード例 #1
0
ファイル: FlagActionWrapper.cs プロジェクト: sm-g/diagnosis
        /// <summary>
        /// Same as Enter, but if called after Enter (or self), return fake handler.
        /// This allows to check one flag many times, with only one reset at last dispose.
        /// </summary>
        /// <returns></returns>
        public ActionWrapperHandler Join(T param)
        {
            FlagActionWrapper <T> f;

            if (flag)
            {
                f = new FlagActionWrapper <T>((p) => { });
            }
            else
            {
                f = this;
            }

            return(new ActionWrapperHandler(f));
        }
コード例 #2
0
ファイル: FlagActionWrapper.cs プロジェクト: sm-g/diagnosis
 public ActionWrapperHandler(FlagActionWrapper <T> owner)
 {
     this.owner = owner;
     owner.flag = true;
 }