void RefreshValue() { if (this.DllPath == null) { return; } if (!File.Exists(this.DllPath)) { return; } this.Collection.Clear(); // Message:刷新pdb路径 string pdb = Path.Combine(Path.GetDirectoryName(this.DllPath), Path.GetFileNameWithoutExtension(this.DllPath) + ".XML"); if (File.Exists(pdb)) { this.PdbPath = pdb; } else { this.PdbPath = string.Empty; } // Message:获取所有类型 byte[] fileData = File.ReadAllBytes(this.DllPath); var ass = Assembly.Load(fileData); var types = ass.GetTypes(); foreach (var item in ass.GetTypes().OrderBy(l => l.Name)) { if (item.MemberType == MemberTypes.NestedType) { continue; } TypeNodeClass t = TypeNodeClass.CreateTypeNode(item, item.Name.ToLower()); this.Collection.Add(t); } }
void RefreshRightValue() { if (this.RightPath == null) { return; } this.RightCollection.Clear(); // Message:获取所有类型 if (!File.Exists(this.RightPath)) { return; } var ass = Assembly.LoadFrom(this.RightPath); var types = ass.GetTypes(); foreach (var item in ass.GetTypes().OrderBy(l => l.Name)) { if (item.MemberType == MemberTypes.NestedType) { continue; } //TypeNodeClass t = new TypeNodeClass(); //t.FullPath += item.Name.ToLower(); //t.Value = item; TypeNodeClass t = TypeNodeClass.CreateTypeNode(item, item.Name.ToLower()); this.RightCollection.Add(t); } }