private string ReadTriggerIniProperty(Folders.IFileHolder fileHolder, string propertyName) { var content = ReadTriggerIniContent(fileHolder); if (!content.Contains(propertyName)) { throw new ApplicationException($"The file {fileHolder.GetServerPath().AsString()} doesn't contain a property named {propertyName}"); } return(content[propertyName].Value); }
public ComponentUniqueIdBuilder(Folders.IFileHolder componentUniqueIdTxtFile) { _componentUniqueIdTxtFile = componentUniqueIdTxtFile; _componentUniqueId = new FileBasedComponentUniqueID(() => _componentUniqueIdTxtFile); }
private StringKeyValueCollection ReadTriggerIniContent(Folders.IFileHolder fileHolder) { _logger.Info($"Reading {fileHolder.GetServerPath().AsString()}"); return(StringKeyValueCollection.Parse(fileHolder.GetTextContent())); }