<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ESH.Utility.ActiveDirectory;
using System.DirectoryServices.AccountManagement;
using System.DirectoryServices;

namespace ESH.Examples
{
    public class ActiveDirectory
    {
        /// <summary>
        /// Test the functions
        /// </summary>
        public static void Test()
        {
            string ldapServer = "contoso.internal";
            string ldapContainer = "OU=Users,DC=contoso,DC=internal";
            string ldapUser = null;
            string ldapPassword = null;

            string user = "fooUser";
            string firstName = "Foo";
            string lastName = "User";
            string password = "<PASSWORD>";
            string group = "fooGroup";

            var context = Connect(ldapServer, ldapContainer, ldapUser, ldapPassword);

            Console.Write("CreateUser: ");
            CreateUser(context, user, firstName, lastName);
            Console.WriteLine("OK");

            Console.Write("AddUserToGroup: ");
            AddUserToGroup(context, user, group);<commit_msg>Changed class name to avoid conflicts<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ESH.Utility.ActiveDirectory;
using System.DirectoryServices.AccountManagement;
using System.DirectoryServices;

namespace ESH.Examples
{
    public class ActiveDirectoryExamples
    {
        /// <summary>
        /// Test the functions
        /// </summary>
        public static void Test()
        {
            string ldapServer = "contoso.internal";
            string ldapContainer = "OU=Users,DC=contoso,DC=internal";
            string ldapUser = null;
            string ldapPassword = null;

            string user = "fooUser";
            string firstName = "Foo";
            string lastName = "User";
            string password = "<PASSWORD>";
            string group = "fooGroup";

            var context = Connect(ldapServer, ldapContainer, ldapUser, ldapPassword);

            Console.Write("CreateUser: ");
            CreateUser(context, user, firstName, lastName);
            Console.WriteLine("OK");

            Console.Write("AddUserToGroup: ");
            AddUserToGroup(context, user, group);
{'fraction_non_alphanumeric': 0.10236886632825719, 'fraction_numerical': 0.0, 'mean_word_length': 2.359375, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2862263', 'n_tokens_mistral': 604, 'n_tokens_neox': 594, 'n_words': 150}