Skip to content

Commit

Permalink
Add LightService for classes that mainly provide data and don't reall…
Browse files Browse the repository at this point in the history
…y have a started/stopped state
  • Loading branch information
cdhowie committed Jan 4, 2013
1 parent 574f36b commit e9816e3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cdh.Toolkit.Services/Cdh.Toolkit.Services.csproj
Expand Up @@ -53,6 +53,7 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServiceManager.cs" /> <Compile Include="ServiceManager.cs" />
<Compile Include="ThreadedService.cs" /> <Compile Include="ThreadedService.cs" />
<Compile Include="LightService.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Cdh.Toolkit.Collections\Cdh.Toolkit.Collections.csproj"> <ProjectReference Include="..\Cdh.Toolkit.Collections\Cdh.Toolkit.Collections.csproj">
Expand Down
30 changes: 30 additions & 0 deletions 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.