add service locator interface
This commit is contained in:
parent
e141ddae9b
commit
9f929e8f12
|
@ -179,6 +179,7 @@
|
|||
<Compile Include="Content\Types\SpriteFontLoader.cs" />
|
||||
<Compile Include="UI\GwenInputProcessor.cs" />
|
||||
<Compile Include="UI\GwenSpriteBatchRenderer.cs" />
|
||||
<Compile Include="IServiceLocator.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
|
|
11
Blarg.GameFramework/IServiceLocator.cs
Normal file
11
Blarg.GameFramework/IServiceLocator.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
using System;
|
||||
|
||||
namespace Blarg.GameFramework
|
||||
{
|
||||
public interface IServiceLocator
|
||||
{
|
||||
T Get<T>() where T : class;
|
||||
object Get(Type type);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ using Blarg.GameFramework.Support;
|
|||
|
||||
namespace Blarg.GameFramework
|
||||
{
|
||||
public class ServiceContainer : IDisposable
|
||||
public class ServiceContainer : IServiceLocator, IDisposable
|
||||
{
|
||||
const string LOG_TAG = "SERVICES";
|
||||
|
||||
|
|
Reference in a new issue