<commit_before>using System;
using Penneo;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;

namespace Penneo
{
    public class FilterCaseFiles
    {
        public static void Main(string[] args)
        {
            if (args.Length != 4) {
                Console.WriteLine("Parameters required: endpoint, key, secret, file");
                Environment.Exit(-1);
            }

            string endpoint = args[0];
            string key      = args[1];
            string secret   = args[2];
            string file     = args[3];

            PenneoConnector.Initialize(key, secret, endpoint);
            PenneoConnector.SetLogger(new Logger());
            run(file);
        }

        public static void run(String file)
        {
            // Case file
            //
            var cf = new CaseFile("Sample Case File");
            cf.Persist();

            // Document
            //
            var doc = new Document(cf, "Sample Document", file);
            doc.MakeSignable();
            doc.Persist();

            // Signer
            //
            var signer = new Signer(cf, "<NAME>");
            signer.OnBehalfOf = "Acme Corporation";
            // signer.SocialSecurityNumber = "0101501111";
            // signer.VATIdentificationNumber = 12345678;
            signer.Persist();


            // Signature Line
            //
            var sigLine = new SignatureLine(doc, "signer") {
                SignOrder = 0
            };
            sigLine.Persist();

            if (sigLine.Id == null) {
                Console.WriteLine("Unable to create a signature line");
                return;
            }

            // Map the signer to the document using the signature line
            //
            sigLine.SetSigner(signer);

            // Update the signing request
            //
            var signingRequest = signer.GetSigningRequest();
            if (signingRequest.Id == null) {
                Console.WriteLine("Unable to create the signing request");
                return;
            }

            // [Optional] Send emails through Penneo
            //
            // signingRequest.Email = "<EMAIL>";
            // signingRequest.EmailSubject = "Contract for signing";
            // signingRequest.EmailText = "Dear john. Please sign the contract.";

            // Enable access control if you have specified a Social security
            // number / VAT Identification Number for the Signer
            //
            // signingRequest.AccessControl = true;

            signingRequest.Persist();

            // Create the signing request link
            //
            var link = signingRequest.GetLink();

            // Print the link
            //
            Console.WriteLine(link);
        }
    }

    internal class Logger : ILogger
    {
        public void Log(string message, LogSeverity severity)
        {
            // Console.WriteLine(severity + ": " + message);
        }
    }
}
<commit_msg>Updated the C# example so that case file is activated<commit_after>using System;
using Penneo;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;

namespace Penneo
{
    public class FilterCaseFiles
    {
        public static void Main(string[] args)
        {
            if (args.Length != 4) {
                Console.WriteLine("Parameters required: endpoint, key, secret, file");
                Environment.Exit(-1);
            }

            string endpoint = args[0];
            string key      = args[1];
            string secret   = args[2];
            string file     = args[3];

            PenneoConnector.Initialize(key, secret, endpoint);
            PenneoConnector.SetLogger(new Logger());
            run(file);
        }

        public static void run(String file)
        {
            // Case file
            //
            var cf = new CaseFile("Sample Case File");
            cf.Persist();

            Console.WriteLine("Case file : " + cf.Id);

            // Document
            //
            var doc = new Document(cf, "Sample Document", file);
            doc.MakeSignable();
            doc.Persist();

            if (doc.Id == null) {
                Console.WriteLine("Unable to create a document");
                return;
            }

            // Signer
            //
            var signer = new Signer(cf, "<NAME>");
            signer.OnBehalfOf = "Acme Corporation";
            // signer.SocialSecurityNumber = "0101501111";
            // signer.VATIdentificationNumber = 12345678;
            signer.Persist();


            // Signature Line
            //
            var sigLine = new SignatureLine(doc, "dummy-signer-role") {
                SignOrder = 0
            };
            sigLine.Persist();

            if (sigLine.Id == null) {
                Console.WriteLine("Unable to create a signature line");
                return;
            }

            // Map the signer to the document using the signature line
            //
            sigLine.SetSigner(signer);

            // Update the signing request
            //
            var signingRequest = signer.GetSigningRequest();
            if (signingRequest.Id == null) {
                Console.WriteLine("Unable to create the signing request");
                return;
            }

            // [Optional] Send emails through Penneo
            //
            // signingRequest.Email = "<EMAIL>";
            // signingRequest.EmailSubject = "Contract for signing";
            // signingRequest.EmailText = "Dear john. Please sign the contract.";

            // Enable access control if you have specified a Social security
            // number / VAT Identification Number for the Signer
            //
            // signingRequest.AccessControl = true;

            signingRequest.Persist();

            // Create the signing request link
            //
            var link = signingRequest.GetLink();

            // Active the Case file (and send signing requests if email details
            // are provided)
            //
            cf.Send();

            // Print the link
            //
            Console.WriteLine(link);
        }
    }

    internal class Logger : ILogger
    {
        public void Log(string message, LogSeverity severity)
        {
            // Console.WriteLine(severity + ": " + message);
        }
    }
}

{'fraction_non_alphanumeric': 0.09701492537313433, 'fraction_numerical': 0.00777363184079602, 'mean_word_length': 1.3469536665450565, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, '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': '1663731', 'n_tokens_mistral': 1599, 'n_tokens_neox': 1511, 'n_words': 427}