~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Debugger/Debugger.Core/AppDomainCollection.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using Debugger.Interop.CorDebug;
 
6
 
 
7
namespace Debugger
 
8
{
 
9
        public class AppDomainCollection: CollectionWithEvents<AppDomain>
 
10
        {
 
11
                public AppDomainCollection(NDebugger dbgr): base(dbgr) {}
 
12
                
 
13
                public AppDomain this[ICorDebugAppDomain corAppDomain] {
 
14
                        get {
 
15
                                foreach(AppDomain a in this) {
 
16
                                        if (a.CorAppDomain.Equals(corAppDomain)) {
 
17
                                                return a;
 
18
                                        }
 
19
                                }
 
20
                                throw new DebuggerException("AppDomain not found");
 
21
                        }
 
22
                }
 
23
        }
 
24
}