/// <summary> /// Dump the Type-Information for the COM type to the log, this uses reflection /// </summary> /// <param name="wrapperProxy">wrapperProxy to inspect</param> public static void DumpTypeInfo(object wrapperProxy) { Type comType = COMWrapper.GetUnderlyingType(wrapperProxy); if (comType == null) { LOG.InfoFormat("Can't get Typeinformation"); return; } LOG.InfoFormat("Type information for COM object with name: {0}", comType.Name); try { foreach (MemberInfo memberInfo in comType.GetMembers()) { LOG.InfoFormat("Member: {0};", memberInfo.ToString()); } } catch (Exception memberException) { LOG.Error(memberException); } try { foreach (PropertyInfo propertyInfo in comType.GetProperties()) { LOG.InfoFormat("Property: {0};", propertyInfo.ToString()); } } catch (Exception propertyException) { LOG.Error(propertyException); } try { foreach (FieldInfo fieldInfo in comType.GetFields()) { LOG.InfoFormat("Field: {0};", fieldInfo.ToString()); } } catch (Exception fieldException) { LOG.Error(fieldException); } LOG.InfoFormat("Type information end."); }