20 lines
530 B
C#
20 lines
530 B
C#
using System;
|
|
using System.Linq;
|
|
using Plume.Interfaces.Services;
|
|
|
|
namespace JD.Remoting.Services
|
|
{
|
|
public static class PluginExtensions
|
|
{
|
|
public static IPluginService GetPluginService(this IServiceManager serviceManager)
|
|
{
|
|
var pluginService = serviceManager.Get<IPluginService>();
|
|
if (pluginService == null)
|
|
{
|
|
throw new Exception($"The application must register the PluginService");
|
|
}
|
|
|
|
return pluginService;
|
|
}
|
|
}
|
|
}
|