<commit_before>﻿''' <summary>
''' Maintains metadata about a property.
''' </summary>
''' <typeparam name="T">
''' Data type of the property.
''' </typeparam>
Public Class PropertyInfo(Of T)

  Implements Core.IPropertyInfo
  Implements IComparable

  ''' <summary>
  ''' Creates a new instance of this class.
  ''' </summary>
  ''' <param name="name">Name of the property.</param>
  Public Sub New(ByVal name As String)

    Me.New(name, "")

  End Sub

  ''' <summary>
  ''' Creates a new instance of this class.
  ''' </summary>
  ''' <param name="name">Name of the property.</param>
  ''' <param name="friendlyName">
  ''' Friendly display name for the property.
  ''' </param>
  Public Sub New(ByVal name As String, ByVal friendlyName As String)

    _name = name
    _friendlyName = friendlyName
    If GetType(T).Equals(GetType(String)) Then
      _defaultValue = DirectCast(DirectCast(String.Empty, Object), T)

    Else
      _defaultValue = Nothing
    End If

  End Sub

  ''' <summary>
  ''' Creates a new instance of this class.
  ''' </summary>
  ''' <param name="name">Name of the property.</param>
  ''' <param name="defaultValue">
  ''' Default value for the property.
  ''' </param>
  Public Sub New(ByVal name As String, ByVal defaultValue As T)

    _name = name
    _defaultValue = defaultValue

  End Sub

  ''' <summary>
  ''' Creates a new instance of this class.
  ''' </summary>
  ''' <param name="name">Name of the property.</param>
  ''' <param name="friendlyName">
  ''' Friendly display name for the property.
  ''' </param>
  ''' <param name="defaultValue">
  ''' Default value for the property.
  ''' </param>
  Public Sub New(ByVal name As String, ByVal friendlyName As String, ByVal defaultValue As T)

    _name = name
    _defaultValue = defaultValue
    _friendlyName = friendlyName

  End Sub

  Private _name As String
  ''' <summary><commit_msg>Remove one constructor overload: New(name, defaultValue). This ctor could be an ambiguous overload if <T> was string, so removal of this overload was necessary.<commit_after>﻿''' <summary>
''' Maintains metadata about a property.
''' </summary>
''' <typeparam name="T">
''' Data type of the property.
''' </typeparam>
Public Class PropertyInfo(Of T)

  Implements Core.IPropertyInfo
  Implements IComparable

  ''' <summary>
  ''' Creates a new instance of this class.
  ''' </summary>
  ''' <param name="name">Name of the property.</param>
  Public Sub New(ByVal name As String)

    Me.New(name, "")

  End Sub

  ''' <summary>
  ''' Creates a new instance of this class.
  ''' </summary>
  ''' <param name="name">Name of the property.</param>
  ''' <param name="friendlyName">
  ''' Friendly display name for the property.
  ''' </param>
  Public Sub New(ByVal name As String, ByVal friendlyName As String)

    _name = name
    _friendlyName = friendlyName
    If GetType(T).Equals(GetType(String)) Then
      _defaultValue = DirectCast(DirectCast(String.Empty, Object), T)

    Else
      _defaultValue = Nothing
    End If

  End Sub

  ''' <summary>
  ''' Creates a new instance of this class.
  ''' </summary>
  ''' <param name="name">Name of the property.</param>
  ''' <param name="friendlyName">
  ''' Friendly display name for the property.
  ''' </param>
  ''' <param name="defaultValue">
  ''' Default value for the property.
  ''' </param>
  Public Sub New(ByVal name As String, ByVal friendlyName As String, ByVal defaultValue As T)

    _name = name
    _defaultValue = defaultValue
    _friendlyName = friendlyName

  End Sub

  Private _name As String
  ''' <summary>
{'fraction_non_alphanumeric': 0.13749649957994958, 'fraction_numerical': 0.0, 'mean_word_length': 3.556122448979592, 'pattern_counts': {'":': 0, '<': 56, '<?xml version=': 0, '>': 56, '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': '4496960', 'n_tokens_mistral': 1065, 'n_tokens_neox': 1031, 'n_words': 372}