/// <summary> /// Initializes a new instance of the <see cref="AmpRemoteController"/> class. /// </summary> /// <param name="baseUrl">The base URL.</param> public static void CreateInstance(string baseUrl) { InstanceContext?.Dispose(); WebHost.CreateDefaultBuilder() .ConfigureServices(services => services.AddMvc(options => options.EnableEndpointRouting = false)) .Configure(app => app.UseMvc()) .UseUrls(baseUrl) .Build() .RunAsync(); }
/// <summary> /// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources of the <see cref="InstanceContext"/> instance. /// </summary> /// </summary> public static void Dispose() { InstanceContext?.Dispose(); }