Cosmos/source/Indy.IL2CPU/Compiler/AssemblyCompiler.ServiceProvider.cs

18 lines
473 B
C#

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