public static CachedOutput Create(CorFrame frame, TypePrinterFlags flags) { var output = new TypeOutput(); frame.Write(output, flags); return(output.cachedOutput); }
static TypeOutput CreateType(TypeOutput output, CorValue value, TypePrinterFlags flags) { if (value == null) { output.Write("???", TypeColor.Error); } else { if (value.IsReference && value.Type == dndbg.Engine.COM.CorDebug.CorElementType.ByRef) { value = value.NeuterCheckDereferencedValue ?? value; } var type = value.ExactType; if (type != null) { type.Write(output, flags); } else { var cls = value.Class; if (cls != null) { cls.Write(output, flags); } else { output.Write("???", TypeColor.Error); } } } return(output); }
TypePrinterFlags GetTypePrinterFlags(ILocalsSettings localsSettings, TypePrinterFlags flags) { Update(localsSettings.ShowNamespaces, TypePrinterFlags.ShowNamespaces, ref flags); Update(localsSettings.ShowTokens, TypePrinterFlags.ShowTokens, ref flags); Update(localsSettings.ShowTypeKeywords, TypePrinterFlags.ShowTypeKeywords, ref flags); return(flags); }
public override string ToString() { const TypePrinterFlags flags = TypePrinterFlags.ShowParameterTypes | TypePrinterFlags.ShowReturnTypes | TypePrinterFlags.ShowNamespaces | TypePrinterFlags.ShowTypeKeywords; return(debugger.Dispatcher.UI(() => evt.ToString(flags))); }
public static CachedOutput Create(TypeSig fieldType, TypePrinterFlags flags) { fieldType = fieldType.RemovePinnedAndModifiers() ?? fieldType; if (fieldType is ByRefSig) { fieldType = fieldType.Next ?? fieldType; } var typeOutput = TypePrinterUtils.Write(new TypeOutput(), fieldType, flags); return(typeOutput.cachedOutput); }
static void Update(bool b, TypePrinterFlags f, ref TypePrinterFlags flags) { if (b) { flags |= f; } else { flags &= ~f; } }
public static CachedOutput CreateType(CorValue value, CorClass cls, TypePrinterFlags flags) { var valueOutput = CreateType(new TypeOutput(), value, flags); if (cls == null || value == null) { return(valueOutput.cachedOutput); } var typeOutput = value.WriteType(new TypeOutput(), cls, flags); return(CreateTypeInternal(valueOutput, typeOutput)); }
public static CachedOutput Create(CorType type, TypePrinterFlags flags) { var output = new TypeOutput(); if (type == null) { output.Write("???", TypeColor.Error); } else { type.Write(output, flags); } return(output.cachedOutput); }
public static CachedOutput CreateValue(CorValue value, TypePrinterFlags flags, Func <DnEval> getEval = null) { var output = new TypeOutput(); if (value == null) { output.Write("???", TypeColor.Error); } else { value.Write(output, flags, getEval); } return(output.cachedOutput); }
public T WriteType <T>(T output, TypeSig ts, IList <CorType> typeArgs, IList <CorType> methodArgs, TypePrinterFlags flags, Func <DnEval> getEval = null) where T : ITypeOutput { new TypePrinter(output, flags, getEval).Write(ts, typeArgs, methodArgs); return(output); }
public T WriteType <T>(T output, CorClass cls, TypePrinterFlags flags, Func <DnEval> getEval = null) where T : ITypeOutput { new TypePrinter(output, flags, getEval).Write(cls); return(output); }
public static CachedOutput CreateConstant(TypeSig type, object c, TypePrinterFlags flags) { return(TypePrinterUtils.WriteConstant(new TypeOutput(), type, c, flags).cachedOutput); }
public string ToString(CorValue value, TypePrinterFlags flags) { return(Write(new StringBuilderTypeOutput(), value, flags).ToString()); }
public static T Write <T>(this T output, TypeSig type, TypePrinterFlags flags, IList <CorType> typeGenArgs = null, IList <CorType> methGenArgs = null) where T : ITypeOutput { new TypePrinter(output, flags).Write(type, typeGenArgs, methGenArgs); return(output); }
TypePrinterFlags GetTypePrinterFlags(IDebuggerSettings debuggerSettings, TypePrinterFlags flags) { Update(!debuggerSettings.UseHexadecimal, TypePrinterFlags.UseDecimal, ref flags); return(flags); }
public static string ConstantToString(object c, TypePrinterFlags flags) { return(WriteConstant(new StringBuilderTypeOutput(), c, flags).ToString()); }
public string ToString(TypePrinterFlags flags) => Write(new StringBuilderTypeOutput(), flags).ToString();
public string ToString(TypePrinterFlags flags, Func <DnEval> getEval = null) { return(Write(new StringBuilderTypeOutput(), flags, getEval).ToString()); }
public static string ConstantToString(TypeSig type, object c, TypePrinterFlags flags) => WriteConstant(new StringBuilderTypeOutput(), type, c, flags).ToString();
public static string ToString(CorElementType etype, TypePrinterFlags flags) => Write(new StringBuilderTypeOutput(), etype, flags).ToString();
public static T Write <T>(this T output, CorElementType etype, TypePrinterFlags flags) where T : ITypeOutput => Write(output, ToTypeSig(etype), flags);
public static string ToString(TypeSig type, TypePrinterFlags flags, IList <CorType> typeGenArgs = null, IList <CorType> methGenArgs = null) => Write(new StringBuilderTypeOutput(), type, flags, typeGenArgs, methGenArgs).ToString();
public T Write <T>(T output, TypePrinterFlags flags) where T : ITypeOutput { new TypePrinter(output, flags).Write(this); return(output); }
public static CachedOutput CreateType(CorValue value, TypePrinterFlags flags) { return(CreateType(new TypeOutput(), value, flags).cachedOutput); }
public string ToString(TypePrinterFlags flags) { return(Write(new StringBuilderTypeOutput(), flags).ToString()); }
public static CachedOutput CreateType(CorValue value, TypeSig ts, IList <CorType> typeArgs, IList <CorType> methodArgs, TypePrinterFlags flags) { if (value == null && ts != null) { return(TypePrinterUtils.Write(new TypeOutput(), ts, flags, typeArgs, methodArgs).cachedOutput); } var valueOutput = CreateType(new TypeOutput(), value, flags); if (ts == null || value == null) { return(valueOutput.cachedOutput); } ts = ts.RemovePinnedAndModifiers() ?? ts; if (ts is ByRefSig) { ts = ts.Next ?? ts; } var typeOutput = value.WriteType(new TypeOutput(), ts, typeArgs, methodArgs, flags); return(CreateTypeInternal(valueOutput, typeOutput)); }
public T Write <T>(T output, CorValue value, TypePrinterFlags flags, Func <DnEval> getEval = null) where T : ITypeOutput { new TypePrinter(output, flags, getEval).Write(value, this); return(output); }
public static T WriteConstant <T>(this T output, object c, TypePrinterFlags flags) where T : ITypeOutput { new TypePrinter(output, flags).WriteConstant(c); return(output); }
public T Write <T>(T output, TypeSig type, TypePrinterFlags flags) where T : ITypeOutput { new TypePrinter(output, flags).Write(type, TypeParameters.ToArray()); return(output); }