Projektdateien hinzufügen.
This commit is contained in:
37
FileinterfaceCronScheduler/ImsCustomFunctionInvoker.cs
Normal file
37
FileinterfaceCronScheduler/ImsCustomFunctionInvoker.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user