internal static Expansion CreateExpansion( MemberAndDeclarationInfo members, DynamicFlagsMap dynamicFlagsMap) { return new RootHiddenExpansion(members, dynamicFlagsMap); }
internal static EvalResult CreateMemberDataItem( ResultProvider resultProvider, DkmInspectionContext inspectionContext, MemberAndDeclarationInfo member, DkmClrValue memberValue, EvalResultDataItem parent, CustomTypeInfoTypeArgumentMap customTypeInfoMap, ExpansionFlags flags) { var fullNameProvider = resultProvider.FullNameProvider; var declaredType = member.Type; var declaredTypeInfo = customTypeInfoMap.SubstituteCustomTypeInfo(member.OriginalDefinitionType, member.TypeInfo); string memberName; // Considering, we're not handling the case of a member inherited from a generic base type. var typeDeclaringMember = member.GetExplicitlyImplementedInterface(out memberName) ?? member.DeclaringType; var typeDeclaringMemberInfo = typeDeclaringMember.IsInterface ? customTypeInfoMap.SubstituteCustomTypeInfo(typeDeclaringMember.GetInterfaceListEntry(member.DeclaringType), customInfo: null) : null; var memberNameForFullName = fullNameProvider.GetClrValidIdentifier(inspectionContext, memberName); var appDomain = memberValue.Type.AppDomain; string fullName; if (memberNameForFullName == null) { fullName = null; } else { memberName = memberNameForFullName; fullName = MakeFullName( fullNameProvider, inspectionContext, memberNameForFullName, new TypeAndCustomInfo(DkmClrType.Create(appDomain, typeDeclaringMember), typeDeclaringMemberInfo), // Note: Won't include DynamicAttribute. member.RequiresExplicitCast, member.IsStatic, parent); } return resultProvider.CreateDataItem( inspectionContext, memberName, typeDeclaringMemberAndInfo: (member.IncludeTypeInMemberName || typeDeclaringMember.IsInterface) ? new TypeAndCustomInfo(DkmClrType.Create(appDomain, typeDeclaringMember), typeDeclaringMemberInfo) : default(TypeAndCustomInfo), // Note: Won't include DynamicAttribute. declaredTypeAndInfo: new TypeAndCustomInfo(DkmClrType.Create(appDomain, declaredType), declaredTypeInfo), value: memberValue, useDebuggerDisplay: parent != null, expansionFlags: flags, childShouldParenthesize: false, fullName: fullName, formatSpecifiers: Formatter.NoFormatSpecifiers, category: DkmEvaluationResultCategory.Other, flags: memberValue.EvalFlags, evalFlags: DkmEvaluationFlags.None); }
internal RootHiddenExpansion(MemberAndDeclarationInfo member, DynamicFlagsMap dynamicFlagsMap) { _member = member; _dynamicFlagsMap = dynamicFlagsMap; }
private MemberExpansion(MemberAndDeclarationInfo[] members, CustomTypeInfoTypeArgumentMap customTypeInfoMap) { Debug.Assert(members != null); Debug.Assert(members.Length > 0); Debug.Assert(customTypeInfoMap != null); _members = members; _customTypeInfoMap = customTypeInfoMap; }
private static EvalResult GetMemberRow( ResultProvider resultProvider, DkmInspectionContext inspectionContext, DkmClrValue value, MemberAndDeclarationInfo member, EvalResultDataItem parent, CustomTypeInfoTypeArgumentMap customTypeInfoMap) { var memberValue = value.GetMemberValue(member, inspectionContext); return CreateMemberDataItem( resultProvider, inspectionContext, member, memberValue, parent, customTypeInfoMap, ExpansionFlags.All); }
private static EvalResultDataItem GetMemberRow( ResultProvider resultProvider, DkmInspectionContext inspectionContext, DkmClrValue value, MemberAndDeclarationInfo member, EvalResultDataItem parent, DynamicFlagsMap dynamicFlagsMap) { var memberValue = value.GetMemberValue(member, inspectionContext); return CreateMemberDataItem( resultProvider, inspectionContext, member, memberValue, parent, dynamicFlagsMap, ExpansionFlags.All); }
internal static EvalResultDataItem CreateMemberDataItem( ResultProvider resultProvider, DkmInspectionContext inspectionContext, MemberAndDeclarationInfo member, DkmClrValue memberValue, EvalResultDataItem parent, DynamicFlagsMap dynamicFlagsMap, ExpansionFlags flags) { var declaredType = member.Type; var declaredTypeInfo = dynamicFlagsMap.SubstituteDynamicFlags(member.OriginalDefinitionType, DynamicFlagsCustomTypeInfo.Create(member.TypeInfo)).GetCustomTypeInfo(); string memberName; // Considering, we're not handling the case of a member inherited from a generic base type. var typeDeclaringMember = member.GetExplicitlyImplementedInterface(out memberName) ?? member.DeclaringType; var typeDeclaringMemberInfo = typeDeclaringMember.IsInterface ? dynamicFlagsMap.SubstituteDynamicFlags(typeDeclaringMember.GetInterfaceListEntry(member.DeclaringType), originalDynamicFlags: default(DynamicFlagsCustomTypeInfo)).GetCustomTypeInfo() : null; var formatter = resultProvider.Formatter; memberName = formatter.GetIdentifierEscapingPotentialKeywords(memberName); var fullName = MakeFullName( formatter, memberName, new TypeAndCustomInfo(typeDeclaringMember, typeDeclaringMemberInfo), // Note: Won't include DynamicAttribute. member.RequiresExplicitCast, member.IsStatic, parent); return resultProvider.CreateDataItem( inspectionContext, memberName, typeDeclaringMemberAndInfo: (member.IncludeTypeInMemberName || typeDeclaringMember.IsInterface) ? new TypeAndCustomInfo(typeDeclaringMember, typeDeclaringMemberInfo) : default(TypeAndCustomInfo), // Note: Won't include DynamicAttribute. declaredTypeAndInfo: new TypeAndCustomInfo(declaredType, declaredTypeInfo), value: memberValue, parent: parent, expansionFlags: flags, childShouldParenthesize: false, fullName: fullName, formatSpecifiers: Formatter.NoFormatSpecifiers, category: DkmEvaluationResultCategory.Other, flags: memberValue.EvalFlags, evalFlags: DkmEvaluationFlags.None); }
private MemberExpansion(MemberAndDeclarationInfo[] members, DynamicFlagsMap dynamicFlagsMap) { Debug.Assert(members != null); Debug.Assert(members.Length > 0); Debug.Assert(dynamicFlagsMap != null); _members = members; _dynamicFlagsMap = dynamicFlagsMap; }
private static DkmClrValue GetMemberValue(DkmClrValue container, MemberAndDeclarationInfo member, DkmInspectionContext inspectionContext) { // Note: GetMemberValue() may return special value // when func-eval of properties is disabled. return container.GetMemberValue(member.Name, (int)member.MemberType, member.DeclaringType.FullName, inspectionContext); }
internal static DkmClrValue GetMemberValue(this DkmClrValue value, MemberAndDeclarationInfo member, DkmInspectionContext inspectionContext) { // Note: GetMemberValue() may return special value when func-eval of properties is disabled. return value.GetMemberValue(member.Name, (int)member.MemberType, member.DeclaringType.FullName, inspectionContext); }
internal static Expansion CreateExpansion( MemberAndDeclarationInfo members, CustomTypeInfoTypeArgumentMap customTypeInfoMap) { return new RootHiddenExpansion(members, customTypeInfoMap); }
internal RootHiddenExpansion(MemberAndDeclarationInfo member, CustomTypeInfoTypeArgumentMap customTypeInfoMap) { _member = member; _customTypeInfoMap = customTypeInfoMap; }