<commit_before>﻿namespace StudentAssembly.Models
{
    using System;
    using System.Collections;
    using System.Reflection;
    using System.Text;
    using Types;

    public class Student : IEnumerable
    {
        #region Properties
        public string FirstName { get; set; }
        public string MiddleName { get; set; }
        public string LastName { get; set; }
        public string SSN { get; set; }
        public string PermanentAddress { get; set; }
        public string MobilePhone { get; set; }
        public string Email { get; set; }
        public string Course { get; set; }
        public SpecialtyType Specialty { get; set; }
        public FacultyType Faculty { get; set; }
        public UniversityType University { get; set; }
        #endregion

        #region Overrides
        public override string ToString()
        {
            var toString = new StringBuilder();
            var format = "{0, -16}: {1, 16}{2}";

            foreach (PropertyInfo prop in this)
            {
                toString.AppendFormat(
                    format,
                    prop.Name,
                    prop.GetValue(this),
                    Environment.NewLine);
            }

            return toString.ToString();
        }

        public override bool Equals(object obj)
        {
            if (obj.GetType() != typeof(Student))
                throw new ArgumentException("Invalid Object Type");

            var other = obj as Student;
            foreach (PropertyInfo prop in this)
            {
                var thisValue = prop.GetValue(this) == null ?
                                string.Empty : prop.GetValue(this).ToString();
                var otherValue = prop.GetValue(other) == null ?
                                string.Empty : prop.GetValue(other).ToString();

                if (thisValue != otherValue) return false;
            }
            
            return true;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public static bool operator ==(Student one, Student other)
        {
            return true;
        }

        public static bool operator !=(Student one, Student other)
        {
            return true;
        }
        #endregion


        public IEnumerator GetEnumerator()
        {
            var properties = this.GetType().GetProperties();

            foreach (var prop in properties)
            {
                yield return prop;
            }
        }
    }
}<commit_msg>Student operators == / != TODO: GetHash /w primes<commit_after>﻿namespace StudentAssembly.Models
{
    using System;
    using System.Collections;
    using System.Reflection;
    using System.Text;
    using Types;

    public class Student : IEnumerable
    {
        #region Properties
        public string FirstName { get; set; }
        public string MiddleName { get; set; }
        public string LastName { get; set; }
        public string SSN { get; set; }
        public string PermanentAddress { get; set; }
        public string MobilePhone { get; set; }
        public string Email { get; set; }
        public string Course { get; set; }
        public SpecialtyType Specialty { get; set; }
        public FacultyType Faculty { get; set; }
        public UniversityType University { get; set; }
        #endregion

        #region Overrides
        public override string ToString()
        {
            var toString = new StringBuilder();
            var format = "{0, -16}: {1, 16}{2}";

            foreach (PropertyInfo prop in this)
            {
                toString.AppendFormat(
                    format,
                    prop.Name,
                    prop.GetValue(this),
                    Environment.NewLine);
            }

            return toString.ToString();
        }

        public override bool Equals(object obj)
        {
            if (obj.GetType() != typeof(Student))
                throw new ArgumentException("Invalid Object Type");

            var other = obj as Student;
            foreach (PropertyInfo prop in this)
            {
                var thisValue = prop.GetValue(this) == null ?
                                string.Empty : prop.GetValue(this).ToString();
                var otherValue = prop.GetValue(other) == null ?
                                string.Empty : prop.GetValue(other).ToString();

                if (thisValue != otherValue) return false;
            }
            
            return true;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public static bool operator ==(Student one, Student other)
        {
            return one.Equals(other);
        }

        public static bool operator !=(Student one, Student other)
        {
            return !one.Equals(other);
        }
        #endregion


        public IEnumerator GetEnumerator()
        {
            var properties = this.GetType().GetProperties();

            foreach (var prop in properties)
            {
                yield return prop;
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.08431637981048153, 'fraction_numerical': 0.002707406691162251, 'mean_word_length': 1.4361752237399905, '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': '1459371', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1207, 'n_words': 375}