Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public Optional <IBuildAction> GetBuildAction()
        {
            if (_componentUniqueIdTxtFile.Exists())
            {
                return(Optional <IBuildAction> .None());
            }

            return(Optional <IBuildAction> .Some(new CreateComponentUniqueIdTxtAction(_componentUniqueIdTxtFile.GetServerPath(),
                                                                                      Id.Value)));
        }
Exemplo n.º 3
0
 private StringKeyValueCollection ReadTriggerIniContent(Folders.IFileHolder fileHolder)
 {
     _logger.Info($"Reading {fileHolder.GetServerPath().AsString()}");
     return(StringKeyValueCollection.Parse(fileHolder.GetTextContent()));
 }