AndrewPla / TOPdeskPS

PowerShell module to interact with the TOPdesk API
MIT License
30 stars 12 forks source link

Get-TdIncident should use an arraylist #92

Closed AndrewPla closed 5 years ago

AndrewPla commented 5 years ago

Is your feature request related to a problem? Please describe. += is slow arraylist is a bit faster

Describe the solution you'd like use an arraylist to put the incidents together faster

Examples of how the solution would work

$Incidents = New-Object System.Collections.Arraylist
  # add the incidents to our arraylist
   [void]$Incidents.add((Invoke-TdMethod @Params))

Additional context Add any other context or screenshots about the feature request here.

AndrewPla commented 5 years ago

I'm not sure why I felt the need to add all of the objects together before outputting them, but an arraylist is not needed. I have updated the code so that it now just outputs objects.