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 Optional <IBuildAction> GetBuildAction() { if (_componentUniqueIdTxtFile.Exists()) { return(Optional <IBuildAction> .None()); } return(Optional <IBuildAction> .Some(new CreateComponentUniqueIdTxtAction(_componentUniqueIdTxtFile.GetServerPath(), Id.Value))); }
private StringKeyValueCollection ReadTriggerIniContent(Folders.IFileHolder fileHolder) { _logger.Info($"Reading {fileHolder.GetServerPath().AsString()}"); return(StringKeyValueCollection.Parse(fileHolder.GetTextContent())); }