public RegistryHttpClient(RegistryClientSettings registryClientSettings = null) { Settings = registryClientSettings ?? RegistryClientSettings.LoadSettings(); LoadSettings(Settings); JsonSerializerSettings = new JsonStandardSettings(); }
public FileBasedRegistry(FileBasedRegistrySettings settings = null) { Settings = settings ?? FileBasedRegistrySettings.LoadSettings(); JsonSerializerSettings = new JsonStandardSettings(); FolderPath = Settings.Miscellaneous["FolderPath"]; if (string.IsNullOrEmpty(FolderPath)) { logger.Error("FolderPath is null or empty"); throw new ArgumentNullException("FolderPath"); } if (!Directory.Exists(FolderPath)) { DirectoryInfo info; try { info = Directory.CreateDirectory(FolderPath); } catch (Exception e) { logger.Error("FolderPath does not exist and cannot be created: " + e.Message); throw; } if (!info.Exists) { logger.Error("FolderPath does not exist and cannot be created"); throw new InvalidOperationException("FolderPath does not exist and cannot be created"); } } }
private AssetAdministrationShellHttpClient() { JsonSerializerSettings = new JsonStandardSettings(); }
private SubmodelHttpClient() { JsonSerializerSettings = new JsonStandardSettings(); }