1 // ****************************************************************
\r
2 // Copyright 2007, Charlie Poole
\r
3 // This is free software licensed under the NUnit license. You may
\r
4 // obtain a copy of the license at http://nunit.org/?p=license&r=2.4
\r
5 // ****************************************************************
\r
7 using NUnit.Core.Extensibility;
\r
12 /// ExtensionHost is the abstract base class used for
\r
13 /// all extension hosts. It provides an array of
\r
14 /// extension points and a FrameworkRegistry and
\r
15 /// implements the IExtensionHost interface. Derived
\r
16 /// classes must initialize the extension points.
\r
18 public abstract class ExtensionHost : IExtensionHost
\r
20 protected FrameworkRegistry frameworks;
\r
22 protected IExtensionPoint[] extensions;
\r
24 protected ExtensionType supportedTypes;
\r
26 public ExtensionHost()
\r
28 frameworks = new FrameworkRegistry();
\r
31 #region IExtensionHost Interface
\r
32 public IExtensionPoint[] ExtensionPoints
\r
34 get { return extensions; }
\r
37 public IFrameworkRegistry FrameworkRegistry
\r
39 get { return frameworks; }
\r
42 public IExtensionPoint GetExtensionPoint( string name )
\r
44 foreach ( IExtensionPoint extensionPoint in extensions )
\r
45 if ( extensionPoint.Name == name )
\r
46 return extensionPoint;
\r
51 public ExtensionType ExtensionTypes
\r
53 get { return supportedTypes; }
\r