Skip to content

Commit

Permalink
fine tunning
Browse files Browse the repository at this point in the history
  • Loading branch information
RijadComor committed Jul 16, 2024
1 parent be23a8a commit 0e62378
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions ConnectorAPI.EVS.IPD-VIA/EvsIpdViaElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ public class EvsIpdViaElement

private readonly IConnection connection;
private readonly IDmsElement element;
private readonly ILogger logObject;

private IDictionary<string, object[]> targetsTable;
private IDictionary<string, object[]> recodersTable;
private TimeSpan? timeout;
private ILogger logObject;

private static readonly List<Type> knownTypes = new List<Type>
{
Expand Down Expand Up @@ -77,23 +77,10 @@ public TimeSpan Timeout
{
get
{
if (element == null)
throw new InvalidOperationException("Element is not initialized.");

if (logObject == null)
throw new InvalidOperationException("LogObject is not initialized.");

var timeoutInSeconds = element.GetStandaloneParameter<double?>(EvsIpdViaProtocol.InterAppTimeout).GetValue();

if (!timeoutInSeconds.HasValue)
throw new InvalidOperationException("Timeout value is not set.");

logObject.Log(nameof(EvsIpdViaElement), nameof(Timeout), $"Timeout in seconds: {timeoutInSeconds}");

timeout = TimeSpan.FromSeconds(timeoutInSeconds.Value);

logObject.Log(nameof(EvsIpdViaElement), nameof(Timeout), $"Timeout in timespan: {timeout}");

return (TimeSpan)timeout;
}
}
Expand Down

0 comments on commit 0e62378

Please sign in to comment.