HttpSelfHostConfigurationBaseAddress
OpenInsightApplicationProgrammingInterface Infineon.EAF.Runtime 2.49.3
This commit is contained in:
@ -19,6 +19,9 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
|
||||
#nullable enable
|
||||
|
||||
public const string HttpSelfHostConfigurationBaseAddress = "http://localhost:8080/";
|
||||
public const string OpenInsightApplicationProgrammingInterface = "https://oi-prod-ec-api.mes.infineon.com/api/oiWizard";
|
||||
|
||||
private long? _TickOffset;
|
||||
#if NETFRAMEWORK && NET48
|
||||
private readonly HttpSelfHostServer? _HttpSelfHostServer;
|
||||
@ -36,14 +39,26 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
string barcodeHostFileShare = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Barcode.Host.FileShare");
|
||||
if (barcodeHostFileShare != TIBCO.FileRead.BarcodeHostFileShare)
|
||||
throw new NotSupportedException($"Update configuration for [{nameof(TIBCO.FileRead.BarcodeHostFileShare)}]");
|
||||
string httpSelfHostConfigurationBaseAddress = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Http.Self.Host.Configuration.Base.Address");
|
||||
if (httpSelfHostConfigurationBaseAddress != HttpSelfHostConfigurationBaseAddress)
|
||||
throw new NotSupportedException($"Update configuration for [{nameof(HttpSelfHostConfigurationBaseAddress)}]");
|
||||
string lsl2SQLConnectionString = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "ConnectionString.LSL2SQL");
|
||||
if (lsl2SQLConnectionString != TIBCO.FileRead.LSL2SQLConnectionString)
|
||||
throw new NotSupportedException($"Update configuration for [{nameof(TIBCO.FileRead.LSL2SQLConnectionString)}]");
|
||||
string metrologyFileShare = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Metrology.FileShare");
|
||||
if (metrologyFileShare != TIBCO.FileRead.MetrologyFileShare)
|
||||
throw new NotSupportedException($"Update configuration for [{nameof(TIBCO.FileRead.MetrologyFileShare)}]");
|
||||
string openInsightApplicationProgrammingInterface = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.Application.Programming.Interface");
|
||||
if (openInsightApplicationProgrammingInterface != OpenInsightApplicationProgrammingInterface)
|
||||
throw new NotSupportedException($"Update configuration for [{nameof(OpenInsightApplicationProgrammingInterface)}]");
|
||||
#if NETFRAMEWORK && NET48
|
||||
if (!_IsEAFHosted)
|
||||
_HttpSelfHostServer = null;
|
||||
else
|
||||
{
|
||||
// string propertyName = string.Concat("CellInstance.", cellInstanceName, ".HttpSelfHostConfiguration.BaseAddress");
|
||||
// string httpSelfHostConfigurationBaseAddress = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, propertyName);
|
||||
string httpSelfHostConfigurationBaseAddress = "http://localhost:8080/";
|
||||
HttpSelfHostConfiguration config = new(httpSelfHostConfigurationBaseAddress);
|
||||
_ = config.Routes.MapHttpRoute("API Default", "api/{controller}/{id}", new { id = RouteParameter.Optional });
|
||||
_HttpSelfHostServer = new(config);
|
||||
|
Reference in New Issue
Block a user