<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Management.Automation;
using Slack.Webhooks;

namespace Slack.Webhooks.PowerShell
{
    public class Class1
    {
    }
}<commit_msg>added some stuff<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Management.Automation;
using Slack.Webhooks;
using System.Reflection;

namespace Slack.Webhooks.PowerShell
{
    [Cmdlet(VerbsCommunications.Send,"SlackMessage",SupportsShouldProcess = false)]
    public class SendSlackMessage : PSCmdlet
    {
        [Parameter(
            Mandatory = true,
            Position = 0
            )]
        public string URI
        {
            get;
            set;
        }
        [Parameter(
            Mandatory = true,
            Position = 1
            )]
        public SlackMessage Message
        {
            get;
            set;
        }
        [Parameter(
            Mandatory = false,
            Position = 2
            )]
        public int TimeOut
        {
            get;
            set;
        }
        SlackClient slackClient;
        protected override void BeginProcessing()
        {
            if (TimeOut.Equals(0)) { slackClient = new SlackClient(URI); }
            else {slackClient = new SlackClient(URI, TimeOut); }
            
        }

        protected override void ProcessRecord()
        {
            slackClient.Post(Message);
        }

        protected override void EndProcessing()
        {
            base.EndProcessing();
        }
    }
    [Cmdlet(VerbsCommon.New, "SlackMessage", SupportsShouldProcess = false)]
    public class CreateSlackMessage : PSCmdlet
    {
        [Parameter(
            Mandatory = true,
            Position = 0
            )]
        public string Channel
        {
            get;
            set;
        }
        [Parameter(
            Mandatory = true,
            Position = 1
            )]
        public string Text
        {
            get;
            set;
        }
        [Parameter(
            Mandatory = false,
            Position = 2
            )]
        public string IconEmoji
        {
            get;
            set;
        }
        [Parameter(
            Mandatory = false,
            Position = 3
            )]
        public string Username
        {
            get;
            set;
        }
        public bool LinkNames
        {
            get;
            set;
        }
        public bool Markdown
        {
            get;
            set;
        }

        [Parameter(
            Mandatory = false
            )]
        [ValidateSet("full","none")]
        public string ParseMode
        {
            get;
            set;
        }

        protected override void BeginProcessing()
        {
        }

        protected override void ProcessRecord()
        {

            SlackMessage message = new SlackMessage
            {
                Channel = Channel,
                Text = Text,
                Username = Username,
                LinkNames = LinkNames,
                Mrkdwn = Markdown,
                
            };
           
            message.Parse
            
            WriteObject(message);
        }

        protected override void EndProcessing()
        {
            base.EndProcessing();
        }
    }
}
{'fraction_non_alphanumeric': 0.07319884726224783, 'fraction_numerical': 0.0025936599423631124, 'mean_word_length': 1.1748120300751879, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3226027', 'n_tokens_mistral': 877, 'n_tokens_neox': 862, 'n_words': 197}