ExecuteTimeout
- Last UpdatedJul 05, 2024
- 1 minute read
This property indicates the timeout that will be used when the Business Logic Tier (BLT) components are called.
Declaration
TimeSpan ExecuteTimeout { get; set; }
Example
using System;
using OASySDNA.Common;
class Test
{
static void Main(string[] args)
{
try
{
var bltClientFactory = new BLTClientFactory();
using (var bltClient = bltClientFactory.Create("Fnput"))
{
//Add parameters
bltClient.AddParameter("analog");
bltClient.AddParameter("1");
bltClient.AddParameter("manual");
//Set a timeout for executing the component (5 seconds)
bltClient.ExecuteTimeout = TimeSpan.FromSeconds(5);
// Execute the component
bltClient.Execute();
}
}
catch(System.Exception e)
{
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
}
}
}