28 references to AddChild
System.Management (28)
Instrumentation\CodeSpit.cs (1)
62
return
AddChild
(String.Concat(parts));
Instrumentation\SchemaMapping.cs (25)
87
CodeWriter codeClass = code.
AddChild
("public class "+codeClassName+" : IWmiConverter");
112
CodeWriter codeCCTOR = codeClass.
AddChild
("static "+codeClassName+"()");
119
CodeWriter codeCTOR = codeClass.
AddChild
("public "+codeClassName+"()");
142
CodeWriter codeDTOR = codeClass.
AddChild
("~"+codeClassName+"()");
143
codeDTOR.
AddChild
("if(instWbemObjectAccessIP != IntPtr.Zero)").Line("Marshal.Release(instWbemObjectAccessIP);");
152
CodeWriter codeToWMI = codeClass.
AddChild
("public void ToWMI(object obj)");
177
CodeWriter codeIntPtrCast = codeClass.
AddChild
("public static explicit operator IntPtr("+codeClassName+" obj)");
301
CodeWriter codeNotNull = codeToWMI.
AddChild
(String.Format("if(instNET.{0} != null)", field.Name));
302
CodeWriter codeElse = codeToWMI.
AddChild
("else");
310
CodeWriter codeForLoop = codeNotNull.
AddChild
("for(int i=0;i<len;i++)");
312
CodeWriter codeFoundType = codeForLoop.
AddChild
(String.Format("if((instNET.{0}[i] != null) && mapTypeToConverter.Contains(instNET.{0}[i].GetType()))", field.Name));
318
codeForLoop.
AddChild
("else").Line(String.Format("embeddedObjects[i] = SafeAssign.GetManagementObject(instNET.{0}[i]);", field.Name));
324
CodeWriter codeFoundType = codeNotNull.
AddChild
(String.Format("if(mapTypeToConverter.Contains(instNET.{0}.GetType()))", field.Name));
330
codeNotNull.
AddChild
("else").Line(String.Format("{0}.Value = SafeAssign.GetInstance(instNET.{1});", propFieldName, field.Name));
341
codeNotNull = codeToWMI.
AddChild
(String.Format("if(instNET.{0} != null)", field.Name));
342
CodeWriter codeElse = codeToWMI.
AddChild
("else");
352
CodeWriter codeForLoop = codeNotNull.
AddChild
("for(int i=0;i<len;i++)");
362
CodeWriter codeArrayElementNotNull = codeForLoop.
AddChild
(String.Format("if(instNET.{0}[i] != null)", field.Name));
378
CodeWriter codeConverterProp = codeClass.
AddChild
(String.Format("{0} embeddedConverter_{1}", embeddedConverterName, propFieldName));
379
CodeWriter codeGet = codeConverterProp.
AddChild
("get");
380
CodeWriter codeIf = codeGet.
AddChild
(String.Format("if(null == lazy_embeddedConverter_{0})", propFieldName));
424
CodeWriter codeQuickString = codeToWMI.
AddChild
(String.Format("if(null != instNET.{0})", field.Name));
427
codeToWMI.
AddChild
("else").Line(String.Format("IWOA.Put_f5(5, instWbemObjectAccessIP, \"{0}\", 0, ref nullObj, 8);", propName));
451
codeToWMI.
AddChild
(String.Format("if(null == instNET.{0})", field.Name)).Line(String.Format("{0}.Value = null;", propFieldName));
452
codeToWMI.
AddChild
("else").Line(String.Format("{0}.Value = SafeAssign.WMITimeArrayToStringArray(instNET.{1});", propFieldName, field.Name));
Instrumentation\SchemaRegistration.cs (2)
350
CodeWriter codeWMIConverter = code.
AddChild
("public class WMINET_Converter");
356
CodeWriter codeCCTOR = codeWMIConverter.
AddChild
("static WMINET_Converter()");