Permalink
Browse files

Add LightService for classes that mainly provide data and don't reall…

…y have a started/stopped state
  • Loading branch information...
1 parent 574f36b commit e9816e33eb8921a4261de8f2316b2ebde922f984 @cdhowie committed Jan 4, 2013
Showing with 31 additions and 0 deletions.
  1. +1 −0 Cdh.Toolkit.Services/Cdh.Toolkit.Services.csproj
  2. +30 −0 Cdh.Toolkit.Services/LightService.cs
View
1 Cdh.Toolkit.Services/Cdh.Toolkit.Services.csproj
@@ -53,6 +53,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServiceManager.cs" />
<Compile Include="ThreadedService.cs" />
+ <Compile Include="LightService.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cdh.Toolkit.Collections\Cdh.Toolkit.Collections.csproj">
View
30 Cdh.Toolkit.Services/LightService.cs
@@ -0,0 +1,30 @@
+using System;
+
+namespace Cdh.Toolkit.Services
+{
+ public abstract class LightService : IService
+ {
+ #region IService implementation
+
+ void IService.Start()
+ {
+ isRunning = true;
+ }
+
+ void IService.Stop()
+ {
+ isRunning = false;
+ }
+
+ bool isRunning = false;
+
+ bool IService.IsRunning {
+ get { return isRunning; }
+ }
+
+ #endregion
+
+ protected LightService() { }
+ }
+}
+

0 comments on commit e9816e3

Please sign in to comment.