-
Notifications
You must be signed in to change notification settings - Fork 13
/
ExtensionPoint.cs
36 lines (27 loc) · 984 Bytes
/
ExtensionPoint.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
namespace UIShell.OSGi
{
using System.Collections.Generic;
using Core.Service;
using Utility;
public class ExtensionPoint
{
private IExtensionManager _extensionManager;
public IList<Extension> Extensions => _extensionManager.GetExtensions(Point);
public IBundle Owner { get; internal set; }
public string Point { get; internal set; }
public string Schema { get; internal set; }
internal ExtensionPoint(IExtensionManager extensionManager)
{
AssertUtility.ArgumentNotNull(extensionManager, "extensionManager");
_extensionManager = extensionManager;
}
public void AddExtension(Extension extension)
{
_extensionManager.AddExtension(Point, extension);
}
public void RemoveExtension(Extension extension)
{
_extensionManager.RemoveExtension(extension);
}
}
}