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];
        }
예제 #2
0
        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);
        }
예제 #3
0
        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;
            }
        }
예제 #4
0
        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;
        }
예제 #5
0
        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));
            }
        }
예제 #6
0
        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);
        }
예제 #7
0
        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;
        }
예제 #8
0
        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;
        }
예제 #9
0
        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();
        }
예제 #10
0
 public NestedTypeNode(IOldToNewTupleMap <TypeMetadata> typesMap, ItemNodeBase parent, APIDiffInfo apiDiffInfo, FilterSettings filterSettings)
     : base(GetMemberName(typesMap), parent, apiDiffInfo, filterSettings)
 {
     this.TypesMap = typesMap;
 }
예제 #11
0
 public TypeNode(string name, ItemNodeBase parent, APIDiffInfo apiDiffInfo, FilterSettings filterSettings)
     : base(name, parent, apiDiffInfo, filterSettings)
 {
 }
예제 #12
0
        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;
        }
예제 #13
0
 public ItemNodeBase(string name, ItemNodeBase parentNode, APIDiffInfo apiDiffInfo, FilterSettings filterSettings)
     : this(name, parentNode, filterSettings)
 {
     this.apiDiffInfo = apiDiffInfo;
 }