protected override void EndProcessing()
        {
            Endpoint onClick = null;

            if (OnClick != null)
            {
                onClick = GenerateCallback(Id + "onClick", OnClick, null);
            }

            var counter = new Counter
            {
                AutoRefresh     = AutoRefresh,
                RefreshInterval = RefreshInterval,
                Callback        = GenerateCallback(Id),
                OnClick         = onClick,
                Format          = Format,
                Icon            = FontAwesomeIconsExtensions.GetIconName(Icon),
                Title           = Title,
                Id = Id,
                BackgroundColor = BackgroundColor?.HtmlColor,
                FontColor       = FontColor?.HtmlColor,
                Links           = Links,
                TextAlignment   = TextAlignment.GetName(),
                TextSize        = TextSize.GetName(),
                HasOnClick      = onClick != null
            };

            Log.Debug(JsonConvert.SerializeObject(counter));

            WriteObject(counter);
        }
Beispiel #2
0
        protected override void EndProcessing()
        {
            var card = new Card
            {
                Title           = Title,
                Text            = Text,
                Links           = Links,
                Id              = Id,
                Language        = Language,
                FontColor       = FontColor?.HtmlColor,
                BackgroundColor = BackgroundColor?.HtmlColor,
                Icon            = Watermark.GetIconName(),
                TextAlignment   = TextAlignment.GetName(),
                TextSize        = TextSize.GetName(),
                Content         = Content?.Invoke().Select(m => m?.BaseObject).ToArray()
            };

            Log.Debug(JsonConvert.SerializeObject(card));

            WriteObject(card);
        }