Example #1
0
        public Task SaveWebServerOptionsLight(WebServerOptionsLight webServerOptionsLight)
        {
            Uri     uri;
            Boolean isValidUri;

            return(Task.Run(() =>
            {
                isValidUri = Uri.TryCreate(webServerOptionsLight.BaseDirectoryPath, UriKind.Absolute, out uri);

                if (!(isValidUri && uri.IsLoopback && Directory.Exists(webServerOptionsLight.BaseDirectoryPath)))
                {
                    throw new Exception(ErrorMessage.WebClientHub_BaseDirectoryPathIsInvalid);
                }

                _webServerOptions.OneDasName = webServerOptionsLight.OneDasName;
                _webServerOptions.AspBaseUrl = webServerOptionsLight.AspBaseUrl;
                _webServerOptions.NewBaseDirectoryPath = webServerOptionsLight.BaseDirectoryPath;
                _webServerOptions.Save(BasicBootloader.ConfigurationDirectoryPath);

                this.Clients.All.SendWebServerOptionsLight(webServerOptionsLight);
            }));
        }
Example #2
0
 public AppModel(OneDasProjectSettings activeProjectSettings, IEnumerable <OneDasPackageMetaData> installedPackageSet, IEnumerable <string> clientSet, IEnumerable <ExtensionIdentificationAttribute> dataGatewayExtensionIdentificationSet, IEnumerable <ExtensionIdentificationAttribute> dataWriterExtensionIdentificationSet, string productVersion, string lastError, OneDasState oneDasState, WebServerOptionsLight webServerOptionsLight)
 {
     this.ProductVersion        = productVersion;
     this.InstalledPackageSet   = installedPackageSet;
     this.ActiveProjectSettings = activeProjectSettings;
     this.ClientSet             = clientSet;
     this.DataGatewayExtensionIdentificationSet = dataGatewayExtensionIdentificationSet;
     this.DataWriterExtensionIdentificationSet  = dataWriterExtensionIdentificationSet;
     this.LastError             = lastError;
     this.OneDasState           = oneDasState;
     this.WebServerOptionsLight = webServerOptionsLight;
 }