internal static void SetCustomOption(CimOperationOptions operationOptions, string optionName, object optionValue) { if (optionValue != null) { object cim = CimValueConverter.ConvertFromDotNetToCim(optionValue); CimType cimType = CimConverter.GetCimType(CimValueConverter.GetCimType(optionValue.GetType())); operationOptions.SetCustomOption(optionName, cim, cimType, false); return; } else { return; } }
internal static void SetCustomOption( CimOperationOptions operationOptions, string optionName, object optionValue, CimSensitiveValueConverter cimSensitiveValueConverter) { Dbg.Assert(!string.IsNullOrWhiteSpace(optionName), "Caller should verify optionName != null"); if (optionValue == null) { return; } object cimValue = cimSensitiveValueConverter.ConvertFromDotNetToCim(optionValue); CimType cimType = CimConverter.GetCimType(CimSensitiveValueConverter.GetCimType(optionValue.GetType())); operationOptions.SetCustomOption(optionName, cimValue, cimType, mustComply: false); }