private static GetDebugViewType ( Type type ) : Type | ||
type | Type | |
return | Type |
private static Type GetDebugViewType(Type type)
{
var att =
(DebuggerTypeProxyAttribute)
type.GetCustomAttributes().Single(at => at.TypeId.Equals(typeof(DebuggerTypeProxyAttribute)));
string proxyName = att.ProxyTypeName;
proxyName = proxyName.Substring(0, proxyName.IndexOf(','));
return type.GetTypeInfo().Assembly.GetType(proxyName);
}