예제 #1
0
 internal static void SetCustomOptions(
     CimOperationOptions operationOptions,
     IEnumerable<KeyValuePair<string, object>> customOptions,
     CimSensitiveValueConverter cimSensitiveValueConverter)
 {
     if (customOptions != null)
     {
         foreach (KeyValuePair<string, object> queryOption in customOptions)
         {
             SetCustomOption(operationOptions, queryOption.Key, queryOption.Value, cimSensitiveValueConverter);
         }
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
 internal void Apply(CimOperationOptions cimOperationOptions, CimSensitiveValueConverter cimSensitiveValueConverter)
 {
     CimOperationOptionsHelper.SetCustomOptions(cimOperationOptions, this.GetSnapshot(), cimSensitiveValueConverter);
 }