コード例 #1
0
        public static RemoveRedundantAsyncAwaitWalker GetInstance()
        {
            RemoveRedundantAsyncAwaitWalker walker = _cachedInstance;

            if (walker != null)
            {
                _cachedInstance = null;
                walker.Reset();
                return(walker);
            }
            else
            {
                return(new RemoveRedundantAsyncAwaitWalker());
            }
        }
コード例 #2
0
 public static void Free(RemoveRedundantAsyncAwaitWalker walker)
 {
     walker.Reset();
     _cachedInstance = walker;
 }