38 lines
955 B
C#
38 lines
955 B
C#
using System;
|
|
using FileInterface.Scheduler;
|
|
using FileinterfaceCronScheduler.IMSApi;
|
|
|
|
namespace FileinterfaceCronScheduler
|
|
{
|
|
/// <summary>
|
|
/// Thin scheduler adapter around the real IMSApiClient.
|
|
/// </summary>
|
|
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();
|
|
}
|
|
}
|
|
}
|