<commit_before>﻿Imports System.Collections.Generic
Imports ProjectTracker.Library

Public Class PTService
  Implements IPTService

#Region "IPTService Members"

  Public Function GetProjectList() As ProjectData() Implements IPTService.GetProjectList

    ' anonymous access allowed
    Security.UseAnonymous()

    Try
      Dim list As ProjectList = ProjectList.GetProjectList()
      Dim result As List(Of ProjectData) = New List(Of ProjectData)()
      For Each item As ProjectInfo In list
        Dim info As ProjectData = New ProjectData()
        Csla.Data.DataMapper.Map(item, info)
        result.Add(info)
      Next item
      Return result.ToArray()

    Catch ex As Csla.DataPortalException
      Throw ex.BusinessException

    Catch ex As Exception
      Throw New Exception(ex.Message)
    End Try

  End Function

#End Region

End Class
<commit_msg>Change configuration to not require username/password or X.509 cert. The config and code to require those things is there, just commented out.<commit_after>﻿Imports System.Collections.Generic
Imports ProjectTracker.Library

Public Class PTService
  Implements IPTService

#Region "IPTService Members"

  Public Function GetProjectList() As ProjectData() Implements IPTService.GetProjectList

    ' TODO: comment out the following if using the
    ' PTWcfServiceAuth components to require a
    ' username/password from the caller
    ProjectTracker.Library.Security.PTPrincipal.Logout()

    Try
      Dim list As ProjectList = ProjectList.GetProjectList()
      Dim result As List(Of ProjectData) = New List(Of ProjectData)()
      For Each item As ProjectInfo In list
        Dim info As ProjectData = New ProjectData()
        Csla.Data.DataMapper.Map(item, info)
        result.Add(info)
      Next item
      Return result.ToArray()

    Catch ex As Csla.DataPortalException
      Throw ex.BusinessException

    Catch ex As Exception
      Throw New Exception(ex.Message)
    End Try

  End Function

#End Region

End Class

{'fraction_non_alphanumeric': 0.055152394775036286, 'fraction_numerical': 0.001451378809869376, 'mean_word_length': 2.90188679245283, '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': '6983394', 'n_tokens_mistral': 601, 'n_tokens_neox': 533, 'n_words': 191}