Cosmos/source/Indy.IL2CPU/Compiler/CompilerHelper.ServiceProvider.cs
2009-06-13 14:28:05 +00:00

24 lines
No EOL
606 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IServiceProvider=Indy.IL2CPU.IL.IServiceProvider;
namespace Indy.IL2CPU.Compiler
{
partial class CompilerHelper: IServiceProvider
{
#region Implementation of IServiceProvider
public T GetService<T>()
{
if(typeof(T) == typeof(IMetaDataInfoService))
{
return (T) (object) this;
}
throw new Exception("Service '" +typeof(T).FullName + "' not supported!");
}
#endregion
}
}