using System; using FileInterface.Scheduler; using FileinterfaceCronScheduler.IMSApi; namespace FileinterfaceCronScheduler { /// /// Thin scheduler adapter around the real IMSApiClient. /// public sealed class ImsCustomFunctionInvoker : ICustomFunctionInvoker, IDisposable { private readonly ImsApiClient _client; public ImsCustomFunctionInvoker() { _client = new ImsApiClient(); } public void Connect() { _client.Connect(); } public bool IsLoggedIn { get { return _client.IsLoggedIn; } } public long SessionId { get { return _client.SessionId; } } public CustomFunctionCallResult Invoke(string customFunctionName, string[] inArgs) { return _client.Invoke(customFunctionName, inArgs); } public void Dispose() { _client.Dispose(); } } }