public MyClassWithVisualizerStringVisualizerObjectSource(MyClassWithVisualizerString instance) { _instance = instance; }
static int Main(string[] args) { MyClass myClass = new MyClass() { Name = "trimmed" }; MyClassWithVisualizerString myClassWithString = new MyClassWithVisualizerString() { Name = "trimmed" }; Type[] allTypes = typeof(MyClass).Assembly.GetTypes(); bool foundDebuggerVisualizer = false; bool foundDebuggerVisualizer2 = false; bool foundDebuggerVisualizerObjectSource = false; bool foundStringDebuggerVisualizer = false; bool foundStringDebuggerVisualizer2 = false; bool foundStringDebuggerVisualizerObjectSource = false; for (int i = 0; i < allTypes.Length; i++) { Type currentType = allTypes[i]; if (currentType.FullName == "Program+MyClass+DebuggerVisualizer" && currentType.GetProperties().Length == 1 && currentType.GetConstructors().Length == 1) { foundDebuggerVisualizer = true; } else if (currentType.FullName == "Program+MyClass+DebuggerVisualizer2" && currentType.GetProperties().Length == 1 && currentType.GetConstructors().Length == 1) { foundDebuggerVisualizer2 = true; } else if (currentType.FullName == "Program+MyClass+DebuggerVisualizerObjectSource" && currentType.GetProperties().Length == 1 && currentType.GetConstructors().Length == 1) { foundDebuggerVisualizerObjectSource = true; } else if (currentType.FullName == "Program+MyClassWithVisualizerStringVisualizer" && currentType.GetProperties().Length == 1 && currentType.GetConstructors().Length == 1) { foundStringDebuggerVisualizer = true; } else if (currentType.FullName == "Program+MyClassWithVisualizerStringVisualizer2" && currentType.GetProperties().Length == 1 && currentType.GetConstructors().Length == 1) { foundStringDebuggerVisualizer2 = true; } else if (currentType.FullName == "Program+MyClassWithVisualizerStringVisualizerObjectSource" && currentType.GetProperties().Length == 1 && currentType.GetConstructors().Length == 1) { foundStringDebuggerVisualizerObjectSource = true; } } if (!foundDebuggerVisualizer) { return(-1); } if (!foundDebuggerVisualizer2) { return(-2); } if (!foundDebuggerVisualizerObjectSource) { return(-3); } if (!foundStringDebuggerVisualizer) { return(-4); } if (!foundStringDebuggerVisualizer2) { return(-5); } if (!foundStringDebuggerVisualizerObjectSource) { return(-6); } return(100); }
public MyClassWithVisualizerStringVisualizer2(MyClassWithVisualizerString instance) { _instance = instance; }