private void ContentService_Published(Umbraco.Core.Services.IContentService sender, ContentPublishedEventArgs contentPublishedEventArgs)
        {
            foreach (var node in contentPublishedEventArgs.PublishedEntities)
            {
                if (node.ContentType.Alias != Theme.ModelTypeAlias)
                {
                    continue;
                }

                var result = _sassService.BuildSass(node.Id);

                contentPublishedEventArgs.Messages.Add(result == string.Empty
                    ? new EventMessage("Sass File Built", result,
                                       EventMessageType.Info)
                    : new EventMessage("Sass Build Error", result,
                                       EventMessageType.Error));
            }
        }
 public string BuildSass(string id)
 {
     return(int.TryParse(id, out var nodeId) ? _sassService.BuildSass(nodeId) : string.Empty);
 }