-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathService.cs
28 lines (24 loc) · 830 Bytes
/
Service.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
using System;
namespace PickAll
{
/// <summary>Represents a service managed by <c>SearchContext</c>.</summary>
public abstract class Service
{
SearchContext _context;
internal event EventHandler Load;
public SearchContext Context
{
get { return _context; }
set
{
_context = value;
// Guard against raising load event before configuration happens.
// A service is loaded when is bound to a search context.
if (_context == null) return;
EventHelper.RaiseEvent(this, Load, EventArgs.Empty, _context.Settings.EnableRaisingEvents);
}
}
public RuntimeInfo Runtime { get; internal set; }
protected object Settings { get; set; }
}
}