コード例 #1
0
 public void ReplaceHenchman(Henchman newHenchman)
 {
     var oldMinion = Interlocked.Exchange(ref minion, newHenchman);
     if (oldMinion != null)
         previousHenchmen.Add(oldMinion.Name);
     (oldMinion as IDisposable)?.Dispose();
 }
コード例 #2
0
ファイル: EvilGenius.cs プロジェクト: war-man/MVA-CSharp6
        public void ReplaceHenchman(Henchman newHenchman)
        {
            var oldMinion = Interlocked.Exchange(ref minion, newHenchman);

            if (oldMinion != null)
            {
                previousHenchmen.Add(oldMinion.Name);
            }
            (oldMinion as IDisposable)?.Dispose();
        }