dsccommunity / DscResource.Common

This module contains common functions that are used in DSC resources.
https://dsccommunity.org
MIT License
9 stars 9 forks source link

Add Test-IsNumericType from SqlServerDsc => DscResource.Common Public Functions #87

Closed hollanjs closed 1 year ago

hollanjs commented 1 year ago

Problem description

Test-IsNumericType: Move to DscResource.Common as a public command was created in the SqlServerDsc module under Issue 1795. It was determined this function may better serve the DSC community from the DscResource.Common module.

This function is used to assert that an object is of a numeric type, returning a Boolean value of $true or $false.

Verbose logs

N/A

How to reproduce

N/A

Expected behavior

N/A

Current behavior

> Test-IsNumericType -Object ([System.UInt32] 1)
True
> 1 | Test-IsNumericType
True
>"a" | Test-IsNumericType
False

Suggested solution

Add to DscResource.Common under Public functions; Remove from SqlServerDsc after DscResource.Common changes have been merged.

Operating system the target node is running

N/A

PowerShell version and build the target node is running

N/A

Module version used

Name               Version
----               -------
DscResource.Common 0.12.0