mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-12 10:27:11 +00:00
33 lines
620 B
PowerShell
33 lines
620 B
PowerShell
using namespace System.IO
|
|
using module MyModule
|
|
|
|
function Get-Data {
|
|
param(
|
|
[string]$Name,
|
|
[int]$Count = 10
|
|
)
|
|
$result = Process-Items -Name $Name -Count $Count
|
|
return $result
|
|
}
|
|
|
|
function Process-Items {
|
|
param([string]$Name, [int]$Count)
|
|
Write-Output "Processing $Count items for $Name"
|
|
}
|
|
|
|
class DataProcessor {
|
|
[string]$Source
|
|
|
|
DataProcessor([string]$source) {
|
|
$this.Source = $source
|
|
}
|
|
|
|
[string] Transform([string]$input) {
|
|
return $input.ToUpper()
|
|
}
|
|
|
|
[void] Save([string]$path) {
|
|
Set-Content -Path $path -Value $this.Source
|
|
}
|
|
}
|