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

Function process_schema_args

lib/dsc-lib/src/dscresources/command_resource.rs:982–1002  ·  view source on GitHub ↗
(args: Option<&Vec<SchemaArgKind>>, command_resource_info: &CommandResourceInfo)

Source from the content-addressed store, hash-verified

980}
981
982fn process_schema_args(args: Option<&Vec<SchemaArgKind>>, command_resource_info: &CommandResourceInfo) -> Option<Vec<String>> {
983 let Some(arg_values) = args else {
984 debug!("{}", t!("dscresources.commandResource.noArgs"));
985 return None;
986 };
987
988 let mut processed_args = Vec::<String>::new();
989 for arg in arg_values {
990 match arg {
991 SchemaArgKind::String(s) => {
992 processed_args.push(s.clone());
993 },
994 SchemaArgKind::ResourceType { resource_type_arg } => {
995 processed_args.push(resource_type_arg.clone());
996 processed_args.push(command_resource_info.type_name.to_string());
997 },
998 }
999 }
1000
1001 Some(processed_args)
1002}
1003
1004/// Process the arguments for a command resource's set or delete operation.
1005///

Callers 1

get_schemaFunction · 0.85

Calls 1

newFunction · 0.50

Tested by

no test coverage detected