public AssemblyBrowseTabItem(IOldToNewTupleMap <string> comparableModel) { APIDiffInfo diffInfo = new APIDiffInfo(APIDiffHelper.GetAPIDifferences(comparableModel.OldType, comparableModel.NewType)); var generationProjectInfoMap = new OldToNewTupleMap <GeneratedProjectOutputInfo> ( new GeneratedProjectOutputInfo(comparableModel.OldType), new GeneratedProjectOutputInfo(comparableModel.NewType) ); FilterSettings filterSettings = new FilterSettings(this.ShowAllUnmodified); this.nodes = new AssemblyNode[] { new AssemblyNode(comparableModel, null, null, this, filterSettings) { GenerationProjectInfoMap = generationProjectInfoMap } }; this.header = GetTabTitle(comparableModel); this.toolTip = GetTabToolTip(comparableModel); this.nodes[0].ChildrenLoaded += OnAssemblyNodeChildrenLoaded; this.contentLoaded = new bool[2]; }
private FolderNode ProcessFolderNodeCreation(IOldToNewTupleMap <string> typesMap) { APIDiffInfo diffInfo = this.apiDiffInfo == null ? null : new APIDiffInfo(null); var folderNode = new FolderNode(typesMap, this, diffInfo, progressNotifier, this.FilterSettings, false); return(folderNode); }
public DecompiledMemberNodeBase(string name, ItemNodeBase parent, APIDiffInfo apiDiffInfo, FilterSettings filterSettings) : base(name, parent, apiDiffInfo, filterSettings) { DecompiledMemberNodeBase parentMember = parent as DecompiledMemberNodeBase; if (parentMember != null) { this.OldDecompileResult = parentMember.OldDecompileResult; this.NewDecompileResult = parentMember.NewDecompileResult; } }
public FolderNode(IOldToNewTupleMap <string> folderMap, ItemNodeBase parent, APIDiffInfo apiDiffInfo, IProgressNotifier progressNotifier, FilterSettings filterSettings, bool loadChildrenAsync) : base(GetName(folderMap), parent, apiDiffInfo, filterSettings) { this.folderMap = folderMap; this.progressNotifier = progressNotifier; // This line needs to be before this.IsExpanded = true; in any case. this.loadChildrenAsync = loadChildrenAsync; this.IsExpanded = true; }
private DecompiledMemberNodeBase GetItemNodeFromMemberType(IOldToNewTupleMap <MemberDefinitionMetadataBase> membersMap, LoadAPIItemsContext context) { MemberDefinitionMetadataBase metadata = membersMap.GetFirstNotNullItem(); APIDiffInfo diffInfo = context.GenerateAPIDiffInfo(membersMap); if (metadata.MemberType == MemberType.Type) { return(new NestedTypeNode((new OldToNewTupleMap <TypeMetadata>((TypeMetadata)membersMap.OldType, (TypeMetadata)membersMap.NewType)), this, diffInfo, this.FilterSettings)); } else { return(new MemberNode((new OldToNewTupleMap <MemberMetadata>((MemberMetadata)membersMap.OldType, (MemberMetadata)membersMap.NewType)), this, diffInfo, this.FilterSettings)); } }
private AssemblyNode ProcessAssemblyNodeCreation(IOldToNewTupleMap <string> typesMap) { APIDiffInfo diffInfo = this.apiDiffInfo != null ? new APIDiffInfo(APIDiffHelper.GetAPIDifferences(typesMap.OldType, typesMap.NewType)) : null; var generationProjectInfoMap = new OldToNewTupleMap <GeneratedProjectOutputInfo> ( new GeneratedProjectOutputInfo(typesMap.OldType), new GeneratedProjectOutputInfo(typesMap.NewType) ); var assemblyNode = new AssemblyNode(typesMap, this, diffInfo, progressNotifier, this.FilterSettings) { GenerationProjectInfoMap = generationProjectInfoMap }; assemblyNode.SetDifferenceDecoration(); return(assemblyNode); }
public ModuleNode(IOldToNewTupleMap <ModuleMetadata> modulesMap, ItemNodeBase parent, APIDiffInfo apiDiffInfo, bool shouldBeExpanded, FilterSettings filterSettings) : base(GetName(modulesMap), parent, apiDiffInfo, filterSettings) { this.ModulesMap = modulesMap; this.differenceDecoration = GetDifferenceDecoration(); this.IsExpanded = shouldBeExpanded; }
public AssemblyNode(IOldToNewTupleMap <string> typesMap, ItemNodeBase parent, APIDiffInfo apiDiffInfo, IProgressNotifier progressNotifier, FilterSettings filterSettings) : base(Path.GetFileName(typesMap.GetFirstNotNullItem()), parent, apiDiffInfo, filterSettings) { this.TypesMap = typesMap; this.progressNotifier = progressNotifier; this.areChildrenLoaded = false; }
public TypeNode(IOldToNewTupleMap <TypeMetadata> typesMap, ItemNodeBase parent, APIDiffInfo apiDiffInfo, FilterSettings filterSettings) : base(GetMemberName(typesMap), parent, apiDiffInfo, filterSettings) { this.TypesMap = typesMap; TypeMetadata oldTypeMetadata = TypesMap.OldType; TypeMetadata newTypeMetadata = TypesMap.NewType; IDecompilationResults oldResult; IDecompilationResults newResult; if (oldTypeMetadata != null && GlobalDecompilationResultsRepository.Instance.TryGetDecompilationResult(oldTypeMetadata.AssemblyPath, oldTypeMetadata.Module.TokenId, oldTypeMetadata.TokenId, out oldResult)) { this.OldDecompileResult = oldResult; } if (newTypeMetadata != null && GlobalDecompilationResultsRepository.Instance.TryGetDecompilationResult(newTypeMetadata.AssemblyPath, newTypeMetadata.Module.TokenId, newTypeMetadata.TokenId, out newResult)) { this.NewDecompileResult = newResult; } this.differenceDecoration = GetDifferenceDecoration(); }
public NestedTypeNode(IOldToNewTupleMap <TypeMetadata> typesMap, ItemNodeBase parent, APIDiffInfo apiDiffInfo, FilterSettings filterSettings) : base(GetMemberName(typesMap), parent, apiDiffInfo, filterSettings) { this.TypesMap = typesMap; }
public TypeNode(string name, ItemNodeBase parent, APIDiffInfo apiDiffInfo, FilterSettings filterSettings) : base(name, parent, apiDiffInfo, filterSettings) { }
public MemberNode(IOldToNewTupleMap <MemberMetadata> membersMap, ItemNodeBase parent, APIDiffInfo apiDiffInfo, FilterSettings filterSettings) : base(membersMap.GetFirstNotNullItem().GetSignature(), parent, apiDiffInfo, filterSettings) { this.membersMap = membersMap; this.differenceDecoration = GetDifferenceDecoration(); // This node has no child items, so this removes the expander. this.LazyLoading = false; }
public ItemNodeBase(string name, ItemNodeBase parentNode, APIDiffInfo apiDiffInfo, FilterSettings filterSettings) : this(name, parentNode, filterSettings) { this.apiDiffInfo = apiDiffInfo; }