MCPcopy Create free account
hub / github.com/PowerShell/DSC / invoke

Method invoke

lib/dsc-lib/src/functions/not.rs:28–35  ·  view source on GitHub ↗
(&self, args: &[Value], _context: &Context)

Source from the content-addressed store, hash-verified

26 }
27
28 fn invoke(&self, args: &[Value], _context: &Context) -> Result<Value, DscError> {
29 debug!("{}", t!("functions.not.invoked"));
30 if let Some(arg1) = args[0].as_bool() {
31 Ok(Value::Bool(!arg1))
32 } else {
33 Err(DscError::Parser(t!("functions.invalidArguments").to_string()))
34 }
35 }
36}
37
38#[cfg(test)]

Callers

nothing calls this directly

Calls 1

BoolClass · 0.85

Tested by

no test coverage detected