Test comment
- ARRANGE step
document.location
| import kotlin.reflect.KProperty | |
| import kotlin.reflect.full.isSubtypeOf | |
| import kotlin.reflect.full.starProjectedType | |
| class ValueNotFoundException : Exception() | |
| class TypeMismatchException : Exception() | |
| typealias JavaSerializable = java.io.Serializable | |
| class SerializableValuesMap : LinkedHashMap<String, JavaSerializable>() { |
| # ===================================================================================================================== | |
| # Power Plan Management | |
| # --------------------------------------------------------------------------------------------------------------------- | |
| $powerPlans = powercfg -l | |
| $highPerformancePowerPlan = $powerPlans | ForEach-Object { if ($_.contains("High performance")) { | |
| $_.split()[3] | |
| } | |
| } | |
| $balancedPowerPlan = $powerPlans | ForEach-Object { if ($_.contains("Balanced")) { | |
| $_.split()[3] |
| # ===================================================================================================================== | |
| # Power Plan Management | |
| # --------------------------------------------------------------------------------------------------------------------- | |
| $powerPlans = powercfg -l | |
| $highPerformancePowerPlan = $powerPlans | %{ if ($_.contains("High performance")) { $_.split()[3] }} | |
| $balancedPowerPlan = $powerPlans | %{ if ($_.contains("Balanced")) { $_.split()[3] }} | |
| $powerSaverPowerPlan = $powerPlans | %{ if ($_.contains("Power saver")) {$_.split()[3] }} | |
| $currentPowerPlan = $(powercfg -getactivescheme).split()[3] | |
| function Get-Plan |
| Function Log-Start{ | |
| <# | |
| .SYNOPSIS | |
| Creates log file | |
| .DESCRIPTION | |
| Creates log file with path and name that is passed. Checks if log file exists, and if it does deletes it and creates a new one. | |
| Once created, writes initial logging data | |
| .PARAMETER LogPath |
| $jobName = "SchedulerJOB" | |
| $schedulePath = Join-Path $PSScriptRoot "Schedule.json" | |
| $epoch = Get-Date -Year 1970 -Day 1 -Month 1 | |
| function Read-WorkItems() | |
| { | |
| $json = Get-Content -Path $schedulePath -Raw | |
| $workItems = (ConvertFrom-Json $json) | |
| $workItems |
| using System; | |
| using System.Runtime.CompilerServices; | |
| using System.Threading; | |
| namespace Rs.Threading | |
| { | |
| /// <summary> | |
| /// Provides methods to take locks on <see cref="Int32"/> values using CAS operation. | |
| /// </summary> | |
| public static class Int32Lock |