Ejemplo n.º 1
0
 public static string GetTypeName(this System.Type type, DkmClrCustomTypeInfo typeInfo, bool escapeKeywordIdentifiers = false, DkmInspectionContext inspectionContext = null)
 {
     var formatter = new CSharpFormatter();
     var clrType = new DkmClrType((TypeImpl)type);
     if (inspectionContext == null)
     {
         var inspectionSession = new DkmInspectionSession(ImmutableArray.Create<IDkmClrFormatter>(formatter), ImmutableArray.Create<IDkmClrResultProvider>(new CSharpResultProvider()));
         inspectionContext = new DkmInspectionContext(inspectionSession, DkmEvaluationFlags.None, radix: 10, runtimeInstance: null);
     }
     return escapeKeywordIdentifiers ?
         ((IDkmClrFullNameProvider)formatter).GetClrTypeName(inspectionContext, clrType, typeInfo) :
         inspectionContext.GetTypeName(clrType, typeInfo, Formatter.NoFormatSpecifiers);
 }
 private CSharpResultProvider(CSharpFormatter formatter)
     : this(formatter, formatter)
 {
 }
Ejemplo n.º 3
0
 private CSharpResultProvider(CSharpFormatter formatter)
     : this(formatter, formatter)
 {
 }
 private CSharpResultProviderTestBase(CSharpFormatter formatter) :
     this(new DkmInspectionSession(ImmutableArray.Create<IDkmClrFormatter>(formatter), ImmutableArray.Create<IDkmClrResultProvider>(new CSharpResultProvider(formatter, formatter))))
 {
 }