Manual copy for now

This commit is contained in:
2023-06-09 16:33:40 -07:00
parent fb3c3ce699
commit 172f45aa67
6 changed files with 22 additions and 31 deletions

View File

@ -14,8 +14,8 @@ using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
using System.Web.Http;
using System.Web.Http.SelfHost;
//using System.Web.Http;
//using System.Web.Http.SelfHost;
namespace Adaptation.FileHandlers.json;
@ -29,7 +29,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _Project;
private readonly string _BasePage;
private readonly HttpClient _HttpClient;
private readonly HttpSelfHostServer _HttpSelfHostServer;
//private readonly HttpSelfHostServer _HttpSelfHostServer;
private readonly WorkItemTrackingHttpClient _WorkItemTrackingHttpClient;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
@ -62,11 +62,11 @@ public class FileRead : Shared.FileRead, IFileRead
VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential);
_WorkItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
_BasePage = basePage;
string httpSelfHostConfigurationBaseAddress = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".HttpSelfHostConfiguration.BaseAddress"));
HttpSelfHostConfiguration config = new(httpSelfHostConfigurationBaseAddress);
_ = config.Routes.MapHttpRoute("API Default", "api/{controller}/{id}", new { id = RouteParameter.Optional });
_HttpSelfHostServer = new(config);
_HttpSelfHostServer.OpenAsync().Wait();
//string httpSelfHostConfigurationBaseAddress = "http://localhost:5159"; // GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".HttpSelfHostConfiguration.BaseAddress"));
//HttpSelfHostConfiguration config = new(httpSelfHostConfigurationBaseAddress);
//_ = config.Routes.MapHttpRoute("API Default", "api/{controller}/{id}", new { id = RouteParameter.Optional });
//_HttpSelfHostServer = new(config);
//_HttpSelfHostServer.OpenAsync().Wait();
}
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);