├── .gitattributes ├── .gitignore ├── .gitmodules ├── Binaries ├── Dragablz.XML ├── Dragablz.dll ├── Dragablz.pdb ├── ICSharpCode.TreeView.dll ├── Microsoft.Practices.Prism.MefExtensions.XML ├── Microsoft.Practices.Prism.MefExtensions.dll ├── Microsoft.Practices.Prism.XML ├── Microsoft.Practices.Prism.dll ├── Microsoft.Practices.ServiceLocation.XML ├── Microsoft.Practices.ServiceLocation.dll ├── nunit.core.dll ├── nunit.core.interfaces.dll └── nunit.framework.dll ├── CommonAssemblyInfo.cs ├── CompanyAssemblyInfo.cs ├── Core ├── JustAssembly.Core │ ├── APIDiffHelper.cs │ ├── Comparers │ │ ├── Accessors │ │ │ ├── AddAccessorComparer.cs │ │ │ ├── BaseAccessorComparer.cs │ │ │ ├── GetAccessorComparer.cs │ │ │ ├── RemoveAccessorComparer.cs │ │ │ └── SetAccessorComparer.cs │ │ ├── AssemblyComparer.cs │ │ ├── BaseDiffComparer.cs │ │ ├── CustomAttributeComparer.cs │ │ ├── EventComparer.cs │ │ ├── FieldComparer.cs │ │ ├── MethodComparer.cs │ │ ├── ModuleComparer.cs │ │ ├── PropertyComparer.cs │ │ ├── ReferenceComparer.cs │ │ ├── TypeComparer.cs │ │ └── VisibilityComparer.cs │ ├── DiffItems │ │ ├── Assemblies │ │ │ └── AssemblyDiffItem.cs │ │ ├── Attributes │ │ │ └── CustomAttributeDiffItem.cs │ │ ├── BaseDiffItem.cs │ │ ├── BaseMemberDiffItem.cs │ │ ├── Common │ │ │ ├── MemberTypeDiffItem.cs │ │ │ ├── StaticFlagChangedDiffItem.cs │ │ │ └── VisibilityChangedDiffItem.cs │ │ ├── Events │ │ │ ├── AddAccessorDiffItem.cs │ │ │ ├── EventDiffItem.cs │ │ │ └── RemoveAccessorDiffItem.cs │ │ ├── Fields │ │ │ └── FieldDiffItem.cs │ │ ├── Methods │ │ │ ├── MethodDiffItem.cs │ │ │ ├── ParameterDiffItem.cs │ │ │ └── VirtualFlagChangedDiffItem.cs │ │ ├── Modules │ │ │ └── ModuleDiffItem.cs │ │ ├── Properties │ │ │ ├── GetAccessorDiffItem.cs │ │ │ ├── PropertyDiffItem.cs │ │ │ └── SetAccessorDiffItem.cs │ │ ├── References │ │ │ └── AssemblyReferenceDiffItem.cs │ │ └── Types │ │ │ └── TypeDiffItem.cs │ ├── DiffType.cs │ ├── Extensions │ │ ├── EnumerableExtensions.cs │ │ ├── MemberDefinitionExtensions.cs │ │ ├── MethodReferenceExtensions.cs │ │ └── VisibilityDefinitionExtensions.cs │ ├── IDiffItem.cs │ ├── IMetadataDiffItem.cs │ ├── JustAssembly.Core.csproj │ ├── MetadataType.cs │ └── Properties │ │ └── AssemblyInfo.cs └── JustAssembly.DiffAlgorithm │ ├── Algorithm │ ├── DiffFileExtensions.cs │ ├── DiffInfo.cs │ ├── DiffItem.cs │ ├── DiffText.cs │ ├── IDiffAlgorithm.cs │ ├── MyersDiff.cs │ └── MyersDiffItemExtensions.cs │ ├── DiffHelper.cs │ ├── JustAssembly.DiffAlgorithm.csproj │ ├── Models │ ├── DiffBlock.cs │ ├── DiffBlockType.cs │ ├── DiffFile.cs │ └── DiffResult.cs │ └── Properties │ └── AssemblyInfo.cs ├── JustAssembly.sln ├── LICENSE ├── README.md ├── Tests └── JustAssembly.Tests │ ├── APIDiff │ ├── BaseExistingAPIDiffTestFixture.cs │ └── ExistingAPIDiffTestFixture.cs │ ├── Assemblies │ └── APIDiff │ │ ├── SimpleAPIDiffTest │ │ ├── SimpleAPIDiffTest.dll │ │ ├── SimpleAPIDiffTest.old.dll │ │ └── SimpleAPIDiffTest.xml │ │ └── VariousAPIDiffsTest │ │ ├── VariousAPIDiffsTest.dll │ │ ├── VariousAPIDiffsTest.old.dll │ │ └── VariousAPIDiffsTest.xml │ ├── JustAssembly.Tests.csproj │ ├── Properties │ └── AssemblyInfo.cs │ └── SimpleTestClass.cs ├── Tools ├── JustAssembly.API │ ├── Analytics │ │ ├── ConnectivityStatus.cs │ │ ├── IAnalyticsMonitorCapabilities.cs │ │ ├── IAnalyticsMonitorStatus.cs │ │ ├── IAnalyticsService.cs │ │ └── ITimingScope.cs │ ├── JustAssembly.API.csproj │ └── Properties │ │ └── AssemblyInfo.cs └── JustAssembly.WebServiceProxy │ ├── JustAssembly.WebServiceProxy.csproj │ ├── Models │ └── BannerConfig.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Service References │ └── Service │ │ ├── JustAssembly.WebServiceProxy.Service.BannerConfig.datasource │ │ ├── JustAssembly.WebServiceProxy.Service.BannerEntity.datasource │ │ ├── JustAssembly.WebServiceProxy.Service.PluginConfig.datasource │ │ ├── JustAssembly.WebServiceProxy.Service.ToolVersion.datasource │ │ ├── JustAssembly.WebServiceProxy.Service.VersionInfo.datasource │ │ ├── Reference.cs │ │ ├── Reference.svcmap │ │ ├── UpdatesService.disco │ │ ├── UpdatesService.wsdl │ │ ├── UpdatesService.xsd │ │ ├── UpdatesService1.xsd │ │ ├── UpdatesService2.xsd │ │ ├── UpdatesService3.xsd │ │ ├── UpdatesService4.xsd │ │ ├── UpdatesService5.xsd │ │ ├── UpdatesService6.xsd │ │ ├── UpdatesService7.xsd │ │ ├── UpdatesService8.xsd │ │ ├── configuration.svcinfo │ │ └── configuration91.svcinfo │ ├── UpdatesServiceClientFactory.cs │ └── app.config └── UI ├── ICSharpCode.AvalonEdit ├── AvalonEditCommands.cs ├── CodeCompletion │ ├── CompletionList.cs │ ├── CompletionList.xaml │ ├── CompletionListBox.cs │ ├── CompletionWindow.cs │ ├── CompletionWindowBase.cs │ ├── ICompletionData.cs │ ├── IOverloadProvider.cs │ ├── InsightWindow.cs │ ├── InsightWindow.xaml │ ├── OverloadInsightWindow.cs │ └── OverloadViewer.cs ├── Document │ ├── DocumentChangeEventArgs.cs │ ├── DocumentChangeOperation.cs │ ├── DocumentLine.cs │ ├── DocumentLineTree.cs │ ├── DocumentTextWriter.cs │ ├── GapTextBuffer.cs │ ├── IDocument.cs │ ├── ILineTracker.cs │ ├── ITextAnchor.cs │ ├── ITextSource.cs │ ├── IUndoableOperation.cs │ ├── LineManager.cs │ ├── LineNode.cs │ ├── NewLineFinder.cs │ ├── OffsetChangeMap.cs │ ├── RopeTextSource.cs │ ├── SimpleSegment.cs │ ├── TextAnchor.cs │ ├── TextAnchorNode.cs │ ├── TextAnchorTree.cs │ ├── TextDocument.cs │ ├── TextDocumentWeakEventManager.cs │ ├── TextLocation.cs │ ├── TextSegment.cs │ ├── TextSegmentCollection.cs │ ├── TextSourceVersionProvider.cs │ ├── TextUtilities.cs │ ├── UndoOperationGroup.cs │ ├── UndoStack.cs │ └── WeakLineTracker.cs ├── Editing │ ├── AbstractMargin.cs │ ├── Caret.cs │ ├── CaretLayer.cs │ ├── CaretNavigationCommandHandler.cs │ ├── CaretWeakEventHandler.cs │ ├── DottedLineMargin.cs │ ├── DragDropException.cs │ ├── EditingCommandHandler.cs │ ├── EmptySelection.cs │ ├── IReadOnlySectionProvider.cs │ ├── ImeNativeWrapper.cs │ ├── ImeSupport.cs │ ├── LineNumberMargin.cs │ ├── NoReadOnlySections.cs │ ├── RectangleSelection.cs │ ├── Selection.cs │ ├── SelectionColorizer.cs │ ├── SelectionLayer.cs │ ├── SelectionMouseHandler.cs │ ├── SelectionSegment.cs │ ├── SimpleSelection.cs │ ├── TextArea.cs │ ├── TextAreaDefaultInputHandlers.cs │ ├── TextAreaInputHandler.cs │ └── TextSegmentReadOnlySectionProvider.cs ├── Folding │ ├── FoldingElementGenerator.cs │ ├── FoldingManager.cs │ ├── FoldingMargin.cs │ ├── FoldingMarginMarker.cs │ ├── FoldingSection.cs │ ├── NewFolding.cs │ └── XmlFoldingStrategy.cs ├── Highlighting │ ├── DocumentHighlighter.cs │ ├── HighlightedInlineBuilder.cs │ ├── HighlightedLine.cs │ ├── HighlightedSection.cs │ ├── HighlightingBrush.cs │ ├── HighlightingColor.cs │ ├── HighlightingColorizer.cs │ ├── HighlightingDefinitionInvalidException.cs │ ├── HighlightingDefinitionTypeConverter.cs │ ├── HighlightingEngine.cs │ ├── HighlightingManager.cs │ ├── HighlightingRule.cs │ ├── HighlightingRuleSet.cs │ ├── HighlightingSpan.cs │ ├── HtmlClipboard.cs │ ├── HtmlOptions.cs │ ├── HtmlRichTextWriter.cs │ ├── IHighlighter.cs │ ├── IHighlightingDefinition.cs │ ├── IHighlightingDefinitionReferenceResolver.cs │ ├── Resources │ │ ├── ASPX.xshd │ │ ├── Boo.xshd │ │ ├── CPP-Mode.xshd │ │ ├── CSS-Mode.xshd │ │ ├── CSharp-Mode.xshd │ │ ├── Coco-Mode.xshd │ │ ├── HTML-Mode.xshd │ │ ├── Java-Mode.xshd │ │ ├── JavaScript-Mode.xshd │ │ ├── MarkDown-Mode.xshd │ │ ├── ModeV1.xsd │ │ ├── ModeV2.xsd │ │ ├── PHP-Mode.xshd │ │ ├── Patch-Mode.xshd │ │ ├── PowerShell.xshd │ │ ├── Resources.cs │ │ ├── Tex-Mode.xshd │ │ ├── VB-Mode.xshd │ │ ├── XML-Mode.xshd │ │ └── XmlDoc.xshd │ ├── RichText.cs │ ├── RichTextColorizer.cs │ ├── RichTextModel.cs │ ├── RichTextModelWriter.cs │ └── Xshd │ │ ├── HighlightingLoader.cs │ │ ├── IXshdVisitor.cs │ │ ├── SaveXshdVisitor.cs │ │ ├── V1Loader.cs │ │ ├── V2Loader.cs │ │ ├── XmlHighlightingDefinition.cs │ │ ├── XshdColor.cs │ │ ├── XshdElement.cs │ │ ├── XshdImport.cs │ │ ├── XshdKeywords.cs │ │ ├── XshdProperty.cs │ │ ├── XshdReference.cs │ │ ├── XshdRule.cs │ │ ├── XshdRuleSet.cs │ │ ├── XshdSpan.cs │ │ └── XshdSyntaxDefinition.cs ├── ICSharpCode.AvalonEdit.csproj ├── ICSharpCode.AvalonEdit.snk ├── Indentation │ ├── CSharp │ │ ├── CSharpIndentationStrategy.cs │ │ ├── DocumentAccessor.cs │ │ └── IndentationReformatter.cs │ ├── DefaultIndentationStrategy.cs │ └── IIndentationStrategy.cs ├── Properties │ ├── AssemblyInfo.cs │ └── CodeAnalysisDictionary.xml ├── Rendering │ ├── BackgroundGeometryBuilder.cs │ ├── CollapsedLineSection.cs │ ├── ColorizingTransformer.cs │ ├── ColumnRulerRenderer.cs │ ├── CurrentLineHighlightRenderer.cs │ ├── DefaultTextRunTypographyProperties.cs │ ├── DocumentColorizingTransformer.cs │ ├── FormattedTextElement.cs │ ├── GlobalTextRunProperties.cs │ ├── HeightTree.cs │ ├── HeightTreeLineNode.cs │ ├── HeightTreeNode.cs │ ├── IBackgroundRenderer.cs │ ├── ITextRunConstructionContext.cs │ ├── ITextViewConnect.cs │ ├── IVisualLineTransformer.cs │ ├── InlineObjectRun.cs │ ├── Layer.cs │ ├── LayerPosition.cs │ ├── LinkElementGenerator.cs │ ├── MouseHoverLogic.cs │ ├── SimpleTextSource.cs │ ├── SingleCharacterElementGenerator.cs │ ├── TextLayer.cs │ ├── TextView.cs │ ├── TextViewCachedElements.cs │ ├── TextViewWeakEventManager.cs │ ├── VisualLine.cs │ ├── VisualLineConstructionStartEventArgs.cs │ ├── VisualLineElement.cs │ ├── VisualLineElementGenerator.cs │ ├── VisualLineElementTextRunProperties.cs │ ├── VisualLineLinkText.cs │ ├── VisualLineText.cs │ ├── VisualLineTextParagraphProperties.cs │ ├── VisualLineTextSource.cs │ ├── VisualLinesInvalidException.cs │ └── VisualYPosition.cs ├── Search │ ├── DropDownButton.cs │ ├── DropDownButton.xaml │ ├── ISearchStrategy.cs │ ├── Localization.cs │ ├── RegexSearchStrategy.cs │ ├── SearchCommands.cs │ ├── SearchPanel.cs │ ├── SearchPanel.xaml │ ├── SearchResultBackgroundRenderer.cs │ ├── SearchStrategyFactory.cs │ ├── next.png │ └── prev.png ├── Snippets │ ├── IActiveElement.cs │ ├── InsertionContext.cs │ ├── Snippet.cs │ ├── SnippetAnchorElement.cs │ ├── SnippetBoundElement.cs │ ├── SnippetCaretElement.cs │ ├── SnippetContainerElement.cs │ ├── SnippetElement.cs │ ├── SnippetEventArgs.cs │ ├── SnippetInputHandler.cs │ ├── SnippetReplaceableTextElement.cs │ ├── SnippetSelectionElement.cs │ └── SnippetTextElement.cs ├── TextEditor.cs ├── TextEditor.xaml ├── TextEditorAutomationPeer.cs ├── TextEditorComponent.cs ├── TextEditorOptions.cs ├── TextEditorWeakEventManager.cs ├── TextViewPosition.cs ├── Utils │ ├── Boxes.cs │ ├── CallbackOnDispose.cs │ ├── CharRope.cs │ ├── CompressingTreeList.cs │ ├── Constants.cs │ ├── DelayedEvents.cs │ ├── Deque.cs │ ├── DocumentPrinter.cs │ ├── Empty.cs │ ├── ExtensionMethods.cs │ ├── FileReader.cs │ ├── IFreezable.cs │ ├── ImmutableStack.cs │ ├── NullSafeCollection.cs │ ├── ObserveAddRemoveCollection.cs │ ├── PixelSnapHelpers.cs │ ├── PlainRichTextWriter.cs │ ├── PropertyChangedWeakEventManager.cs │ ├── RichTextWriter.cs │ ├── Rope.cs │ ├── RopeNode.cs │ ├── RopeTextReader.cs │ ├── StringSegment.cs │ ├── TextFormatterFactory.cs │ ├── ThrowUtil.cs │ ├── WeakEventManagerBase.cs │ └── Win32.cs └── themes │ ├── RightArrow.cur │ └── generic.xaml ├── JustAssembly.CommandLineTool ├── App.config ├── FilePathValidater.cs ├── JustAssembly.CommandLineTool.csproj ├── Properties │ └── AssemblyInfo.cs └── Startup.cs ├── JustAssembly.Infrastructure ├── Analytics │ ├── AnalyticsServiceImporter.cs │ ├── EmptyAnalyticsMonitorCapabilities.cs │ ├── EmptyAnalyticsMonitorStatus.cs │ ├── EmptyAnalyticsService.cs │ └── EmptyTimingScope.cs ├── JustAssembly.Infrastructure.csproj └── Properties │ └── AssemblyInfo.cs ├── JustAssembly.SelectorControl ├── JustAssembly.SelectorControl.csproj ├── Properties │ └── AssemblyInfo.cs ├── SelectedItemType.cs ├── SelectorControl.cs └── Themes │ └── Generic.xaml └── JustAssembly ├── App.config ├── App.xaml ├── App.xaml.cs ├── Banners ├── Banner.cs ├── BannerGenerator.cs ├── BannerImage.cs └── BannerService.cs ├── CallbackLogger.cs ├── Converters ├── BooleanToVisibilityConverter.cs ├── DifferenceDecorationBackgroundConverter.cs └── ReverseBooleanConverter.cs ├── Dialogs ├── DangerousResource │ ├── AssemblyType.cs │ ├── DangerousResourceDialog.cs │ ├── DangerousResourceDialogResult.cs │ └── DangerousResourceDialogWithAnalyticsTracking.cs ├── ErrorMessageBox.cs ├── ErrorMessageWindow.xaml ├── ErrorMessageWindow.xaml.cs ├── IWindowView.cs ├── NewSessionDialog.xaml ├── NewSessionDialog.xaml.cs ├── ToolWindow.cs └── WindowViewBase.cs ├── DispatcherObjectExt.cs ├── Extensions ├── CodeViewerExtensions.cs ├── CollectionExtensions.cs ├── TabExtensions.cs └── TreeListViewExtensions.cs ├── Images ├── Common │ ├── error_big.png │ ├── error_small.png │ └── open.png ├── DefaultBanner.png ├── JustAssembly.ico └── TreeView │ ├── Entity-Assembly.png │ ├── Entity-Class-Internal.png │ ├── Entity-Class-Private.png │ ├── Entity-Class-Protected.png │ ├── Entity-Class.png │ ├── Entity-Constructor-Internal.png │ ├── Entity-Constructor-Private.png │ ├── Entity-Constructor-Protected.png │ ├── Entity-Constructor.png │ ├── Entity-Enum-Internal.png │ ├── Entity-Enum-Private.png │ ├── Entity-Enum-Protected.png │ ├── Entity-Enum.png │ ├── Entity-Event-Internal.png │ ├── Entity-Event-Private.png │ ├── Entity-Event-Protected.png │ ├── Entity-Event.png │ ├── Entity-Field-Internal.png │ ├── Entity-Field-Private.png │ ├── Entity-Field-Protected.png │ ├── Entity-Field.png │ ├── Entity-Folder.png │ ├── Entity-Interface-Internal.png │ ├── Entity-Interface-Private.png │ ├── Entity-Interface-Protected.png │ ├── Entity-Interface.png │ ├── Entity-Method-Internal.png │ ├── Entity-Method-Private.png │ ├── Entity-Method-Protected.png │ ├── Entity-Method.png │ ├── Entity-Namespace.png │ ├── Entity-Property-Internal.png │ ├── Entity-Property-Private.png │ ├── Entity-Property-Protected.png │ ├── Entity-Property.png │ └── Resources.png ├── ImagesResourceStrings.cs ├── Infrastructure ├── AssemblyDifferences.cs ├── CodeViewer │ ├── ClassificationType.cs │ ├── CodeViewer.cs │ ├── DecompiledSourceCode.cs │ ├── DiffBackgroundRenderer.cs │ ├── DiffLineNumberMargin.cs │ ├── ICodeViewerResults.cs │ └── Position.cs ├── Commands.cs ├── Configuration.cs ├── GeneratedProjectOutputInfo.cs ├── IDecompilationResultsRepository.cs └── SliderCheck.cs ├── Interfaces ├── BrowserTabSourceItemBase.cs ├── DecompilationResultsRepository.cs ├── IComparisonSessionModel.cs ├── IOldToNewTupleMap.cs ├── IProgressNotifier.cs ├── IResourceNode.cs ├── IShellViewModel.cs ├── ITabSourceItem.cs ├── TabKind.cs └── TabSourceItemBase.cs ├── JustAssembly.csproj ├── JustAssemblyBootstrapper.cs ├── MemberMetadata ├── MemberDefinitionMetadataBase.cs ├── MemberMetadata.cs ├── MemberMetadataBase.cs ├── ModuleMetadata.cs └── TypeMetadata.cs ├── MergeUtilities ├── AssemblyHelper.cs ├── ClrAssemblyFileMergeManager.cs ├── ErrorAssemblyReadingEventArgs.cs ├── FolderMergeManager.cs ├── MemberMergeManager.cs ├── MergeManagerBase.cs ├── ModuleManager.cs ├── OldToNewTupleMap.cs ├── ResourceMergeManager.cs └── TypesMergeManager.cs ├── Nodes ├── APIDiff │ ├── APIDiffExtensions.cs │ ├── APIDiffInfo.cs │ └── LoadAPIItemsContext.cs ├── AssemblyNode.cs ├── DefaultResourceNode.cs ├── DifferenceDecoration.cs ├── FileGenerated.cs ├── FilterSettings.cs ├── FolderNode.cs ├── ItemNodeBase.cs ├── MemberNode.cs ├── MemberNodeBase.cs ├── ModuleNode.cs ├── NamespaceNode.cs ├── NodeType.cs ├── ResourceNode.cs ├── TypeNode.cs └── XamlResourceNode.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── TreeListViewRowStyleSelector.cs ├── ViewModels ├── AssembliesComparisonViewModel.cs ├── AssemblyAttributeTabItem.cs ├── AssemblyBrowseTabItem.cs ├── AssemblyDiffTabItem.cs ├── BindingProxy.cs ├── CodeDiffTabItemBase.cs ├── ComparisonSessionViewModelBase.cs ├── FolderBrowseTabItem.cs ├── FolderComparisonViewModel.cs ├── NewSessionTabItemTemplateSelector.cs ├── NewSessionViewModel.cs ├── ShellViewModel.cs ├── TabItemTemplateSelector.cs └── XamlDiffTabItem.cs └── Views ├── Shell.xaml ├── Shell.xaml.cs ├── SideSummary.xaml └── SideSummary.xaml.cs /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "JustDecompileEngine"] 2 | path = JustDecompileEngine 3 | url = https://github.com/telerik/JustDecompileEngine.git 4 | -------------------------------------------------------------------------------- /Binaries/Dragablz.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Binaries/Dragablz.dll -------------------------------------------------------------------------------- /Binaries/Dragablz.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Binaries/Dragablz.pdb -------------------------------------------------------------------------------- /Binaries/ICSharpCode.TreeView.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Binaries/ICSharpCode.TreeView.dll -------------------------------------------------------------------------------- /Binaries/Microsoft.Practices.Prism.MefExtensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Binaries/Microsoft.Practices.Prism.MefExtensions.dll -------------------------------------------------------------------------------- /Binaries/Microsoft.Practices.Prism.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Binaries/Microsoft.Practices.Prism.dll -------------------------------------------------------------------------------- /Binaries/Microsoft.Practices.ServiceLocation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Binaries/Microsoft.Practices.ServiceLocation.dll -------------------------------------------------------------------------------- /Binaries/nunit.core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Binaries/nunit.core.dll -------------------------------------------------------------------------------- /Binaries/nunit.core.interfaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Binaries/nunit.core.interfaces.dll -------------------------------------------------------------------------------- /Binaries/nunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Binaries/nunit.framework.dll -------------------------------------------------------------------------------- /CommonAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | [assembly: AssemblyVersion("0.0.*")] 4 | [assembly: AssemblyFileVersion("0.0.0.1")] 5 | -------------------------------------------------------------------------------- /CompanyAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | [assembly: AssemblyCompany("")] 4 | [assembly: AssemblyCopyright("")] 5 | 6 | [assembly: AssemblyProduct("")] 7 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/APIDiffHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JustAssembly.Core.Comparers; 3 | using JustAssembly.Core.DiffItems; 4 | using Mono.Cecil; 5 | 6 | namespace JustAssembly.Core 7 | { 8 | public class APIDiffHelper 9 | { 10 | public static IMetadataDiffItem GetAPIDifferences(string oldAssemblyPath, string newAssemblyPath) 11 | { 12 | if (oldAssemblyPath == null || newAssemblyPath == null) 13 | { 14 | return null; 15 | } 16 | 17 | AssemblyDefinition oldAssembly = GlobalAssemblyResolver.Instance.GetAssemblyDefinition(oldAssemblyPath); 18 | AssemblyDefinition newAssembly = GlobalAssemblyResolver.Instance.GetAssemblyDefinition(newAssemblyPath); 19 | 20 | if (oldAssembly == null || newAssembly == null) 21 | { 22 | return null; 23 | } 24 | 25 | return GetAPIDifferences(oldAssembly, newAssembly); 26 | } 27 | 28 | internal static IMetadataDiffItem GetAPIDifferences(AssemblyDefinition oldAssembly, AssemblyDefinition newAssembly) 29 | { 30 | return new AssemblyComparer(oldAssembly, newAssembly).Compare(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Comparers/Accessors/AddAccessorComparer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using JustAssembly.Core.DiffItems; 4 | using JustAssembly.Core.DiffItems.Events; 5 | using Mono.Cecil; 6 | 7 | namespace JustAssembly.Core.Comparers.Accessors 8 | { 9 | class AddAccessorComparer : BaseAccessorComparer 10 | { 11 | public AddAccessorComparer(EventDefinition oldEvent, EventDefinition newEvent) 12 | : base(oldEvent, newEvent) 13 | { 14 | } 15 | 16 | protected override MethodDefinition SelectAccessor(EventDefinition element) 17 | { 18 | return element.AddMethod; 19 | } 20 | 21 | protected override IMetadataDiffItem CreateAccessorDiffItem(IEnumerable declarationDiffs) 22 | { 23 | return new AddAccessorDiffItem(this.oldElement, this.newElement, declarationDiffs); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Comparers/Accessors/GetAccessorComparer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using JustAssembly.Core.DiffItems; 4 | using JustAssembly.Core.DiffItems.Properties; 5 | using Mono.Cecil; 6 | 7 | namespace JustAssembly.Core.Comparers.Accessors 8 | { 9 | class GetAccessorComparer : BaseAccessorComparer 10 | { 11 | public GetAccessorComparer(PropertyDefinition oldProperty, PropertyDefinition newProperty) 12 | : base(oldProperty, newProperty) 13 | { 14 | } 15 | 16 | protected override MethodDefinition SelectAccessor(PropertyDefinition element) 17 | { 18 | return element.GetMethod; 19 | } 20 | 21 | protected override IMetadataDiffItem CreateAccessorDiffItem(IEnumerable declarationDiffs) 22 | { 23 | return new GetAccessorDiffItem(this.oldElement, this.newElement, declarationDiffs); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Comparers/Accessors/RemoveAccessorComparer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using JustAssembly.Core.DiffItems.Events; 5 | using Mono.Cecil; 6 | 7 | namespace JustAssembly.Core.Comparers.Accessors 8 | { 9 | class RemoveAccessorComparer : BaseAccessorComparer 10 | { 11 | public RemoveAccessorComparer(EventDefinition oldEvent, EventDefinition newEvent) 12 | : base(oldEvent, newEvent) 13 | { 14 | } 15 | 16 | protected override MethodDefinition SelectAccessor(EventDefinition element) 17 | { 18 | return element.RemoveMethod; 19 | } 20 | 21 | protected override IMetadataDiffItem CreateAccessorDiffItem(IEnumerable declarationDiffs) 22 | { 23 | return new RemoveAccessorDiffItem(this.oldElement, this.newElement, declarationDiffs); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Comparers/Accessors/SetAccessorComparer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using JustAssembly.Core.DiffItems; 5 | using JustAssembly.Core.DiffItems.Properties; 6 | using Mono.Cecil; 7 | 8 | namespace JustAssembly.Core.Comparers.Accessors 9 | { 10 | class SetAccessorComparer : BaseAccessorComparer 11 | { 12 | public SetAccessorComparer(PropertyDefinition oldProperty, PropertyDefinition newProperty) 13 | : base(oldProperty, newProperty) 14 | { 15 | } 16 | 17 | protected override MethodDefinition SelectAccessor(PropertyDefinition element) 18 | { 19 | return element.SetMethod; 20 | } 21 | 22 | protected override IMetadataDiffItem CreateAccessorDiffItem(IEnumerable declarationDiffs) 23 | { 24 | return new SetAccessorDiffItem(this.oldElement, this.newElement, declarationDiffs); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Comparers/AssemblyComparer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using JustAssembly.Core.DiffItems; 5 | using Mono.Cecil; 6 | using JustAssembly.Core.Extensions; 7 | using JustAssembly.Core.DiffItems.Assemblies; 8 | 9 | namespace JustAssembly.Core.Comparers 10 | { 11 | class AssemblyComparer 12 | { 13 | private readonly AssemblyDefinition oldAssembly; 14 | private readonly AssemblyDefinition newAssembly; 15 | 16 | public AssemblyComparer(AssemblyDefinition oldAssembly, AssemblyDefinition newAssembly) 17 | { 18 | this.oldAssembly = oldAssembly; 19 | this.newAssembly = newAssembly; 20 | } 21 | 22 | public IMetadataDiffItem Compare() 23 | { 24 | IEnumerable declarationDiffs = new CustomAttributeComparer().GetMultipleDifferences(oldAssembly.CustomAttributes, newAssembly.CustomAttributes); 25 | IEnumerable childrenDiffs = new ModuleComparer().GetMultipleDifferences(oldAssembly.Modules, newAssembly.Modules); 26 | 27 | if (declarationDiffs.IsEmpty() && childrenDiffs.IsEmpty()) 28 | { 29 | return null; 30 | } 31 | return new AssemblyDiffItem(oldAssembly, newAssembly, declarationDiffs, childrenDiffs.Cast>()); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Comparers/CustomAttributeComparer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JustAssembly.Core.DiffItems; 3 | using JustAssembly.Core.DiffItems.Attributes; 4 | using JustAssembly.Core.Extensions; 5 | using Mono.Cecil; 6 | 7 | namespace JustAssembly.Core.Comparers 8 | { 9 | class CustomAttributeComparer : BaseDiffComparer 10 | { 11 | protected override IDiffItem GetMissingDiffItem(CustomAttribute element) 12 | { 13 | return new CustomAttributeDiffItem(element, null); 14 | } 15 | 16 | protected override IDiffItem GenerateDiffItem(CustomAttribute oldElement, CustomAttribute newElement) 17 | { 18 | return null; 19 | } 20 | 21 | protected override IDiffItem GetNewDiffItem(CustomAttribute element) 22 | { 23 | return new CustomAttributeDiffItem(null, element); 24 | } 25 | 26 | protected override int CompareElements(CustomAttribute x, CustomAttribute y) 27 | { 28 | return x.Constructor.GetSignature().CompareTo(y.Constructor.GetSignature()); 29 | } 30 | 31 | protected override bool IsAPIElement(CustomAttribute element) 32 | { 33 | return true; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Comparers/ReferenceComparer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using JustAssembly.Core.DiffItems; 7 | using JustAssembly.Core.DiffItems.References; 8 | using Mono.Cecil; 9 | 10 | namespace JustAssembly.Core.Comparers 11 | { 12 | class ReferenceComparer : BaseDiffComparer 13 | { 14 | protected override IDiffItem GetMissingDiffItem(AssemblyNameReference element) 15 | { 16 | return new AssemblyReferenceDiffItem(element, null, null); 17 | } 18 | 19 | protected override IDiffItem GenerateDiffItem(AssemblyNameReference oldElement, AssemblyNameReference newElement) 20 | { 21 | return null; 22 | } 23 | 24 | protected override IDiffItem GetNewDiffItem(AssemblyNameReference element) 25 | { 26 | return null; 27 | } 28 | 29 | protected override int CompareElements(AssemblyNameReference x, AssemblyNameReference y) 30 | { 31 | return x.FullName.CompareTo(y.FullName); 32 | } 33 | 34 | protected override bool IsAPIElement(AssemblyNameReference element) 35 | { 36 | return true; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Assemblies/AssemblyDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Mono.Cecil; 5 | 6 | namespace JustAssembly.Core.DiffItems.Assemblies 7 | { 8 | class AssemblyDiffItem : BaseDiffItem 9 | { 10 | public AssemblyDiffItem(AssemblyDefinition oldAssembly, AssemblyDefinition newAssembly, 11 | IEnumerable declarationDiffs, IEnumerable> childrenDiffs) 12 | : base(oldAssembly, newAssembly, declarationDiffs, childrenDiffs) 13 | { 14 | } 15 | 16 | public override MetadataType MetadataType 17 | { 18 | get { return MetadataType.Assembly; } 19 | } 20 | 21 | protected override string GetElementShortName(AssemblyDefinition element) 22 | { 23 | return element.FullName; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Attributes/CustomAttributeDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mono.Cecil; 3 | using JustAssembly.Core.Extensions; 4 | 5 | namespace JustAssembly.Core.DiffItems.Attributes 6 | { 7 | class CustomAttributeDiffItem : BaseDiffItem 8 | { 9 | private readonly CustomAttribute attribute; 10 | 11 | public CustomAttributeDiffItem(CustomAttribute oldAttribute, CustomAttribute newAttribute) 12 | : base(oldAttribute == null ? DiffType.New : DiffType.Deleted) 13 | { 14 | if (oldAttribute != null && newAttribute != null) 15 | { 16 | throw new InvalidOperationException(); 17 | } 18 | 19 | this.attribute = oldAttribute ?? newAttribute; 20 | } 21 | 22 | protected override string GetXmlInfoString() 23 | { 24 | throw new NotSupportedException(); 25 | } 26 | 27 | internal override void ToXml(System.Xml.XmlWriter writer) 28 | { 29 | writer.WriteStartElement("CustomAttribute"); 30 | writer.WriteAttributeString("Name", attribute.Constructor.GetSignature()); 31 | writer.WriteAttributeString("DiffType", this.DiffType.ToString()); 32 | writer.WriteEndElement(); 33 | } 34 | 35 | public override bool IsBreakingChange 36 | { 37 | get { return this.DiffType == Core.DiffType.Deleted; } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/BaseMemberDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using JustAssembly.Core.Extensions; 4 | using Mono.Cecil; 5 | 6 | namespace JustAssembly.Core.DiffItems 7 | { 8 | abstract class BaseMemberDiffItem : BaseDiffItem where T: class, IMemberDefinition 9 | { 10 | public BaseMemberDiffItem(T oldMember, T newMember, IEnumerable declarationDiffs, IEnumerable childrenDiffs) 11 | : base(oldMember, newMember, declarationDiffs, childrenDiffs) 12 | { 13 | } 14 | 15 | protected override string GetElementShortName(T element) 16 | { 17 | string type; 18 | string name; 19 | element.GetMemberTypeAndName(out type, out name); 20 | return name; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Common/MemberTypeDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mono.Cecil; 3 | using JustAssembly.Core.Extensions; 4 | 5 | namespace JustAssembly.Core.DiffItems.Common 6 | { 7 | class MemberTypeDiffItem : BaseDiffItem 8 | { 9 | private readonly IMemberDefinition oldMember; 10 | private readonly IMemberDefinition newMember; 11 | 12 | public MemberTypeDiffItem(IMemberDefinition oldMember, IMemberDefinition newMember) 13 | :base(DiffType.Modified) 14 | { 15 | this.oldMember = oldMember; 16 | this.newMember = newMember; 17 | } 18 | 19 | protected override string GetXmlInfoString() 20 | { 21 | string name; 22 | 23 | string oldType; 24 | this.oldMember.GetMemberTypeAndName(out oldType, out name); 25 | 26 | string newType; 27 | this.newMember.GetMemberTypeAndName(out newType, out name); 28 | 29 | return string.Format("Member type changed from {0} to {1}.", oldType, newType); 30 | } 31 | 32 | public override bool IsBreakingChange 33 | { 34 | get { return true; } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Common/StaticFlagChangedDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace JustAssembly.Core.DiffItems.Common 5 | { 6 | class StaticFlagChangedDiffItem : BaseDiffItem 7 | { 8 | private readonly bool isNewMemberStatic; 9 | 10 | public StaticFlagChangedDiffItem(bool isNewMemberStatic) 11 | :base(DiffType.Modified) 12 | { 13 | this.isNewMemberStatic = isNewMemberStatic; 14 | } 15 | 16 | protected override string GetXmlInfoString() 17 | { 18 | return string.Format("Member changed to {0}.", isNewMemberStatic ? "static" : "instance"); 19 | } 20 | 21 | public override bool IsBreakingChange 22 | { 23 | get { return true; } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Common/VisibilityChangedDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace JustAssembly.Core.DiffItems.Common 6 | { 7 | class VisibilityChangedDiffItem : BaseDiffItem 8 | { 9 | private readonly bool reduced; 10 | 11 | public VisibilityChangedDiffItem(bool reduced) 12 | :base(DiffType.Modified) 13 | { 14 | this.reduced = reduced; 15 | } 16 | 17 | protected override string GetXmlInfoString() 18 | { 19 | return string.Format("Member is {0} visible.", this.reduced ? "less" : "more"); 20 | } 21 | 22 | public override bool IsBreakingChange 23 | { 24 | get { return this.reduced; } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Events/AddAccessorDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Mono.Cecil; 4 | 5 | namespace JustAssembly.Core.DiffItems.Events 6 | { 7 | class AddAccessorDiffItem : BaseMemberDiffItem 8 | { 9 | public AddAccessorDiffItem(EventDefinition oldEvent, EventDefinition newEvent, IEnumerable declarationDiffs) 10 | : base(oldEvent.AddMethod, newEvent.AddMethod, declarationDiffs, null) 11 | { 12 | } 13 | 14 | public override MetadataType MetadataType 15 | { 16 | get { return Core.MetadataType.Method; } 17 | } 18 | 19 | protected override string GetElementShortName(MethodDefinition element) 20 | { 21 | return "add"; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Events/EventDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Mono.Cecil; 4 | 5 | namespace JustAssembly.Core.DiffItems.Events 6 | { 7 | class EventDiffItem : BaseMemberDiffItem 8 | { 9 | public EventDiffItem(EventDefinition oldEvent, EventDefinition newEvent, IEnumerable declarationDiffs, IEnumerable childrenDiffs) 10 | :base(oldEvent, newEvent, declarationDiffs, childrenDiffs) 11 | { 12 | } 13 | 14 | public override MetadataType MetadataType 15 | { 16 | get { return Core.MetadataType.Event; } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Events/RemoveAccessorDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Mono.Cecil; 4 | 5 | namespace JustAssembly.Core.DiffItems.Events 6 | { 7 | class RemoveAccessorDiffItem : BaseMemberDiffItem 8 | { 9 | public RemoveAccessorDiffItem(EventDefinition oldEvent, EventDefinition newEvent, IEnumerable declarationDiffs) 10 | : base(oldEvent.RemoveMethod, newEvent.RemoveMethod, declarationDiffs, null) 11 | { 12 | } 13 | 14 | public override MetadataType MetadataType 15 | { 16 | get { return Core.MetadataType.Method; } 17 | } 18 | 19 | protected override string GetElementShortName(MethodDefinition element) 20 | { 21 | return "remove"; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Fields/FieldDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Mono.Cecil; 5 | 6 | namespace JustAssembly.Core.DiffItems.Fields 7 | { 8 | class FieldDiffItem : BaseMemberDiffItem 9 | { 10 | public FieldDiffItem(FieldDefinition oldField, FieldDefinition newField, IEnumerable declarationDiffs) 11 | : base(oldField, newField, declarationDiffs, null) 12 | { 13 | } 14 | 15 | public override MetadataType MetadataType 16 | { 17 | get { return Core.MetadataType.Field; } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Methods/MethodDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Mono.Cecil; 4 | 5 | namespace JustAssembly.Core.DiffItems.Methods 6 | { 7 | class MethodDiffItem : BaseMemberDiffItem 8 | { 9 | public MethodDiffItem(MethodDefinition oldMethod, MethodDefinition newMethod, IEnumerable declarationDiffs) 10 | : base(oldMethod, newMethod, declarationDiffs, null) 11 | { 12 | } 13 | 14 | public override MetadataType MetadataType 15 | { 16 | get { return Core.MetadataType.Method; } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Methods/ParameterDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Mono.Cecil; 7 | 8 | namespace JustAssembly.Core.DiffItems.Methods 9 | { 10 | class ParameterDiffItem : BaseDiffItem 11 | { 12 | private readonly ParameterDefinition oldParameter; 13 | private readonly ParameterDefinition newParameter; 14 | 15 | public ParameterDiffItem(ParameterDefinition oldParameter, ParameterDefinition newParameter) 16 | : base(DiffType.Modified) 17 | { 18 | this.oldParameter = oldParameter; 19 | this.newParameter = newParameter; 20 | } 21 | 22 | protected override string GetXmlInfoString() 23 | { 24 | return string.Format("Parameter name changed from {0} to {1}.", this.oldParameter.Name, this.newParameter.Name); 25 | } 26 | 27 | public override bool IsBreakingChange 28 | { 29 | get { return true; } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Methods/VirtualFlagChangedDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JustAssembly.Core.DiffItems.Methods 4 | { 5 | class VirtualFlagChangedDiffItem : BaseDiffItem 6 | { 7 | private readonly bool isNewMethodVirtual; 8 | 9 | public VirtualFlagChangedDiffItem(bool isNewMethodVirtual) 10 | :base(DiffType.Modified) 11 | { 12 | this.isNewMethodVirtual = isNewMethodVirtual; 13 | } 14 | 15 | protected override string GetXmlInfoString() 16 | { 17 | return string.Format("Method changed to {0}virtual.", this.isNewMethodVirtual ? string.Empty : "non-"); 18 | } 19 | 20 | public override bool IsBreakingChange 21 | { 22 | get { return !this.isNewMethodVirtual; } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Modules/ModuleDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Mono.Cecil; 4 | using System.Linq; 5 | 6 | namespace JustAssembly.Core.DiffItems.Modules 7 | { 8 | class ModuleDiffItem : BaseDiffItem 9 | { 10 | public ModuleDiffItem(ModuleDefinition oldModule, ModuleDefinition newModule, IEnumerable declarationDiffs, IEnumerable> diffChildren) 11 | : base(oldModule, newModule, declarationDiffs, diffChildren) 12 | { 13 | } 14 | 15 | public override MetadataType MetadataType 16 | { 17 | get { return Core.MetadataType.Module; } 18 | } 19 | 20 | protected override string GetElementShortName(ModuleDefinition element) 21 | { 22 | return element.Name; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Properties/GetAccessorDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Mono.Cecil; 4 | 5 | namespace JustAssembly.Core.DiffItems.Properties 6 | { 7 | class GetAccessorDiffItem : BaseDiffItem 8 | { 9 | public GetAccessorDiffItem(PropertyDefinition oldProperty, PropertyDefinition newProperty, IEnumerable declarationDiffs) 10 | : base(oldProperty.GetMethod, newProperty.GetMethod, declarationDiffs, null) 11 | { 12 | } 13 | 14 | public override MetadataType MetadataType 15 | { 16 | get { return Core.MetadataType.Method; } 17 | } 18 | 19 | protected override string GetElementShortName(MethodDefinition element) 20 | { 21 | return "get"; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Properties/PropertyDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Mono.Cecil; 4 | 5 | namespace JustAssembly.Core.DiffItems.Properties 6 | { 7 | class PropertyDiffItem : BaseMemberDiffItem 8 | { 9 | public PropertyDiffItem(PropertyDefinition oldProperty, PropertyDefinition newProperty, IEnumerable declarationDiffs, IEnumerable childrenDiffs) 10 | : base(oldProperty, newProperty, declarationDiffs, childrenDiffs) 11 | { 12 | } 13 | 14 | public override MetadataType MetadataType 15 | { 16 | get { return Core.MetadataType.Property; } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Properties/SetAccessorDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Mono.Cecil; 4 | 5 | namespace JustAssembly.Core.DiffItems.Properties 6 | { 7 | class SetAccessorDiffItem : BaseDiffItem 8 | { 9 | public SetAccessorDiffItem(PropertyDefinition oldProperty, PropertyDefinition newProperty, IEnumerable declarationDiffs) 10 | : base(oldProperty.SetMethod, newProperty.SetMethod, declarationDiffs, null) 11 | { 12 | } 13 | 14 | public override MetadataType MetadataType 15 | { 16 | get { return Core.MetadataType.Method; } 17 | } 18 | 19 | protected override string GetElementShortName(MethodDefinition element) 20 | { 21 | return "set"; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/References/AssemblyReferenceDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Mono.Cecil; 4 | 5 | namespace JustAssembly.Core.DiffItems.References 6 | { 7 | class AssemblyReferenceDiffItem : BaseDiffItem 8 | { 9 | public AssemblyReferenceDiffItem(AssemblyNameReference oldReference, AssemblyNameReference newReference, IEnumerable declarationDiffs) 10 | : base(oldReference, newReference, declarationDiffs, null) 11 | { 12 | } 13 | 14 | public override MetadataType MetadataType 15 | { 16 | get { return Core.MetadataType.AssemblyReference; } 17 | } 18 | 19 | protected override string GetElementShortName(AssemblyNameReference element) 20 | { 21 | return element.FullName; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffItems/Types/TypeDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using JustDecompile.External.JustAssembly; 5 | using Mono.Cecil; 6 | 7 | namespace JustAssembly.Core.DiffItems.Types 8 | { 9 | class TypeDiffItem : BaseDiffItem 10 | { 11 | public TypeDiffItem(TypeDefinition oldType, TypeDefinition newType, IEnumerable declarationDiffs, IEnumerable childrenDiffs) 12 | : base(oldType, newType, declarationDiffs, childrenDiffs) 13 | { 14 | } 15 | 16 | public override MetadataType MetadataType 17 | { 18 | get { return Core.MetadataType.Type; } 19 | } 20 | 21 | protected override string GetElementShortName(TypeDefinition typeDef) 22 | { 23 | return typeDef.Namespace + "." + Decompiler.GetTypeName(typeDef.Module.FilePath, typeDef.Module.MetadataToken.ToUInt32(), typeDef.MetadataToken.ToUInt32(), SupportedLanguage.CSharp); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/DiffType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JustAssembly.Core 4 | { 5 | public enum DiffType : byte 6 | { 7 | Deleted, 8 | Modified, 9 | New 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Extensions/EnumerableExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | namespace JustAssembly.Core.Extensions 6 | { 7 | static class EnumerableExtensions 8 | { 9 | public static bool IsEmpty(this IEnumerable self) 10 | { 11 | if (self == null) 12 | { 13 | throw new NullReferenceException(); 14 | } 15 | 16 | ICollection collection = self as ICollection; 17 | return collection != null ? collection.Count == 0 : !self.GetEnumerator().MoveNext(); 18 | } 19 | 20 | public static IEnumerable ConcatAll(params IEnumerable[] enumerables) 21 | { 22 | foreach (IEnumerable enumerable in enumerables) 23 | { 24 | foreach (T item in enumerable) 25 | { 26 | yield return item; 27 | } 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Extensions/MemberDefinitionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using JustDecompile.External.JustAssembly; 4 | using Mono.Cecil; 5 | 6 | namespace JustAssembly.Core.Extensions 7 | { 8 | static class MemberDefinitionExtensions 9 | { 10 | private const string Separator = " : "; 11 | 12 | public static void GetMemberTypeAndName(this IMemberDefinition self, out string type, out string name) 13 | { 14 | TypeDefinition declaringType = self.DeclaringType; 15 | ModuleDefinition module = declaringType.Module; 16 | string assemblyFilePath = module.Assembly.MainModule.FilePath; 17 | string nameWithType = 18 | Decompiler.GetMemberName(assemblyFilePath, module.MetadataToken.ToUInt32(), declaringType.MetadataToken.ToUInt32(), self.MetadataToken.ToUInt32(), SupportedLanguage.CSharp); 19 | 20 | int index = nameWithType.IndexOf(Separator); 21 | if (index == -1) 22 | { 23 | // The member is constructor, hense it has no type. 24 | name = nameWithType; 25 | type = null; 26 | } 27 | else 28 | { 29 | name = nameWithType.Substring(0, index); 30 | type = nameWithType.Substring(index + Separator.Length); 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Extensions/MethodReferenceExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mono.Cecil; 3 | 4 | namespace JustAssembly.Core.Extensions 5 | { 6 | static class MethodReferenceExtensions 7 | { 8 | public static string GetSignature(this MethodReference self) 9 | { 10 | string fullName = self.FullName; 11 | string returnTypeString = self.FixedReturnType.FullName; 12 | if (!fullName.StartsWith(returnTypeString)) 13 | { 14 | throw new InvalidOperationException(); 15 | } 16 | return fullName.Substring(returnTypeString.Length + 1); 17 | } 18 | 19 | public static string GetShortSignature(this MethodReference self) 20 | { 21 | string fullName = self.FullName; 22 | int index = fullName.IndexOf("::"); 23 | if (index < 0) 24 | { 25 | throw new InvalidOperationException(); 26 | } 27 | return fullName.Substring(index + 2); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Extensions/VisibilityDefinitionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mono.Cecil; 3 | 4 | namespace JustAssembly.Core.Extensions 5 | { 6 | static class VisibilityDefinitionExtensions 7 | { 8 | public static bool IsAPIDefinition(this IVisibilityDefinition self) 9 | { 10 | return self.IsPublic || self.IsFamilyOrAssembly || self.IsFamily; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/IDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JustAssembly.Core 4 | { 5 | public interface IDiffItem 6 | { 7 | DiffType DiffType { get; } 8 | 9 | string ToXml(); 10 | 11 | bool IsBreakingChange { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/IMetadataDiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Mono.Cecil; 4 | 5 | namespace JustAssembly.Core 6 | { 7 | public interface IMetadataDiffItem : IDiffItem 8 | { 9 | IEnumerable DeclarationDiffs { get; } 10 | IEnumerable ChildrenDiffs { get; } 11 | 12 | MetadataType MetadataType { get; } 13 | 14 | uint OldTokenID { get; } 15 | uint NewTokenID { get; } 16 | } 17 | 18 | public interface IMetadataDiffItem : IMetadataDiffItem where T : class, IMetadataTokenProvider 19 | { 20 | T OldElement { get; } 21 | T NewElement { get; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/MetadataType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JustAssembly.Core 4 | { 5 | public enum MetadataType : byte 6 | { 7 | Assembly, 8 | Module, 9 | Type, 10 | Field, 11 | Method, 12 | Property, 13 | Event, 14 | AssemblyReference 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Core/JustAssembly.Core/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("JustAssembly.Core")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | // Setting ComVisible to false makes the types in this assembly not visible 15 | // to COM components. If you need to access a type in this assembly from 16 | // COM, set the ComVisible attribute to true on that type. 17 | [assembly: ComVisible(false)] 18 | 19 | // The following GUID is for the ID of the typelib if this project is exposed to COM 20 | [assembly: Guid("f9743fd7-45fd-4995-9201-05f8f7fbe07e")] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | -------------------------------------------------------------------------------- /Core/JustAssembly.DiffAlgorithm/Algorithm/DiffFileExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using JustAssembly.DiffAlgorithm.Models; 7 | 8 | namespace JustAssembly.DiffAlgorithm.Algorithm 9 | { 10 | internal static class DiffFileExtentions 11 | { 12 | public static void AddDiffBlock(this DiffFile file, DiffInfo textInfo, DiffBlockType diffBlockType) 13 | { 14 | file.AppendDiffBlock(textInfo.BlockPosition, textInfo.TextOffset, 15 | diffBlockType); 16 | textInfo.BlockPosition++; 17 | } 18 | 19 | public static void AddImaginaryBlock(this DiffFile file, DiffInfo textInfo) 20 | { 21 | file.AppendDiffBlock(textInfo.BlockPosition, textInfo.TextOffset, 22 | DiffBlockType.Imaginary); 23 | textInfo.BlockPosition++; 24 | textInfo.TextOffset++; 25 | } 26 | 27 | public static void AddUnchangedBlocks(this DiffFile diffFile, DiffInfo textInfo) 28 | { 29 | while (textInfo.BlockPosition - textInfo.TextOffset < textInfo.HighBound) 30 | { 31 | diffFile.AppendDiffBlock(textInfo.BlockPosition, 32 | textInfo.TextOffset, 33 | DiffBlockType.Unchanged); 34 | textInfo.BlockPosition++; 35 | } 36 | } 37 | 38 | public static void AppendDiffBlock(this DiffFile diffFile, int blockPosition, int offset, 39 | DiffBlockType type) 40 | { 41 | var diffBlock = diffFile.Blocks.LastOrDefault(); 42 | 43 | if (diffBlock != null && diffBlock.Type == type && 44 | diffBlock.EndPosition + 1 == blockPosition) 45 | { 46 | diffBlock.EndPosition++; 47 | return; 48 | } 49 | 50 | diffBlock = new DiffBlock(offset, blockPosition, blockPosition, type); 51 | diffFile.Blocks.Add(diffBlock); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Core/JustAssembly.DiffAlgorithm/Algorithm/DiffInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace JustAssembly.DiffAlgorithm.Algorithm 8 | { 9 | internal class DiffInfo 10 | { 11 | public int BlockPosition { get; set; } 12 | public int HighBound { get; set; } 13 | public int TextOffset { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Core/JustAssembly.DiffAlgorithm/Algorithm/DiffItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JustAssembly.DiffAlgorithm.Algorithm 4 | { 5 | public struct DiffItem 6 | { 7 | /// Number of changes in Data A. 8 | public int DeletedA { get; set; } 9 | /// Number of changes in Data A. 10 | public int InsertedB { get; set; } 11 | /// Start Line number in Data A. 12 | public int StartA { get; set; } 13 | /// Start Line number in Data B. 14 | public int StartB { get; set; } 15 | public override string ToString() 16 | { 17 | return string.Format("StartA: {0} DeletedA: {1} StartB: {2} InsertedB: {3}", StartA, DeletedA, StartB, InsertedB); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Core/JustAssembly.DiffAlgorithm/Algorithm/IDiffAlgorithm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace JustAssembly.DiffAlgorithm.Algorithm 5 | { 6 | public interface IDiffAlgorithm 7 | { 8 | IList DiffText(IList textA, IList textB); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Core/JustAssembly.DiffAlgorithm/Algorithm/MyersDiffItemExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace JustAssembly.DiffAlgorithm.Algorithm 8 | { 9 | internal static class MyersDiffItemExtentions 10 | { 11 | public static void ProcessBlocks(this DiffItem diffItem, 12 | Action addModifiedBlock, 13 | Action addDeletedBlockWithImagineryPart, 14 | Action addInsertedBlockWithImagineryPart) 15 | { 16 | int i = 0; 17 | 18 | while (i < Math.Min(diffItem.DeletedA, diffItem.InsertedB)) 19 | { 20 | addModifiedBlock(); 21 | i++; 22 | } 23 | 24 | if (diffItem.DeletedA > diffItem.InsertedB) 25 | { 26 | while (i < diffItem.DeletedA) 27 | { 28 | addDeletedBlockWithImagineryPart(); 29 | i++; 30 | } 31 | } 32 | else 33 | { 34 | while (i < diffItem.InsertedB) 35 | { 36 | addInsertedBlockWithImagineryPart(); 37 | i++; 38 | } 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Core/JustAssembly.DiffAlgorithm/DiffHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using JustAssembly.DiffAlgorithm.Algorithm; 5 | using JustAssembly.DiffAlgorithm.Models; 6 | 7 | namespace JustAssembly.DiffAlgorithm 8 | { 9 | public static class DiffHelper 10 | { 11 | private static readonly string[] lineSeparators = new string[] { "\r\n", "\n", "\r" }; 12 | 13 | public static DiffResult[] Diff(IEnumerable firstContents, IEnumerable secondContents) 14 | { 15 | return firstContents.Zip(secondContents, (firstContent, secondContent) => Diff(firstContent, secondContent)).ToArray(); 16 | } 17 | 18 | public static DiffResult Diff(string firstFile, string secondFile) 19 | { 20 | return new DiffText( 21 | SplitLines(firstFile), 22 | SplitLines(secondFile), 23 | MyersDiff.Instance).GetChanges(); 24 | } 25 | 26 | public static string[] SplitLines(string fileContent) 27 | { 28 | if (fileContent == null) 29 | { 30 | return new string[0]; 31 | } 32 | 33 | return fileContent.Split(lineSeparators, StringSplitOptions.None); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Core/JustAssembly.DiffAlgorithm/Models/DiffBlock.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.DiffAlgorithm.Models 2 | { 3 | public class DiffBlock 4 | { 5 | public int EndPosition { get; set; } 6 | public int Offset { get; set; } 7 | public int StartPosition { get; set; } 8 | public DiffBlockType Type { get; set; } 9 | public DiffBlock() 10 | { 11 | } 12 | 13 | public DiffBlock(int offset, int startPosition, int endPosition) 14 | : this(offset, startPosition, endPosition, DiffBlockType.Imaginary) 15 | { 16 | } 17 | 18 | public DiffBlock(int offset, int startPosition, int endPosition, DiffBlockType type) 19 | { 20 | this.Offset = offset; 21 | this.StartPosition = startPosition; 22 | this.EndPosition = endPosition; 23 | this.Type = type; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Core/JustAssembly.DiffAlgorithm/Models/DiffBlockType.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.DiffAlgorithm.Models 2 | { 3 | public enum DiffBlockType 4 | { 5 | Unchanged, 6 | Inserted, 7 | Modified, 8 | Deleted, 9 | Imaginary 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Core/JustAssembly.DiffAlgorithm/Models/DiffFile.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace JustAssembly.DiffAlgorithm.Models 4 | { 5 | public class DiffFile 6 | { 7 | public IList Blocks { get; set; } 8 | public IList Lines { get; set; } 9 | public DiffFile() 10 | : this(new List(), new List()) 11 | { 12 | } 13 | 14 | public DiffFile(IList lines, IList blocks) 15 | { 16 | this.Lines = lines; 17 | this.Blocks = blocks; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Core/JustAssembly.DiffAlgorithm/Models/DiffResult.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.DiffAlgorithm.Models 2 | { 3 | public class DiffResult 4 | { 5 | public DiffFile File { get; set; } 6 | public DiffFile ModifiedFile { get; set; } 7 | public DiffResult() 8 | { 9 | } 10 | 11 | public DiffResult(DiffFile oldFile, DiffFile modifiedFile) 12 | { 13 | this.File = oldFile; 14 | this.ModifiedFile = modifiedFile; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Core/JustAssembly.DiffAlgorithm/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("JustAssembly.DiffAlgorithm")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | // Setting ComVisible to false makes the types in this assembly not visible 15 | // to COM components. If you need to access a type in this assembly from 16 | // COM, set the ComVisible attribute to true on that type. 17 | [assembly: ComVisible(false)] 18 | 19 | // The following GUID is for the ID of the typelib if this project is exposed to COM 20 | [assembly: Guid("9e0ca814-6f12-490a-a86a-97b37f125385")] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | -------------------------------------------------------------------------------- /Tests/JustAssembly.Tests/APIDiff/BaseExistingAPIDiffTestFixture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using JustAssembly.Core; 4 | using NUnit.Framework; 5 | 6 | namespace AssemblyDiffTests.APIDiff 7 | { 8 | abstract class BaseExistingAPIDiffTestFixture 9 | { 10 | protected string AssembliesDirectory 11 | { 12 | get 13 | { 14 | return @"..\..\Assemblies\APIDiff"; 15 | } 16 | } 17 | 18 | protected void RunTestCase(string testName) 19 | { 20 | string extendedPath = Path.Combine(AssembliesDirectory, testName, testName); 21 | string oldFile = extendedPath + ".old.dll"; 22 | string newFile = extendedPath + ".dll"; 23 | string expectedResultFile = extendedPath + ".xml"; 24 | 25 | string expected = GetExpectedResult(expectedResultFile); 26 | string result = GetAPIDiffResult(oldFile, newFile); 27 | 28 | Assert.AreEqual(expected, result); 29 | } 30 | 31 | private string GetExpectedResult(string expectedResultFile) 32 | { 33 | using (StreamReader sr = new StreamReader(expectedResultFile)) 34 | { 35 | return sr.ReadToEnd(); 36 | } 37 | } 38 | 39 | private string GetAPIDiffResult(string oldFile, string newFile) 40 | { 41 | IDiffItem diffItem = APIDiffHelper.GetAPIDifferences(oldFile, newFile); 42 | return diffItem == null ? string.Empty : diffItem.ToXml(); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Tests/JustAssembly.Tests/APIDiff/ExistingAPIDiffTestFixture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NUnit.Framework; 3 | 4 | namespace AssemblyDiffTests.APIDiff 5 | { 6 | [TestFixture] 7 | class ExistingAPIDiffTestFixture : BaseExistingAPIDiffTestFixture 8 | { 9 | [TestCase] 10 | public void SimpleAPIDiffTest() 11 | { 12 | RunTestCase("SimpleAPIDIffTest"); 13 | } 14 | 15 | [TestCase] 16 | public void VariousAPIDiffsTest() 17 | { 18 | RunTestCase("VariousAPIDiffsTest"); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Tests/JustAssembly.Tests/Assemblies/APIDiff/SimpleAPIDiffTest/SimpleAPIDiffTest.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Tests/JustAssembly.Tests/Assemblies/APIDiff/SimpleAPIDiffTest/SimpleAPIDiffTest.dll -------------------------------------------------------------------------------- /Tests/JustAssembly.Tests/Assemblies/APIDiff/SimpleAPIDiffTest/SimpleAPIDiffTest.old.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Tests/JustAssembly.Tests/Assemblies/APIDiff/SimpleAPIDiffTest/SimpleAPIDiffTest.old.dll -------------------------------------------------------------------------------- /Tests/JustAssembly.Tests/Assemblies/APIDiff/SimpleAPIDiffTest/SimpleAPIDiffTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Member is less visible. 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Tests/JustAssembly.Tests/Assemblies/APIDiff/VariousAPIDiffsTest/VariousAPIDiffsTest.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Tests/JustAssembly.Tests/Assemblies/APIDiff/VariousAPIDiffsTest/VariousAPIDiffsTest.dll -------------------------------------------------------------------------------- /Tests/JustAssembly.Tests/Assemblies/APIDiff/VariousAPIDiffsTest/VariousAPIDiffsTest.old.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/Tests/JustAssembly.Tests/Assemblies/APIDiff/VariousAPIDiffsTest/VariousAPIDiffsTest.old.dll -------------------------------------------------------------------------------- /Tests/JustAssembly.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("JustAssembly.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | // Setting ComVisible to false makes the types in this assembly not visible 15 | // to COM components. If you need to access a type in this assembly from 16 | // COM, set the ComVisible attribute to true on that type. 17 | [assembly: ComVisible(false)] 18 | 19 | // The following GUID is for the ID of the typelib if this project is exposed to COM 20 | [assembly: Guid("d1492255-ac11-4aa1-9048-1f629772b595")] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | -------------------------------------------------------------------------------- /Tests/JustAssembly.Tests/SimpleTestClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using Mono.Cecil; 4 | using NUnit.Framework; 5 | 6 | namespace JustAssembly.Tests 7 | { 8 | [TestFixture] 9 | public class SimpleTestClass 10 | { 11 | [TestCase] 12 | public void SimpleMonoCecilTest() 13 | { 14 | AssemblyDefinition thisAssembly = AssemblyDefinition.ReadAssembly("JustAssembly.Tests.dll", new ReaderParameters(GlobalAssemblyResolver.Instance)); 15 | Assert.IsTrue(thisAssembly.MainModule.Types.Any(type => type.Name == "SimpleTestClass")); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Tools/JustAssembly.API/Analytics/ConnectivityStatus.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.API.Analytics 2 | { 3 | public enum ConnectivityStatus 4 | { 5 | Unknown = 0, 6 | Connected = 1, 7 | Disconnected = 2, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Tools/JustAssembly.API/Analytics/IAnalyticsMonitorCapabilities.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.API.Analytics 2 | { 3 | public interface IAnalyticsMonitorCapabilities 4 | { 5 | int MaxAllowedBandwidthUsagePerDayInKB { get; } 6 | 7 | int MaxInstallationIDSize { get; } 8 | 9 | int MaxKeySizeOfInstallationPropertyKey { get; } 10 | 11 | int MaxLengthOfExceptionContextMessage { get; } 12 | 13 | int MaxLengthOfFeatureName { get; } 14 | 15 | int MaxNumberOfInstallationProperties { get; } 16 | 17 | int MaxStorageSizeInKB { get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Tools/JustAssembly.API/Analytics/IAnalyticsMonitorStatus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JustAssembly.API.Analytics 4 | { 5 | public interface IAnalyticsMonitorStatus 6 | { 7 | IAnalyticsMonitorCapabilities Capabilities { get; } 8 | 9 | ConnectivityStatus Connectivity { get; } 10 | 11 | string CookieId { get; } 12 | 13 | bool IsStarted { get; } 14 | 15 | TimeSpan RunTime { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Tools/JustAssembly.API/Analytics/IAnalyticsService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace JustAssembly.API.Analytics 5 | { 6 | public interface IAnalyticsService 7 | { 8 | IAnalyticsMonitorStatus Status { get; } 9 | 10 | void ForceSync(); 11 | 12 | void SetInstallationInfo(string installationId); 13 | 14 | void SetInstallationInfo(string installationId, IDictionary propertyDictionary); 15 | 16 | void Start(); 17 | 18 | void Stop(); 19 | 20 | void Stop(TimeSpan waitForCompletion); 21 | 22 | void TrackException(Exception exception); 23 | 24 | void TrackException(Exception exception, string contextMessage); 25 | 26 | void TrackException(Exception exception, string contextMessageFormat, params object[] args); 27 | 28 | void TrackFeature(string featureName); 29 | 30 | void TrackFeatureCancel(string featureName); 31 | 32 | void TrackFeatures(string[] featureNames); 33 | 34 | ITimingScope TrackFeatureStart(string featureName); 35 | 36 | TimeSpan TrackFeatureStop(string featureName); 37 | 38 | void TrackFeatureValue(string featureName, long trackedValue); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Tools/JustAssembly.API/Analytics/ITimingScope.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.API.Analytics 2 | { 3 | public interface ITimingScope 4 | { 5 | string FeatureName { get; } 6 | 7 | void Cancel(); 8 | 9 | void Complete(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tools/JustAssembly.API/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("JustAssembly.API")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | // Setting ComVisible to false makes the types in this assembly not visible 15 | // to COM components. If you need to access a type in this assembly from 16 | // COM, set the ComVisible attribute to true on that type. 17 | [assembly: ComVisible(false)] 18 | 19 | // The following GUID is for the ID of the typelib if this project is exposed to COM 20 | [assembly: Guid("a290363a-5715-4fea-871d-17d393b4bf8f")] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("0.0.0.1")] 33 | [assembly: AssemblyFileVersion("0.0.0.1")] 34 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Models/BannerConfig.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.WebServiceProxy.Service 2 | { 3 | public partial class BannerConfig 4 | { 5 | public string LocalFileName { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("JustAssembly.WebServiceProxy")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | // Setting ComVisible to false makes the types in this assembly not visible 15 | // to COM components. If you need to access a type in this assembly from 16 | // COM, set the ComVisible attribute to true on that type. 17 | [assembly: ComVisible(false)] 18 | 19 | // The following GUID is for the ID of the typelib if this project is exposed to COM 20 | [assembly: Guid("18241a42-adb4-459f-9000-8a7e69890cb4")] 21 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/JustAssembly.WebServiceProxy.Service.BannerConfig.datasource: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | JustAssembly.WebServiceProxy.Service.BannerConfig, Service References.Service.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/JustAssembly.WebServiceProxy.Service.BannerEntity.datasource: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | JustAssembly.WebServiceProxy.Service.BannerEntity, Service References.Service.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/JustAssembly.WebServiceProxy.Service.PluginConfig.datasource: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | JustAssembly.WebServiceProxy.Service.PluginConfig, Service References.Service.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/JustAssembly.WebServiceProxy.Service.ToolVersion.datasource: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | JustAssembly.WebServiceProxy.Service.ToolVersion, Service References.Service.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/JustAssembly.WebServiceProxy.Service.VersionInfo.datasource: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | JustAssembly.WebServiceProxy.Service.VersionInfo, Service References.Service.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/UpdatesService.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/UpdatesService1.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/UpdatesService2.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/UpdatesService3.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/UpdatesService5.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/UpdatesService8.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/Service References/Service/configuration.svcinfo: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tools/JustAssembly.WebServiceProxy/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Document/IUndoableOperation.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | 21 | namespace ICSharpCode.AvalonEdit.Document 22 | { 23 | /// 24 | /// This Interface describes a the basic Undo/Redo operation 25 | /// all Undo Operations must implement this interface. 26 | /// 27 | public interface IUndoableOperation 28 | { 29 | /// 30 | /// Undo the last operation 31 | /// 32 | void Undo(); 33 | 34 | /// 35 | /// Redo the last operation 36 | /// 37 | void Redo(); 38 | } 39 | 40 | interface IUndoableOperationWithContext : IUndoableOperation 41 | { 42 | void Undo(UndoStack stack); 43 | void Redo(UndoStack stack); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Highlighting/HighlightingRule.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | using System.Text.RegularExpressions; 21 | 22 | namespace ICSharpCode.AvalonEdit.Highlighting 23 | { 24 | /// 25 | /// A highlighting rule. 26 | /// 27 | [Serializable] 28 | public class HighlightingRule 29 | { 30 | /// 31 | /// Gets/Sets the regular expression for the rule. 32 | /// 33 | public Regex Regex { get; set; } 34 | 35 | /// 36 | /// Gets/Sets the highlighting color. 37 | /// 38 | public HighlightingColor Color { get; set; } 39 | 40 | /// 41 | public override string ToString() 42 | { 43 | return "[" + GetType().Name + " " + Regex + "]"; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Highlighting/IHighlightingDefinitionReferenceResolver.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | 21 | namespace ICSharpCode.AvalonEdit.Highlighting 22 | { 23 | /// 24 | /// Interface for resolvers that can solve cross-definition references. 25 | /// 26 | public interface IHighlightingDefinitionReferenceResolver 27 | { 28 | /// 29 | /// Gets the highlighting definition by name, or null if it is not found. 30 | /// 31 | IHighlightingDefinition GetDefinition(string name); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Highlighting/Resources/ASPX.xshd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <% 9 | %> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Highlighting/Resources/CSS-Mode.xshd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | /\* 13 | \*/ 14 | 15 | 19 | \{ 20 | \} 21 | 22 | 23 | \# 24 | \s 25 | 26 | [\d\w] 27 | 28 | 29 | 30 | 31 | /\* 32 | \*/ 33 | 34 | 35 | \: 36 | \;|(?=\}) 37 | 38 | 39 | " 40 | " 41 | 42 | 43 | 44 | 45 | 46 | ' 47 | ' 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Highlighting/Resources/MarkDown-Mode.xshd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | ^\#.* 15 | 16 | 17 | \*\*.*\*\* 18 | 19 | 20 | __.*__ 21 | 22 | 23 | \*(?![ ]).*\* 24 | 25 | 26 | _.*_ 27 | 28 | 29 | `.*` 30 | 31 | 32 | ^\t 33 | ^(?!\t) 34 | 35 | 36 | ^[ ]{4} 37 | ^(?![ ]{4}) 38 | 39 | 40 | ^> 41 | ^(?!>) 42 | 43 | 44 | \!\[.*\]\[.*\] 45 | 46 | 47 | \[.*\]\(.*\) 48 | 49 | 50 | \[.*\]\[.*\] 51 | 52 | 53 | [ ]{2}$ 54 | 55 | 56 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Highlighting/Resources/Patch-Mode.xshd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Index:\s 12 | 13 | 14 | == 15 | 16 | 17 | --- 18 | 19 | 20 | \+\+\+ 21 | 22 | 23 | @@ 24 | 25 | 26 | - 27 | 28 | 29 | \+ 30 | 31 | 32 | \s 33 | 34 | 35 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Highlighting/Xshd/XshdElement.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | 21 | namespace ICSharpCode.AvalonEdit.Highlighting.Xshd 22 | { 23 | /// 24 | /// An element in a XSHD rule set. 25 | /// 26 | [Serializable] 27 | public abstract class XshdElement 28 | { 29 | /// 30 | /// Gets the line number in the .xshd file. 31 | /// 32 | public int LineNumber { get; set; } 33 | 34 | /// 35 | /// Gets the column number in the .xshd file. 36 | /// 37 | public int ColumnNumber { get; set; } 38 | 39 | /// 40 | /// Applies the visitor to this element. 41 | /// 42 | public abstract object AcceptVisitor(IXshdVisitor visitor); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Highlighting/Xshd/XshdImport.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | 21 | namespace ICSharpCode.AvalonEdit.Highlighting.Xshd 22 | { 23 | /// 24 | /// <Import> element. 25 | /// 26 | [Serializable] 27 | public class XshdImport : XshdElement 28 | { 29 | /// 30 | /// Gets/sets the referenced rule set. 31 | /// 32 | public XshdReference RuleSetReference { get; set; } 33 | 34 | /// 35 | public override object AcceptVisitor(IXshdVisitor visitor) 36 | { 37 | return visitor.VisitImport(this); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Highlighting/Xshd/XshdProperty.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | 21 | namespace ICSharpCode.AvalonEdit.Highlighting.Xshd 22 | { 23 | /// 24 | /// A property in an Xshd file. 25 | /// 26 | [Serializable] 27 | public class XshdProperty : XshdElement 28 | { 29 | /// 30 | /// Gets/sets the name. 31 | /// 32 | public string Name { get; set; } 33 | 34 | /// 35 | /// Gets/sets the value. 36 | /// 37 | public string Value { get; set; } 38 | 39 | /// 40 | /// Creates a new XshdColor instance. 41 | /// 42 | public XshdProperty() 43 | { 44 | } 45 | 46 | /// 47 | public override object AcceptVisitor(IXshdVisitor visitor) 48 | { 49 | return null; 50 | // return visitor.VisitProperty(this); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Highlighting/Xshd/XshdRule.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | 21 | namespace ICSharpCode.AvalonEdit.Highlighting.Xshd 22 | { 23 | /// 24 | /// <Rule> element. 25 | /// 26 | [Serializable] 27 | public class XshdRule : XshdElement 28 | { 29 | /// 30 | /// Gets/sets the rule regex. 31 | /// 32 | public string Regex { get; set; } 33 | 34 | /// 35 | /// Gets/sets the rule regex type. 36 | /// 37 | public XshdRegexType RegexType { get; set; } 38 | 39 | /// 40 | /// Gets/sets the color reference. 41 | /// 42 | public XshdReference ColorReference { get; set; } 43 | 44 | /// 45 | public override object AcceptVisitor(IXshdVisitor visitor) 46 | { 47 | return visitor.VisitRule(this); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.snk -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Indentation/IIndentationStrategy.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using ICSharpCode.AvalonEdit.Document; 20 | using System; 21 | 22 | namespace ICSharpCode.AvalonEdit.Indentation 23 | { 24 | /// 25 | /// Strategy how the text editor handles indentation when new lines are inserted. 26 | /// 27 | public interface IIndentationStrategy 28 | { 29 | /// 30 | /// Sets the indentation for the specified line. 31 | /// Usually this is constructed from the indentation of the previous line. 32 | /// 33 | void IndentLine(TextDocument document, DocumentLine line); 34 | 35 | /// 36 | /// Reindents a set of lines. 37 | /// 38 | void IndentLines(TextDocument document, int beginLine, int endLine); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Properties/CodeAnalysisDictionary.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Uncollapse 7 | Foldings 8 | Xshd 9 | Utils 10 | Deque 11 | Colorizer 12 | Renderer 13 | Renderers 14 | Deletable 15 | 16 | y 17 | 18 | 19 | 20 | Lineup 21 | 22 | 23 | 24 | Bestest 25 | 26 | 27 | 28 | 29 | 30 | WiX 31 | 32 | 33 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Rendering/IBackgroundRenderer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | using System.Windows.Media; 21 | 22 | namespace ICSharpCode.AvalonEdit.Rendering 23 | { 24 | /// 25 | /// Background renderers draw in the background of a known layer. 26 | /// You can use background renderers to draw non-interactive elements on the TextView 27 | /// without introducing new UIElements. 28 | /// 29 | public interface IBackgroundRenderer 30 | { 31 | /// 32 | /// Gets the layer on which this background renderer should draw. 33 | /// 34 | KnownLayer Layer { get; } 35 | 36 | /// 37 | /// Causes the background renderer to draw. 38 | /// 39 | void Draw(TextView textView, DrawingContext drawingContext); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Rendering/ITextViewConnect.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | 21 | namespace ICSharpCode.AvalonEdit.Rendering 22 | { 23 | /// 24 | /// Allows s, s and 25 | /// s to be notified when they are added or removed from a text view. 26 | /// 27 | public interface ITextViewConnect 28 | { 29 | /// 30 | /// Called when added to a text view. 31 | /// 32 | void AddToTextView(TextView textView); 33 | 34 | /// 35 | /// Called when removed from a text view. 36 | /// 37 | void RemoveFromTextView(TextView textView); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Rendering/IVisualLineTransformer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | using System.Collections.Generic; 21 | 22 | namespace ICSharpCode.AvalonEdit.Rendering 23 | { 24 | /// 25 | /// Allows transforming visual line elements. 26 | /// 27 | public interface IVisualLineTransformer 28 | { 29 | /// 30 | /// Applies the transformation to the specified list of visual line elements. 31 | /// 32 | void Transform(ITextRunConstructionContext context, IList elements); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Search/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/ICSharpCode.AvalonEdit/Search/next.png -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Search/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/ICSharpCode.AvalonEdit/Search/prev.png -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Snippets/SnippetElement.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | using System.Windows.Documents; 21 | 22 | namespace ICSharpCode.AvalonEdit.Snippets 23 | { 24 | /// 25 | /// An element inside a snippet. 26 | /// 27 | [Serializable] 28 | public abstract class SnippetElement 29 | { 30 | /// 31 | /// Performs insertion of the snippet. 32 | /// 33 | public abstract void Insert(InsertionContext context); 34 | 35 | /// 36 | /// Converts the snippet to text, with replaceable fields in italic. 37 | /// 38 | public virtual Inline ToTextRun() 39 | { 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Snippets/SnippetTextElement.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | using System.Windows.Documents; 21 | 22 | namespace ICSharpCode.AvalonEdit.Snippets 23 | { 24 | /// 25 | /// Represents a text element in a snippet. 26 | /// 27 | [Serializable] 28 | public class SnippetTextElement : SnippetElement 29 | { 30 | string text; 31 | 32 | /// 33 | /// The text to be inserted. 34 | /// 35 | public string Text { 36 | get { return text; } 37 | set { text = value; } 38 | } 39 | 40 | /// 41 | public override void Insert(InsertionContext context) 42 | { 43 | if (text != null) 44 | context.InsertText(text); 45 | } 46 | 47 | /// 48 | public override Inline ToTextRun() 49 | { 50 | return new Run(text ?? string.Empty); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Utils/Boxes.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | 21 | namespace ICSharpCode.AvalonEdit.Utils 22 | { 23 | /// 24 | /// Reuse the same instances for boxed booleans. 25 | /// 26 | static class Boxes 27 | { 28 | public static readonly object True = true; 29 | public static readonly object False = false; 30 | 31 | public static object Box(bool value) 32 | { 33 | return value ? True : False; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Utils/Constants.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | 21 | namespace ICSharpCode.AvalonEdit.Utils 22 | { 23 | static class Constants 24 | { 25 | /// 26 | /// Multiply with this constant to convert from points to device-independent pixels. 27 | /// 28 | public const double PixelPerPoint = 4 / 3.0; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Utils/Empty.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | using System.Collections.ObjectModel; 21 | 22 | namespace ICSharpCode.AvalonEdit.Utils 23 | { 24 | /// 25 | /// Provides immutable empty list instances. 26 | /// 27 | static class Empty 28 | { 29 | public static readonly T[] Array = new T[0]; 30 | //public static readonly ReadOnlyCollection ReadOnlyCollection = new ReadOnlyCollection(Array); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Utils/NullSafeCollection.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | using System.Collections.ObjectModel; 21 | 22 | namespace ICSharpCode.AvalonEdit.Utils 23 | { 24 | /// 25 | /// A collection that cannot contain null values. 26 | /// 27 | [Serializable] 28 | public class NullSafeCollection : Collection where T : class 29 | { 30 | /// 31 | protected override void InsertItem(int index, T item) 32 | { 33 | if (item == null) 34 | throw new ArgumentNullException("item"); 35 | base.InsertItem(index, item); 36 | } 37 | 38 | /// 39 | protected override void SetItem(int index, T item) 40 | { 41 | if (item == null) 42 | throw new ArgumentNullException("item"); 43 | base.SetItem(index, item); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/Utils/PropertyChangedWeakEventManager.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | // software and associated documentation files (the "Software"), to deal in the Software 5 | // without restriction, including without limitation the rights to use, copy, modify, merge, 6 | // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | // to whom the Software is furnished to do so, subject to the following conditions: 8 | // 9 | // The above copyright notice and this permission notice shall be included in all copies or 10 | // substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | // DEALINGS IN THE SOFTWARE. 18 | 19 | using System; 20 | using System.ComponentModel; 21 | 22 | namespace ICSharpCode.AvalonEdit.Utils 23 | { 24 | /// 25 | /// WeakEventManager for INotifyPropertyChanged.PropertyChanged. 26 | /// 27 | public sealed class PropertyChangedWeakEventManager : WeakEventManagerBase 28 | { 29 | /// 30 | protected override void StartListening(INotifyPropertyChanged source) 31 | { 32 | source.PropertyChanged += DeliverEvent; 33 | } 34 | 35 | /// 36 | protected override void StopListening(INotifyPropertyChanged source) 37 | { 38 | source.PropertyChanged -= DeliverEvent; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/themes/RightArrow.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/ICSharpCode.AvalonEdit/themes/RightArrow.cur -------------------------------------------------------------------------------- /UI/ICSharpCode.AvalonEdit/themes/generic.xaml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /UI/JustAssembly.CommandLineTool/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /UI/JustAssembly.CommandLineTool/FilePathValidater.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | 4 | namespace JustAssembly.CommandLineTool 5 | { 6 | internal static class FilePathValidater 7 | { 8 | private static List ValidInputFileExtensions = new List() { ".dll", ".exe" }; 9 | private static List ValidOutputFileExtensions = new List() { ".xml" }; 10 | 11 | internal static bool ValidateInputFile(string filePath) 12 | { 13 | return ValidateFile(filePath, ValidInputFileExtensions) && 14 | File.Exists(filePath); 15 | } 16 | 17 | internal static bool ValidateOutputFile(string filePath) 18 | { 19 | return ValidateFile(filePath, ValidOutputFileExtensions); 20 | } 21 | 22 | private static bool ValidateFile(string filePath, List validExtensions) 23 | { 24 | if (string.IsNullOrWhiteSpace(filePath)) 25 | { 26 | return false; 27 | } 28 | 29 | string extension = Path.GetExtension(filePath); 30 | if (!validExtensions.Contains(extension)) 31 | { 32 | return false; 33 | } 34 | 35 | return true; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /UI/JustAssembly.CommandLineTool/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("JustAssembly.CommandLineTool")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | // Setting ComVisible to false makes the types in this assembly not visible 15 | // to COM components. If you need to access a type in this assembly from 16 | // COM, set the ComVisible attribute to true on that type. 17 | [assembly: ComVisible(false)] 18 | 19 | // The following GUID is for the ID of the typelib if this project is exposed to COM 20 | [assembly: Guid("c6d6187d-cb83-40a1-a3f6-20fb9231d67b")] 21 | -------------------------------------------------------------------------------- /UI/JustAssembly.Infrastructure/Analytics/AnalyticsServiceImporter.cs: -------------------------------------------------------------------------------- 1 | using JustAssembly.API.Analytics; 2 | using System; 3 | using System.ComponentModel.Composition; 4 | using System.ComponentModel.Composition.Hosting; 5 | using System.IO; 6 | 7 | namespace JustAssembly.Infrastructure.Analytics 8 | { 9 | public class AnalyticsServiceImporter 10 | { 11 | private static AnalyticsServiceImporter instance; 12 | 13 | [Import] 14 | private IAnalyticsService analyticsService; 15 | 16 | private AnalyticsServiceImporter() 17 | { 18 | } 19 | 20 | public static AnalyticsServiceImporter Instance 21 | { 22 | get 23 | { 24 | if (instance == null) 25 | { 26 | instance = new AnalyticsServiceImporter(); 27 | } 28 | 29 | return instance; 30 | } 31 | } 32 | 33 | public IAnalyticsService Import() 34 | { 35 | try 36 | { 37 | AggregateCatalog catalog = new AggregateCatalog(); 38 | catalog.Catalogs.Add(new AssemblyCatalog(Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "JustAssembly.Analytics.dll"))); 39 | 40 | CompositionContainer container = new CompositionContainer(catalog); 41 | container.ComposeParts(this); 42 | } 43 | catch (Exception) { } 44 | 45 | if (analyticsService != null) 46 | { 47 | return analyticsService; 48 | } 49 | else 50 | { 51 | return new EmptyAnalyticsService(); 52 | } 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /UI/JustAssembly.Infrastructure/Analytics/EmptyAnalyticsMonitorCapabilities.cs: -------------------------------------------------------------------------------- 1 | using JustAssembly.API.Analytics; 2 | 3 | namespace JustAssembly.Infrastructure.Analytics 4 | { 5 | internal class EmptyAnalyticsMonitorCapabilities : IAnalyticsMonitorCapabilities 6 | { 7 | public int MaxAllowedBandwidthUsagePerDayInKB 8 | { 9 | get { return 0; } 10 | } 11 | 12 | public int MaxInstallationIDSize 13 | { 14 | get { return 0; } 15 | } 16 | 17 | public int MaxKeySizeOfInstallationPropertyKey 18 | { 19 | get { return 0; } 20 | } 21 | 22 | public int MaxLengthOfExceptionContextMessage 23 | { 24 | get { return 0; } 25 | } 26 | 27 | public int MaxLengthOfFeatureName 28 | { 29 | get { return 0; } 30 | } 31 | 32 | public int MaxNumberOfInstallationProperties 33 | { 34 | get { return 0; } 35 | } 36 | 37 | public int MaxStorageSizeInKB 38 | { 39 | get { return 0; } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /UI/JustAssembly.Infrastructure/Analytics/EmptyAnalyticsMonitorStatus.cs: -------------------------------------------------------------------------------- 1 | using JustAssembly.API.Analytics; 2 | using System; 3 | 4 | namespace JustAssembly.Infrastructure.Analytics 5 | { 6 | internal class EmptyAnalyticsMonitorStatus : IAnalyticsMonitorStatus 7 | { 8 | public IAnalyticsMonitorCapabilities Capabilities 9 | { 10 | get { return new EmptyAnalyticsMonitorCapabilities(); } 11 | } 12 | 13 | public ConnectivityStatus Connectivity 14 | { 15 | get { return ConnectivityStatus.Unknown; } 16 | } 17 | 18 | public string CookieId 19 | { 20 | get { return string.Empty; } 21 | } 22 | 23 | public bool IsStarted 24 | { 25 | get { return false; } 26 | } 27 | 28 | public TimeSpan RunTime 29 | { 30 | get { return TimeSpan.Zero; } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /UI/JustAssembly.Infrastructure/Analytics/EmptyAnalyticsService.cs: -------------------------------------------------------------------------------- 1 | using JustAssembly.API.Analytics; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace JustAssembly.Infrastructure.Analytics 6 | { 7 | internal class EmptyAnalyticsService : IAnalyticsService 8 | { 9 | public IAnalyticsMonitorStatus Status 10 | { 11 | get { return new EmptyAnalyticsMonitorStatus(); } 12 | } 13 | 14 | public void ForceSync() 15 | { 16 | } 17 | 18 | public void SetInstallationInfo(string installationId) 19 | { 20 | } 21 | 22 | public void SetInstallationInfo(string installationId, IDictionary propertyDictionary) 23 | { 24 | } 25 | 26 | public void Start() 27 | { 28 | } 29 | 30 | public void Stop() 31 | { 32 | } 33 | 34 | public void Stop(TimeSpan waitForCompletion) 35 | { 36 | } 37 | 38 | public void TrackException(Exception exception) 39 | { 40 | } 41 | 42 | public void TrackException(Exception exception, string contextMessage) 43 | { 44 | } 45 | 46 | public void TrackException(Exception exception, string contextMessageFormat, params object[] args) 47 | { 48 | } 49 | 50 | public void TrackFeature(string featureName) 51 | { 52 | } 53 | 54 | public void TrackFeatureCancel(string featureName) 55 | { 56 | } 57 | 58 | public void TrackFeatures(string[] featureNames) 59 | { 60 | } 61 | 62 | public ITimingScope TrackFeatureStart(string featureName) 63 | { 64 | return new EmptyTimingScope(); 65 | } 66 | 67 | public TimeSpan TrackFeatureStop(string featureName) 68 | { 69 | return TimeSpan.Zero; 70 | } 71 | 72 | public void TrackFeatureValue(string featureName, long trackedValue) 73 | { 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /UI/JustAssembly.Infrastructure/Analytics/EmptyTimingScope.cs: -------------------------------------------------------------------------------- 1 | using JustAssembly.API.Analytics; 2 | 3 | namespace JustAssembly.Infrastructure.Analytics 4 | { 5 | internal class EmptyTimingScope : ITimingScope 6 | { 7 | public string FeatureName 8 | { 9 | get { return string.Empty; } 10 | } 11 | 12 | public void Cancel() 13 | { 14 | } 15 | 16 | public void Complete() 17 | { 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /UI/JustAssembly.Infrastructure/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("JustAssembly.Infrastructure")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | // Setting ComVisible to false makes the types in this assembly not visible 15 | // to COM components. If you need to access a type in this assembly from 16 | // COM, set the ComVisible attribute to true on that type. 17 | [assembly: ComVisible(false)] 18 | 19 | // The following GUID is for the ID of the typelib if this project is exposed to COM 20 | [assembly: Guid("5f05c639-2a66-4411-ab69-5f7dc2c55faa")] 21 | -------------------------------------------------------------------------------- /UI/JustAssembly.SelectorControl/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using System.Windows; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("JustAssembly.JustAssembly.SelectorControl")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyTrademark("")] 13 | [assembly: AssemblyCulture("")] 14 | 15 | // Setting ComVisible to false makes the types in this assembly not visible 16 | // to COM components. If you need to access a type in this assembly from 17 | // COM, set the ComVisible attribute to true on that type. 18 | [assembly: ComVisible(false)] 19 | 20 | // The following GUID is for the ID of the typelib if this project is exposed to COM 21 | [assembly: Guid("4498e5b1-75c7-41cd-85d5-05bb6764f37f")] 22 | 23 | // Version information for an assembly consists of the following four values: 24 | // 25 | // Major Version 26 | // Minor Version 27 | // Build Number 28 | // Revision 29 | // 30 | // You can specify all the values or you can default the Build and Revision Numbers 31 | // by using the '*' as shown below: 32 | // [assembly: AssemblyVersion("1.0.*")] 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] -------------------------------------------------------------------------------- /UI/JustAssembly.SelectorControl/SelectedItemType.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.SelectorControl 2 | { 3 | public enum SelectedItemType 4 | { 5 | File, 6 | Folder 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /UI/JustAssembly.SelectorControl/Themes/Generic.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 26 | 27 | -------------------------------------------------------------------------------- /UI/JustAssembly/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /UI/JustAssembly/Banners/Banner.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Media; 2 | 3 | namespace JustAssembly.Banners 4 | { 5 | public class Banner 6 | { 7 | public Banner(ImageSource image, string link) 8 | { 9 | this.Image = image; 10 | this.Link = link; 11 | } 12 | 13 | public ImageSource Image { get; private set; } 14 | 15 | public string Link { get; private set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /UI/JustAssembly/Banners/BannerGenerator.cs: -------------------------------------------------------------------------------- 1 | using JustAssembly.WebServiceProxy.Service; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | 6 | namespace JustAssembly.Banners 7 | { 8 | internal class BannerGenerator 9 | { 10 | public static BannerConfig GetRandomFromBannerConfigs(IEnumerable bannerConfigs) 11 | { 12 | Random random = new Random((int)DateTime.Now.Ticks); 13 | 14 | if (bannerConfigs == null || !bannerConfigs.Any()) 15 | { 16 | return null; 17 | } 18 | int capacity = bannerConfigs.Sum(b => b.DisplayPriority); 19 | 20 | var campaignBannerNames = new List(capacity); 21 | 22 | foreach (BannerConfig bannerConfig in bannerConfigs) 23 | { 24 | for (int i = 0; i < bannerConfig.DisplayPriority; i++) 25 | { 26 | campaignBannerNames.Add(bannerConfig); 27 | } 28 | } 29 | //// NOTE: index is between [0, count) range. 30 | int bannerIndex = random.Next(0, campaignBannerNames.Count); 31 | 32 | return campaignBannerNames[bannerIndex]; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /UI/JustAssembly/Banners/BannerImage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Windows.Controls; 4 | using System.Windows.Input; 5 | 6 | namespace JustAssembly.Banners 7 | { 8 | public class BannerImage : Image 9 | { 10 | private Banner banner; 11 | 12 | public BannerImage() 13 | { 14 | this.Visibility = System.Windows.Visibility.Collapsed; 15 | this.Cursor = Cursors.Hand; 16 | } 17 | 18 | public int HolderId { get; set; } 19 | 20 | protected override void OnInitialized(EventArgs e) 21 | { 22 | base.OnInitialized(e); 23 | 24 | this.banner = BannerService.Instance.GetBanner(this.HolderId); 25 | if (this.banner != null) 26 | { 27 | this.Source = this.banner.Image; 28 | this.MouseLeftButtonDown += OnMouseLeftButtonDown; 29 | this.Visibility = System.Windows.Visibility.Visible; 30 | } 31 | } 32 | 33 | void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) 34 | { 35 | try 36 | { 37 | Process.Start(banner.Link.Trim()); 38 | } 39 | catch (Exception ex) 40 | { 41 | Configuration.ShowExceptionMessage(ex); 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /UI/JustAssembly/CallbackLogger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Microsoft.Practices.Prism.Logging; 4 | 5 | namespace JustDecompile 6 | { 7 | public class CallbackLogger : ILoggerFacade 8 | { 9 | private readonly Queue> savedLogs = 10 | new Queue>(); 11 | 12 | private Action callback; 13 | 14 | public Action Callback 15 | { 16 | get { return this.callback; } 17 | set { this.callback = value; } 18 | } 19 | 20 | public void Log(string message, Category category, Priority priority) 21 | { 22 | if (this.Callback != null) 23 | { 24 | this.Callback(message, category, priority); 25 | } 26 | else 27 | { 28 | this.savedLogs.Enqueue(new Tuple(message, category, priority)); 29 | } 30 | } 31 | 32 | public void ReplaySavedLogs() 33 | { 34 | if (this.Callback != null) 35 | { 36 | while (this.savedLogs.Count > 0) 37 | { 38 | var log = this.savedLogs.Dequeue(); 39 | this.Callback(log.Item1, log.Item2, log.Item3); 40 | } 41 | } 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Converters/BooleanToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Data; 3 | 4 | namespace JustAssembly.Converters 5 | { 6 | public class BooleanToVisibilityConverter : IValueConverter 7 | { 8 | public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) 9 | { 10 | bool valueAsBool = (bool)value; 11 | if (valueAsBool) 12 | { 13 | return Visibility.Visible; 14 | } 15 | else 16 | { 17 | return Visibility.Collapsed; 18 | } 19 | } 20 | 21 | public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) 22 | { 23 | throw new System.NotImplementedException(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /UI/JustAssembly/Converters/DifferenceDecorationBackgroundConverter.cs: -------------------------------------------------------------------------------- 1 | using JustAssembly.Nodes; 2 | using System; 3 | using System.Globalization; 4 | using System.Windows.Data; 5 | using System.Windows.Media; 6 | 7 | namespace JustAssembly.Converters 8 | { 9 | public class DifferenceDecorationBackgroundConverter : IValueConverter 10 | { 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | DifferenceDecoration decoration = (DifferenceDecoration)value; 14 | switch (decoration) 15 | { 16 | case DifferenceDecoration.NoDifferences: 17 | return new SolidColorBrush(Colors.Transparent); 18 | case DifferenceDecoration.Modified: 19 | return new SolidColorBrush(Configuration.ModifiedColor); 20 | case DifferenceDecoration.Deleted: 21 | return new SolidColorBrush(Configuration.DeletedColor); 22 | case DifferenceDecoration.Added: 23 | return new SolidColorBrush(Configuration.AddedColor); 24 | default: 25 | throw new ArgumentOutOfRangeException("value"); 26 | } 27 | } 28 | 29 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 30 | { 31 | throw new System.NotImplementedException(); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /UI/JustAssembly/Converters/ReverseBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Data; 2 | 3 | namespace JustAssembly.Converters 4 | { 5 | public class ReverseBooleanConverter : IValueConverter 6 | { 7 | public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) 8 | { 9 | return !((bool)value); 10 | } 11 | 12 | public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) 13 | { 14 | throw new System.NotImplementedException(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /UI/JustAssembly/Dialogs/DangerousResource/AssemblyType.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.Dialogs.DangerousResource 2 | { 3 | internal enum AssemblyType 4 | { 5 | Old, 6 | New 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /UI/JustAssembly/Dialogs/DangerousResource/DangerousResourceDialog.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace JustAssembly.Dialogs.DangerousResource 4 | { 5 | internal class DangerousResourceDialog 6 | { 7 | private readonly string assemblyFileName; 8 | private readonly AssemblyType assemblyType; 9 | 10 | public DangerousResourceDialog(string assemblyFileName, AssemblyType assemblyType) 11 | { 12 | this.assemblyFileName = assemblyFileName; 13 | this.assemblyType = assemblyType; 14 | } 15 | 16 | public virtual DangerousResourceDialogResult Show() 17 | { 18 | string title = "Warning"; 19 | string message = this.GetMessage(); 20 | 21 | MessageBoxResult result = MessageBox.Show(Application.Current.MainWindow, message, title, MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No); 22 | if (result == MessageBoxResult.Yes) 23 | { 24 | return DangerousResourceDialogResult.Yes; 25 | } 26 | 27 | return DangerousResourceDialogResult.No; 28 | } 29 | 30 | private string GetMessage() 31 | { 32 | return $"\"{this.assemblyFileName}\" [{this.assemblyType.ToString()}] contains resources that may contain malicious code. Decompilation of such resources will result in execution of that malicious code. Do you want to decompile those resources and use them for the assembly comparison?"; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /UI/JustAssembly/Dialogs/DangerousResource/DangerousResourceDialogResult.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.Dialogs.DangerousResource 2 | { 3 | internal enum DangerousResourceDialogResult 4 | { 5 | Yes, 6 | No 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /UI/JustAssembly/Dialogs/DangerousResource/DangerousResourceDialogWithAnalyticsTracking.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.Dialogs.DangerousResource 2 | { 3 | internal class DangerousResourceDialogWithAnalyticsTracking : DangerousResourceDialog 4 | { 5 | public DangerousResourceDialogWithAnalyticsTracking(string assemblyFileName, AssemblyType assemblyType) 6 | :base(assemblyFileName, assemblyType) { } 7 | 8 | public override DangerousResourceDialogResult Show() 9 | { 10 | DangerousResourceDialogResult dialogResult = base.Show(); 11 | 12 | this.TrackDangerousResourceDecompilationUserChoice(dialogResult); 13 | 14 | return dialogResult; 15 | } 16 | 17 | private void TrackDangerousResourceDecompilationUserChoice(DangerousResourceDialogResult dialogResult) 18 | { 19 | string featureToReport = "DangerousResourcesDecompilationDialogResult" + '.' + dialogResult.ToString(); 20 | 21 | Configuration.Analytics.TrackFeature(featureToReport); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /UI/JustAssembly/Dialogs/ErrorMessageBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using System.Windows.Media; 6 | 7 | namespace JustAssembly 8 | { 9 | public class ErrorMessageBox : TextBox 10 | { 11 | public ErrorMessageBox(string text) 12 | { 13 | this.Text = text; 14 | this.BorderBrush = new SolidColorBrush(Colors.Transparent); 15 | this.BorderThickness = new Thickness(); 16 | this.IsReadOnly = true; 17 | this.TextWrapping = TextWrapping.Wrap; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /UI/JustAssembly/Dialogs/IWindowView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Media; 3 | 4 | namespace JustAssembly 5 | { 6 | public interface IWindowView 7 | { 8 | string Title { get; } 9 | 10 | ImageSource Icon { get; } 11 | 12 | bool TrySetFocus(); 13 | 14 | void OnShowWindow(); 15 | 16 | event EventHandler SendCloseRequest; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /UI/JustAssembly/Dialogs/NewSessionDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Windows; 4 | using System.Windows.Input; 5 | 6 | namespace JustAssembly 7 | { 8 | public partial class NewSessionDialog : Window 9 | { 10 | public NewSessionDialog() 11 | { 12 | InitializeComponent(); 13 | 14 | this.ShowInTaskbar = false; 15 | 16 | this.ResizeMode = ResizeMode.NoResize; 17 | 18 | this.WindowStyle = WindowStyle.ToolWindow; 19 | 20 | this.WindowStartupLocation = WindowStartupLocation.CenterOwner; 21 | 22 | this.Owner = Application.Current.MainWindow; 23 | 24 | this.KeyDown += OnKeyDown; 25 | } 26 | 27 | private void OnKeyDown(object sender, KeyEventArgs e) 28 | { 29 | if (e.Key == Key.Escape) 30 | { 31 | this.DialogResult = false; 32 | 33 | this.Close(); 34 | } 35 | } 36 | 37 | public bool ShowModal() 38 | { 39 | return this.ShowDialog() == true; 40 | } 41 | 42 | private void OnLoadClick(object sender, RoutedEventArgs e) 43 | { 44 | this.DialogResult = true; 45 | 46 | this.Close(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /UI/JustAssembly/DispatcherObjectExt.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using System.Windows.Threading; 4 | 5 | namespace JustAssembly 6 | { 7 | public static class DispatcherObjectExt 8 | { 9 | public static void BeginInvoke(Action action, DispatcherPriority priority = DispatcherPriority.Normal) 10 | { 11 | Application.Current.Dispatcher.BeginInvoke(action, priority); 12 | } 13 | 14 | public static void Invoke(Action action, DispatcherPriority priority = DispatcherPriority.Normal) 15 | { 16 | Application.Current.Dispatcher.Invoke(action, priority); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /UI/JustAssembly/Extensions/CodeViewerExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using JustDecompile.External.JustAssembly; 7 | 8 | namespace JustAssembly.Extensions 9 | { 10 | static class CodeViewerExtensions 11 | { 12 | public static int GetLineFromMemberToken(this ICodeViewerResults self, uint typeToken, uint memberToken) 13 | { 14 | var lineToMemberMap = self.LineToMemberTokenMap.FirstOrDefault( 15 | t => (t.Item2 is IMemberTokenProvider) && (t.Item2 as IMemberTokenProvider).DeclaringTypeToken == typeToken && (t.Item2 as IMemberTokenProvider).MemberToken == memberToken); 16 | 17 | if (lineToMemberMap != null) 18 | { 19 | return lineToMemberMap.Item1; 20 | } 21 | 22 | return -1; 23 | } 24 | 25 | public static int GetLineFromTypeToken(this ICodeViewerResults self, uint typeToken) 26 | { 27 | var lineToMemberMap = self.LineToMemberTokenMap.FirstOrDefault(t => (t.Item2 is ITypeTokenProvider) && (t.Item2 as ITypeTokenProvider).TypeToken == typeToken); 28 | 29 | if (lineToMemberMap != null) 30 | { 31 | return lineToMemberMap.Item1; 32 | } 33 | 34 | return -1; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /UI/JustAssembly/Images/Common/error_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/Common/error_big.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/Common/error_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/Common/error_small.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/Common/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/Common/open.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/DefaultBanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/DefaultBanner.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/JustAssembly.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/JustAssembly.ico -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Assembly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Assembly.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Class-Internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Class-Internal.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Class-Private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Class-Private.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Class-Protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Class-Protected.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Class.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Constructor-Internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Constructor-Internal.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Constructor-Private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Constructor-Private.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Constructor-Protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Constructor-Protected.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Constructor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Constructor.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Enum-Internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Enum-Internal.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Enum-Private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Enum-Private.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Enum-Protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Enum-Protected.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Enum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Enum.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Event-Internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Event-Internal.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Event-Private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Event-Private.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Event-Protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Event-Protected.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Event.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Field-Internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Field-Internal.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Field-Private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Field-Private.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Field-Protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Field-Protected.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Field.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Field.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Folder.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Interface-Internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Interface-Internal.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Interface-Private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Interface-Private.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Interface-Protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Interface-Protected.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Interface.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Method-Internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Method-Internal.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Method-Private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Method-Private.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Method-Protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Method-Protected.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Method.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Namespace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Namespace.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Property-Internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Property-Internal.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Property-Private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Property-Private.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Property-Protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Property-Protected.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Entity-Property.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Entity-Property.png -------------------------------------------------------------------------------- /UI/JustAssembly/Images/TreeView/Resources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/telerik/JustAssembly/679eecfbdd9e31aa7206cee81389834fd5fa33e8/UI/JustAssembly/Images/TreeView/Resources.png -------------------------------------------------------------------------------- /UI/JustAssembly/ImagesResourceStrings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace JustAssembly 5 | { 6 | static class ImagesResourceStrings 7 | { 8 | public const string AssemblyNode = "pack://application:,,,/JustAssembly;component/Images/TreeView/Entity-Assembly.png"; 9 | 10 | public const string FolderNode = "pack://application:,,,/JustAssembly;component/Images/TreeView/Entity-Folder.png"; 11 | 12 | public const string ModuleNode = "pack://application:,,,/JustAssembly;component/Images/TreeView/Entity-Assembly.png"; 13 | 14 | public const string NamespaceNode = "pack://application:,,,/JustAssembly;component/Images/TreeView/Entity-Namespace.png"; 15 | 16 | public const string TypeNode = "pack://application:,,,/JustAssembly;component/Images/TreeView/Entity-Class.png"; 17 | 18 | public const string EventNode = "pack://application:,,,/JustAssembly;component/Images/TreeView/Entity-Event.png"; 19 | 20 | public const string FieldNode = "pack://application:,,,/JustAssembly;component/Images/TreeView/Entity-Field.png"; 21 | 22 | public const string MethodNode = "pack://application:,,,/JustAssembly;component/Images/TreeView/Entity-Method.png"; 23 | 24 | public const string PropertyNode = "pack://application:,,,/JustAssembly;component/Images/TreeView/Entity-Property.png"; 25 | 26 | public const string ResourceImage = "pack://application:,,,/JustAssembly;component/Images/TreeView/Resources.png"; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /UI/JustAssembly/Infrastructure/AssemblyDifferences.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Microsoft.Practices.Prism.ViewModel; 5 | 6 | namespace JustAssembly.Infrastructure 7 | { 8 | class JustAssemblyViewModel : NotificationObject 9 | { 10 | private string selectedJustAssembly; 11 | 12 | private readonly IDictionary diffMap; 13 | 14 | public JustAssemblyViewModel() 15 | { 16 | this.diffMap = new Dictionary 17 | { 18 | {"All kinds of API changes", JustAssemblyerences.All}, 19 | {"Public API without version changes", JustAssemblyerences.AllPublicApi}, 20 | {"Public API breaking changes", JustAssemblyerences.PublicApiBreakingChanges}, 21 | }; 22 | this.SelectedJustAssembly = this.JustAssemblys.First(); 23 | } 24 | 25 | public string SelectedJustAssembly 26 | { 27 | get 28 | { 29 | return this.selectedJustAssembly; 30 | } 31 | set 32 | { 33 | if (selectedJustAssembly != value) 34 | { 35 | selectedJustAssembly = value; 36 | 37 | this.RaisePropertyChanged("SelectedJustAssembly"); 38 | } 39 | } 40 | } 41 | 42 | public IEnumerable JustAssemblys 43 | { 44 | get { return diffMap.Keys; } 45 | } 46 | 47 | public JustAssemblyerences GetSelectedJustAssembly() 48 | { 49 | return diffMap[SelectedJustAssembly]; 50 | } 51 | } 52 | 53 | enum JustAssemblyerences : int 54 | { 55 | All, 56 | AllPublicApi, 57 | PublicApiBreakingChanges 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /UI/JustAssembly/Infrastructure/CodeViewer/ClassificationType.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.Infrastructure.CodeViewer 2 | { 3 | public enum ClassificationType 4 | { 5 | ModifiedLine, 6 | InsertedLine, 7 | DeletedLine, 8 | ImaginaryLine, 9 | NotModifiedLine 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /UI/JustAssembly/Infrastructure/CodeViewer/DiffLineNumberMargin.cs: -------------------------------------------------------------------------------- 1 | using ICSharpCode.AvalonEdit.Editing; 2 | using ICSharpCode.AvalonEdit.Rendering; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Globalization; 6 | using System.Linq; 7 | 8 | namespace JustAssembly.Infrastructure.CodeViewer 9 | { 10 | internal class DiffLineNumberMargin : LineNumberMargin 11 | { 12 | public DiffLineNumberMargin(ICodeViewerResults sourceCode) 13 | { 14 | this.SourceCode = sourceCode; 15 | } 16 | 17 | public ICodeViewerResults SourceCode { get; set; } 18 | 19 | protected override string GetLineNumberAsString(VisualLine line) 20 | { 21 | if (this.SourceCode == null) 22 | { 23 | return line.FirstDocumentLine.LineNumber.ToString(CultureInfo.CurrentCulture); 24 | } 25 | 26 | return this.SourceCode.GetLineNumberString(line.FirstDocumentLine.LineNumber - 1); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /UI/JustAssembly/Infrastructure/CodeViewer/ICodeViewerResults.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using JustAssembly.DiffAlgorithm.Models; 4 | 5 | namespace JustAssembly.Infrastructure.CodeViewer 6 | { 7 | public interface ICodeViewerResults 8 | { 9 | Position GetMemberPosition(); 10 | 11 | bool HighlighMember { get; } 12 | 13 | string GetSourceCode(); 14 | 15 | void ApplyDiffInfo(DiffFile diffFile); 16 | 17 | ClassificationType GetLineDiffClassificationType(int lineNumber); 18 | 19 | int GetLinesCount(); 20 | 21 | string GetLineNumberString(int lineNumber); 22 | } 23 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Infrastructure/CodeViewer/Position.cs: -------------------------------------------------------------------------------- 1 | using JustDecompile.External.JustAssembly; 2 | using JustAssembly.Infrastructure.CodeViewer; 3 | 4 | namespace JustAssembly 5 | { 6 | public class Position : ISpan 7 | { 8 | public Position() 9 | : this(0, 0, -1) { } 10 | 11 | public Position(int start, int length, int lineNumber) 12 | { 13 | this.Length = length; 14 | 15 | this.Start = start; 16 | 17 | this.End = start + length; 18 | 19 | this.LineNumber = lineNumber; 20 | } 21 | 22 | public static Position Empty = new Position(); 23 | 24 | public int Length { get; private set; } 25 | 26 | public int Start { get; private set; } 27 | 28 | public int End { get; private set; } 29 | 30 | public int LineNumber { get; private set; } 31 | } 32 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Infrastructure/Commands.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using Microsoft.Practices.Prism.Commands; 4 | 5 | namespace JustAssembly.Infrastructure 6 | { 7 | public static class Commands 8 | { 9 | public static CompositeCommand TabItemCloseCommand = new CompositeCommand(); 10 | 11 | public static CompositeCommand CloseAllButThisCommand = new CompositeCommand(); 12 | 13 | public static CompositeCommand CloseAllCommand = new CompositeCommand(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /UI/JustAssembly/Infrastructure/GeneratedProjectOutputInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using JustDecompile.External.JustAssembly; 4 | 5 | namespace JustAssembly.Nodes 6 | { 7 | class GeneratedProjectOutputInfo 8 | { 9 | private readonly string outputPath; 10 | 11 | public GeneratedProjectOutputInfo(string fileName) 12 | { 13 | if (string.IsNullOrWhiteSpace(fileName)) 14 | { 15 | return; 16 | } 17 | do 18 | { 19 | this.outputPath = GenerateOutputFolder(fileName); 20 | 21 | } while (Directory.Exists(outputPath)); 22 | 23 | Directory.CreateDirectory(this.outputPath); 24 | 25 | this.Timestamp = DateTime.Now; 26 | } 27 | 28 | public string OutputPath 29 | { 30 | get 31 | { 32 | return this.outputPath; 33 | } 34 | } 35 | 36 | public readonly DateTime Timestamp; 37 | 38 | public string GetRelativePath(string absolutePath) 39 | { 40 | return absolutePath.Remove(0, OutputPath.Length + 1); 41 | } 42 | 43 | private string GenerateOutputFolder(string fileName) 44 | { 45 | fileName = string.Format("{0}\\{1}_{2}", 46 | Configuration.GetApplicationTempFolder, 47 | Path.GetFileNameWithoutExtension(fileName), 48 | Path.GetRandomFileName()); 49 | return fileName; 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Infrastructure/IDecompilationResultsRepository.cs: -------------------------------------------------------------------------------- 1 | using JustDecompile.External.JustAssembly; 2 | 3 | namespace JustAssembly 4 | { 5 | interface IDecompilationResultsRepository 6 | { 7 | bool ContainsAssembly(string assemblyPath); 8 | 9 | bool RemoveByAssemblyPath(string assemblyPaht); 10 | 11 | void AddDecompilationResult(string assemblyPath, IAssemblyDecompilationResults result); 12 | 13 | bool TryGetAssemblyDecompilationResult(string filePath, out IAssemblyDecompilationResults target); 14 | 15 | bool TryGetDecompilationResult(string filePath, uint moduleId, uint typeId, out IDecompilationResults target); 16 | } 17 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Infrastructure/SliderCheck.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | 6 | namespace JustAssembly 7 | { 8 | public class SliderCheck : CheckBox 9 | { 10 | public static readonly DependencyProperty ShowTextProperty = 11 | DependencyProperty.Register("ShowText", typeof(string), typeof(SliderCheck), null); 12 | 13 | public static readonly DependencyProperty HideTextProperty = 14 | DependencyProperty.Register("HideText", typeof(string), typeof(SliderCheck), null); 15 | 16 | public SliderCheck() { } 17 | 18 | public string ShowText 19 | { 20 | get { return (string)GetValue(ShowTextProperty); } 21 | set { SetValue(ShowTextProperty, value); } 22 | } 23 | 24 | public string HideText 25 | { 26 | get { return (string)GetValue(HideTextProperty); } 27 | set { SetValue(HideTextProperty, value); } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /UI/JustAssembly/Interfaces/IComparisonSessionModel.cs: -------------------------------------------------------------------------------- 1 | using JustAssembly.SelectorControl; 2 | 3 | namespace JustAssembly.Interfaces 4 | { 5 | interface IComparisonSessionModel 6 | { 7 | string Header { get; } 8 | 9 | SelectedItemType SelectedItemType { get; } 10 | 11 | ITabSourceItem GetTabSourceItem(); 12 | } 13 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Interfaces/IOldToNewTupleMap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace JustAssembly.Interfaces 6 | { 7 | public interface IOldToNewTupleMap 8 | where T : class 9 | { 10 | T OldType { get; } 11 | 12 | T NewType { get; } 13 | 14 | T GetFirstNotNullItem(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /UI/JustAssembly/Interfaces/IProgressNotifier.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using JustDecompile.External.JustAssembly; 3 | 4 | namespace JustAssembly.Interfaces 5 | { 6 | interface IProgressNotifier : IFileGenerationNotifier 7 | { 8 | bool IsBusy { get; set; } 9 | 10 | bool IsIndeterminate { get; set; } 11 | 12 | string LoadingMessage { get; set; } 13 | 14 | int Progress { get; set; } 15 | 16 | void Completed(); 17 | 18 | void CancelProgress(); 19 | 20 | CancellationToken GetCanellationToken(); 21 | } 22 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Interfaces/IResourceNode.cs: -------------------------------------------------------------------------------- 1 | using JustAssembly.Interfaces; 2 | 3 | namespace JustAssembly.Nodes 4 | { 5 | interface IResourceNode 6 | { 7 | IOldToNewTupleMap ResourceMap { get; } 8 | 9 | DifferenceDecoration DifferenceDecoration { get; } 10 | } 11 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Interfaces/IShellViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.ViewModels 2 | { 3 | public interface IShellViewModel 4 | { 5 | void CancelCurrentOperation(); 6 | 7 | void OpenNewSessionCommandExecuted(); 8 | 9 | void OpenNewSessionWithCmdLineArgsCommandExecuted(); 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Interfaces/ITabSourceItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace JustAssembly.Interfaces 5 | { 6 | interface ITabSourceItem : IProgressNotifier 7 | { 8 | TabKind TabKind { get; } 9 | 10 | string Header { get; } 11 | 12 | string ToolTip { get; } 13 | 14 | void Dispose(); 15 | 16 | void LoadContent(); 17 | 18 | void ReloadContent(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /UI/JustAssembly/Interfaces/TabKind.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.Interfaces 2 | { 3 | public enum TabKind 4 | { 5 | DirectoryBrowse, 6 | AssemblyBrowse, 7 | JustAssembly 8 | } 9 | } -------------------------------------------------------------------------------- /UI/JustAssembly/JustAssemblyBootstrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.Composition.Hosting; 4 | using System.Linq; 5 | using System.Windows; 6 | using JustAssembly.ViewModels; 7 | using Microsoft.Practices.Prism.MefExtensions; 8 | using Microsoft.Practices.Prism.Regions; 9 | 10 | namespace JustAssembly 11 | { 12 | public class JustAssemblyBootstrapper : MefBootstrapper 13 | { 14 | private readonly string[] args; 15 | 16 | public JustAssemblyBootstrapper(string[] args) 17 | { 18 | this.args = args; 19 | } 20 | 21 | protected override DependencyObject CreateShell() 22 | { 23 | return new Shell(new ShellViewModel(args), args); 24 | } 25 | 26 | protected override void InitializeShell() 27 | { 28 | this.ComposeExportedValues(); 29 | 30 | var shell = (Shell)this.Shell; 31 | 32 | base.InitializeShell(); 33 | 34 | Application.Current.MainWindow = shell; 35 | 36 | Application.Current.MainWindow.Show(); 37 | } 38 | 39 | private void ComposeExportedValues() 40 | { 41 | } 42 | 43 | protected override void ConfigureAggregateCatalog() 44 | { 45 | ConfigureServiceCatalogs(); 46 | } 47 | 48 | private void ConfigureServiceCatalogs() 49 | { 50 | List services = new List(); 51 | 52 | this.AggregateCatalog.Catalogs.Add(new TypeCatalog(services)); 53 | } 54 | 55 | protected override RegionAdapterMappings ConfigureRegionAdapterMappings() 56 | { 57 | RegionAdapterMappings mappings = base.ConfigureRegionAdapterMappings(); 58 | 59 | return mappings; 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /UI/JustAssembly/MemberMetadata/MemberDefinitionMetadataBase.cs: -------------------------------------------------------------------------------- 1 | using JustDecompile.External.JustAssembly; 2 | namespace JustAssembly 3 | { 4 | abstract class MemberDefinitionMetadataBase : MemberMetadataBase 5 | { 6 | private bool? isAPIMember; 7 | 8 | public MemberDefinitionMetadataBase(ModuleMetadata parentModule, uint tokenId) 9 | : base(parentModule.AssemblyPath, tokenId) 10 | { 11 | this.Module = parentModule; 12 | } 13 | 14 | public MemberDefinitionMetadataBase(TypeMetadata typeMetadata, uint tokenId) 15 | : this(typeMetadata.Module, tokenId) 16 | { 17 | this.Type = typeMetadata; 18 | } 19 | 20 | public abstract MemberType MemberType { get; } 21 | 22 | public override bool IsPublic 23 | { 24 | get 25 | { 26 | if (this.isAPIMember == null) 27 | { 28 | AccessModifier modifier = GetAccessModifier(); 29 | this.isAPIMember = modifier == AccessModifier.Protected || modifier == AccessModifier.Public; 30 | } 31 | return this.isAPIMember.Value; 32 | } 33 | } 34 | 35 | protected abstract AccessModifier GetAccessModifier(); 36 | 37 | public ModuleMetadata Module { get; private set; } 38 | 39 | public TypeMetadata Type { get; protected set; } 40 | } 41 | } -------------------------------------------------------------------------------- /UI/JustAssembly/MemberMetadata/MemberMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JustDecompile.External.JustAssembly; 3 | 4 | namespace JustAssembly 5 | { 6 | class MemberMetadata : MemberDefinitionMetadataBase 7 | { 8 | private readonly MemberType memberType; 9 | 10 | public MemberMetadata(TypeMetadata type, MemberType memberType, uint memberId) 11 | : base(type, memberId) 12 | { 13 | this.memberType = memberType; 14 | } 15 | 16 | public override MemberType MemberType 17 | { 18 | get { return this.memberType; } 19 | } 20 | 21 | protected override string GetNameInternal() 22 | { 23 | return Decompiler.GetMemberName(AssemblyPath, Type.Module.TokenId, Type.TokenId, TokenId, SupportedLanguage.CSharp); 24 | } 25 | 26 | public override string ToString() 27 | { 28 | return this.GetSignature(); 29 | } 30 | 31 | public string GetSignature() 32 | { 33 | string fullName = this.GetName(); 34 | int index = fullName.IndexOf(" : "); 35 | return index > 0 ? fullName.Substring(0, index) : fullName; 36 | } 37 | 38 | protected override AccessModifier GetAccessModifier() 39 | { 40 | return Decompiler.GetMemberAccessModifier(AssemblyPath, Type.Module.TokenId, Type.TokenId, TokenId, SupportedLanguage.CSharp); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /UI/JustAssembly/MemberMetadata/MemberMetadataBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace JustAssembly 5 | { 6 | public abstract class MemberMetadataBase 7 | { 8 | private string name; 9 | 10 | public MemberMetadataBase(string assemblyPath, uint tokenId) 11 | { 12 | this.AssemblyPath = assemblyPath; 13 | 14 | this.TokenId = tokenId; 15 | } 16 | 17 | public readonly uint TokenId; 18 | 19 | public readonly string AssemblyPath; 20 | 21 | public string GetName() 22 | { 23 | if (string.IsNullOrWhiteSpace(name)) 24 | { 25 | this.name = this.GetNameInternal(); 26 | } 27 | return this.name; 28 | } 29 | 30 | protected abstract string GetNameInternal(); 31 | 32 | public abstract bool IsPublic { get; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /UI/JustAssembly/MemberMetadata/ModuleMetadata.cs: -------------------------------------------------------------------------------- 1 | using JustDecompile.External.JustAssembly; 2 | 3 | namespace JustAssembly 4 | { 5 | public class ModuleMetadata : MemberMetadataBase 6 | { 7 | private bool? containsPublicTypes; 8 | 9 | public ModuleMetadata(string assemblyPath, uint tokenId) 10 | : base(assemblyPath, tokenId) 11 | { 12 | } 13 | 14 | protected override string GetNameInternal() 15 | { 16 | return Decompiler.GetModuleName(AssemblyPath, TokenId); 17 | } 18 | 19 | public override bool IsPublic 20 | { 21 | get 22 | { 23 | if (containsPublicTypes == null) 24 | { 25 | containsPublicTypes = false; 26 | foreach (uint typeId in Decompiler.GetModuleTypes(this.AssemblyPath, this.TokenId)) 27 | { 28 | AccessModifier access = Decompiler.GetTypeAccessModifier(this.AssemblyPath, this.TokenId, typeId); 29 | if (access == AccessModifier.Public || access == AccessModifier.Protected) 30 | { 31 | containsPublicTypes = true; 32 | break; 33 | } 34 | } 35 | } 36 | return this.containsPublicTypes.Value; 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /UI/JustAssembly/MemberMetadata/TypeMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JustDecompile.External.JustAssembly; 3 | 4 | namespace JustAssembly 5 | { 6 | class TypeMetadata : MemberDefinitionMetadataBase 7 | { 8 | private string fullName; 9 | 10 | public TypeMetadata(ModuleMetadata parentModule, uint tokenId) 11 | : base(parentModule, tokenId) 12 | { 13 | } 14 | 15 | public TypeMetadata(TypeMetadata typeMetadata, uint tokenId) 16 | : base(typeMetadata.Module, tokenId) 17 | { 18 | this.Type = typeMetadata; 19 | } 20 | 21 | public override MemberType MemberType 22 | { 23 | get { return MemberType.Type; } 24 | } 25 | 26 | protected override string GetNameInternal() 27 | { 28 | return Decompiler.GetTypeName(AssemblyPath, Module.TokenId, TokenId, SupportedLanguage.CSharp); 29 | } 30 | 31 | public string GetTypeFullName() 32 | { 33 | if (string.IsNullOrWhiteSpace(fullName)) 34 | { 35 | this.fullName = Decompiler.GetTypeFullName(AssemblyPath, Module.TokenId, TokenId, SupportedLanguage.CSharp); 36 | } 37 | return this.fullName; 38 | } 39 | 40 | public string GetNamespace() 41 | { 42 | return Decompiler.GetTypeNamespace(AssemblyPath, Module.TokenId, TokenId); 43 | } 44 | 45 | public override string ToString() 46 | { 47 | return this.GetName(); 48 | } 49 | 50 | protected override AccessModifier GetAccessModifier() 51 | { 52 | return Decompiler.GetTypeAccessModifier(AssemblyPath, Module.TokenId, TokenId); 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /UI/JustAssembly/MergeUtilities/AssemblyHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.Linq; 5 | using JustDecompile.External.JustAssembly; 6 | 7 | namespace JustAssembly.MergeUtilities 8 | { 9 | internal class AssemblyHelper 10 | { 11 | private readonly HashSet notSupportedFiles; 12 | 13 | public AssemblyHelper() 14 | { 15 | this.notSupportedFiles = new HashSet(); 16 | } 17 | 18 | public void AddNotSupportedFiles(string fileName) 19 | { 20 | notSupportedFiles.Add(fileName); 21 | } 22 | 23 | public bool IsValidClrAssembly(string fileName) 24 | { 25 | return Decompiler.IsValidCLRAssembly(fileName); 26 | } 27 | 28 | public IReadOnlyList GetNotSupportedFilesReadOnly() 29 | { 30 | return new ReadOnlyCollection(notSupportedFiles.ToArray()); 31 | } 32 | 33 | public void TriggerNotSupportedFilesEvent() 34 | { 35 | ErrorReadingAssembly(this, new ErrorAssemblyReadingEventArgs(GetNotSupportedFilesReadOnly())); 36 | } 37 | 38 | public static event EventHandler ErrorReadingAssembly = delegate { }; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /UI/JustAssembly/MergeUtilities/ErrorAssemblyReadingEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace JustAssembly.MergeUtilities 5 | { 6 | public class ErrorAssemblyReadingEventArgs : EventArgs 7 | { 8 | public readonly IReadOnlyList NotSupportedAssemblyPaths; 9 | 10 | public ErrorAssemblyReadingEventArgs(IReadOnlyList notSupportedAssemblyPaths) 11 | { 12 | this.NotSupportedAssemblyPaths = notSupportedAssemblyPaths; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /UI/JustAssembly/MergeUtilities/MergeManagerBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using JustAssembly.Interfaces; 5 | 6 | namespace JustAssembly.MergeUtilities 7 | { 8 | abstract class MergeManagerBase 9 | where IInput : class 10 | where IOutput : class 11 | { 12 | protected readonly IOldToNewTupleMap tupleMap; 13 | 14 | public MergeManagerBase(IOldToNewTupleMap typesTupleMap) 15 | { 16 | this.tupleMap = typesTupleMap; 17 | } 18 | 19 | public abstract IEnumerable> GetMergedCollection(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /UI/JustAssembly/MergeUtilities/OldToNewTupleMap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JustAssembly.Interfaces; 3 | 4 | namespace JustAssembly.MergeUtilities 5 | { 6 | class OldToNewTupleMap : IOldToNewTupleMap 7 | where T : class 8 | { 9 | public OldToNewTupleMap(T oldType, T newType) 10 | { 11 | this.OldType = oldType; 12 | 13 | this.NewType = newType; 14 | } 15 | 16 | public T OldType { get; private set; } 17 | 18 | public T NewType { get; private set; } 19 | 20 | public T GetFirstNotNullItem() 21 | { 22 | return OldType ?? NewType; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /UI/JustAssembly/MergeUtilities/ResourceMergeManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using JustAssembly.Extensions; 5 | using JustAssembly.Interfaces; 6 | 7 | namespace JustAssembly.MergeUtilities 8 | { 9 | class ResourceMergeManager : MergeManagerBase, string> 10 | { 11 | private readonly Comparison oldResourceNameComparer; 12 | private readonly Comparison newResourceNameComparer; 13 | private readonly Comparison resourceNameComparer; 14 | 15 | public ResourceMergeManager(IOldToNewTupleMap> resourcesMap, Comparison oldResourceNameComparer, Comparison newResourceNameComparer, 16 | Comparison resourceNameComparer) 17 | : base(resourcesMap) 18 | { 19 | this.oldResourceNameComparer = oldResourceNameComparer; 20 | this.newResourceNameComparer = newResourceNameComparer; 21 | this.resourceNameComparer = resourceNameComparer; 22 | } 23 | 24 | public override IEnumerable> GetMergedCollection() 25 | { 26 | List oldResourcesList = this.tupleMap.OldType.ToList(); 27 | oldResourcesList.Sort(oldResourceNameComparer); 28 | 29 | List newResourcesList = this.tupleMap.NewType.ToList(); 30 | newResourcesList.Sort(newResourceNameComparer); 31 | 32 | return oldResourcesList.Merge(newResourcesList, resourceNameComparer); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /UI/JustAssembly/MergeUtilities/TypesMergeManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using JustAssembly.Extensions; 4 | using JustAssembly.Interfaces; 5 | using JustDecompile.External.JustAssembly; 6 | 7 | namespace JustAssembly.MergeUtilities 8 | { 9 | class TypesMergeManager : MergeManagerBase 10 | { 11 | public TypesMergeManager(IOldToNewTupleMap typesMap) 12 | : base(typesMap) 13 | { 14 | } 15 | 16 | public override IEnumerable> GetMergedCollection() 17 | { 18 | IList leftTypes = GetSortedByFullNameTypes(tupleMap.OldType); 19 | 20 | IList rigthTypes = GetSortedByFullNameTypes(tupleMap.NewType); 21 | 22 | return leftTypes.Merge(rigthTypes, TypeDefinitionNameComparer); 23 | } 24 | 25 | private IList GetSortedByFullNameTypes(ModuleMetadata moduleDefinitionToken) 26 | { 27 | if (moduleDefinitionToken == null) 28 | { 29 | return new List(); 30 | } 31 | List types = Decompiler.GetModuleTypes(moduleDefinitionToken.AssemblyPath, moduleDefinitionToken.TokenId) 32 | .Select(i => new TypeMetadata(moduleDefinitionToken, i)) 33 | .ToList(); 34 | types.Sort(TypeDefinitionNameComparer); 35 | 36 | return types; 37 | } 38 | 39 | private int TypeDefinitionNameComparer(TypeMetadata oldType, TypeMetadata newType) 40 | { 41 | return oldType.GetTypeFullName().CompareTo(newType.GetTypeFullName()); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Nodes/APIDiff/APIDiffExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using JustAssembly.Core; 7 | using JustAssembly.Interfaces; 8 | 9 | namespace JustAssembly.Nodes.APIDiff 10 | { 11 | static class APIDiffExtensions 12 | { 13 | public static void Validate(this LoadAPIItemsContext context) 14 | { 15 | if (context != null && !context.IsEmpty) 16 | { 17 | throw new Exception("Invalid load context state."); 18 | } 19 | } 20 | 21 | public static APIDiffInfo GenerateAPIDiffInfo(this LoadAPIItemsContext context, IOldToNewTupleMap metadataTuple) 22 | { 23 | return context == null ? null : new APIDiffInfo(context.GetDiffItem(metadataTuple)); 24 | } 25 | 26 | public static LoadAPIItemsContext GenerateLoadAPIItemsContext(this APIDiffInfo apiDiffInfo) 27 | { 28 | return apiDiffInfo == null ? null : new LoadAPIItemsContext(apiDiffInfo); 29 | } 30 | 31 | public static DifferenceDecoration GetDifferenceDecoration(this IMetadataDiffItem diffItem, bool breakingChangesOnly) 32 | { 33 | if (diffItem == null || breakingChangesOnly && !diffItem.IsBreakingChange) 34 | { 35 | return DifferenceDecoration.NoDifferences; 36 | } 37 | 38 | switch (diffItem.DiffType) 39 | { 40 | case DiffType.Deleted: 41 | return DifferenceDecoration.Deleted; 42 | case DiffType.Modified: 43 | return DifferenceDecoration.Modified; 44 | case DiffType.New: 45 | return DifferenceDecoration.Added; 46 | default: 47 | throw new NotSupportedException(); 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /UI/JustAssembly/Nodes/APIDiff/APIDiffInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using JustAssembly.Core; 4 | 5 | namespace JustAssembly.Nodes.APIDiff 6 | { 7 | public class APIDiffInfo 8 | { 9 | public IMetadataDiffItem APIDiffItem { get; private set; } 10 | 11 | public APIDiffInfo(IMetadataDiffItem apiDiffItem) 12 | { 13 | this.APIDiffItem = apiDiffItem; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /UI/JustAssembly/Nodes/DifferenceDecoration.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.Nodes 2 | { 3 | public enum DifferenceDecoration 4 | { 5 | NoDifferences = 0, 6 | Modified, 7 | Deleted, 8 | Added 9 | } 10 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Nodes/FileGenerated.cs: -------------------------------------------------------------------------------- 1 | using JustDecompile.External.JustAssembly; 2 | 3 | namespace JustAssembly.Nodes 4 | { 5 | public delegate void FileGenerated(IFileGeneratedInfo args); 6 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Nodes/FilterSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JustAssembly.Nodes 4 | { 5 | public class FilterSettings 6 | { 7 | public FilterSettings(bool showUnmodified) 8 | { 9 | this.ShowUnmodified = showUnmodified; 10 | } 11 | 12 | public bool ShowUnmodified { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Nodes/NodeType.cs: -------------------------------------------------------------------------------- 1 | namespace JustAssembly.Nodes 2 | { 3 | public enum NodeType 4 | { 5 | Directory, 6 | AssemblyNode, 7 | Module, 8 | Namespace, 9 | TypeDefinition, 10 | MemberDefinition, 11 | Resource, 12 | DecompiledResource, 13 | DefaultResource 14 | } 15 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using System.Windows; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("JustAssembly")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyTrademark("")] 13 | [assembly: AssemblyCulture("")] 14 | 15 | // Setting ComVisible to false makes the types in this assembly not visible 16 | // to COM components. If you need to access a type in this assembly from 17 | // COM, set the ComVisible attribute to true on that type. 18 | [assembly: ComVisible(false)] 19 | 20 | // The following GUID is for the ID of the typelib if this project is exposed to COM 21 | [assembly: Guid("011F4E31-36E9-42C5-B628-5D5FEF20ECC5")] 22 | 23 | // Version information for an assembly consists of the following four values: 24 | // 25 | // Major Version 26 | // Minor Version 27 | // Build Number 28 | // Revision 29 | // 30 | // You can specify all the values or you can default the Build and Revision Numbers 31 | // by using the '*' as shown below: 32 | // [assembly: AssemblyVersion("1.0.*")] 33 | -------------------------------------------------------------------------------- /UI/JustAssembly/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace JustAssembly.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /UI/JustAssembly/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /UI/JustAssembly/TreeListViewRowStyleSelector.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using JustAssembly.Nodes; 4 | 5 | namespace JustAssembly 6 | { 7 | public class TreeListViewRowStyleSelector : StyleSelector 8 | { 9 | public Style AddedStyle { get; set; } 10 | 11 | public Style DeletedStyle { get; set; } 12 | 13 | public Style ModifiedStyle { get; set; } 14 | 15 | public Style NoDifferences { get; set; } 16 | 17 | public override Style SelectStyle(object item, DependencyObject container) 18 | { 19 | if (item is ItemNodeBase) 20 | { 21 | ItemNodeBase node = item as ItemNodeBase; 22 | switch (node.DifferenceDecoration) 23 | { 24 | case DifferenceDecoration.Modified: 25 | return ModifiedStyle; 26 | case DifferenceDecoration.Deleted: 27 | return DeletedStyle; 28 | case DifferenceDecoration.Added: 29 | return AddedStyle; 30 | case DifferenceDecoration.NoDifferences: 31 | return NoDifferences; 32 | default: 33 | return base.SelectStyle(item, container); 34 | } 35 | } 36 | return base.SelectStyle(item, container); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /UI/JustAssembly/ViewModels/AssembliesComparisonViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using JustAssembly.Interfaces; 3 | using JustAssembly.SelectorControl; 4 | 5 | namespace JustAssembly.ViewModels 6 | { 7 | class AssembliesComparisonViewModel : ComparisonSessionViewModelBase 8 | { 9 | public AssembliesComparisonViewModel(string[] args) 10 | : base("Compare Assemblies") 11 | { 12 | if (args != null && args.Length == 2) 13 | { 14 | OldType = args[0]; 15 | NewType = args[1]; 16 | } 17 | } 18 | 19 | public AssembliesComparisonViewModel() 20 | : base("Compare Assemblies") 21 | { 22 | } 23 | 24 | public override SelectedItemType SelectedItemType 25 | { 26 | get 27 | { 28 | return SelectedItemType.File; 29 | } 30 | } 31 | 32 | public override ITabSourceItem GetTabSourceItem() 33 | { 34 | return new AssemblyBrowseTabItem(this); 35 | } 36 | 37 | protected override bool GetLoadButtonState() 38 | { 39 | if (string.IsNullOrWhiteSpace(OldType) || string.IsNullOrWhiteSpace(NewType)) 40 | { 41 | return false; 42 | } 43 | else if (!File.Exists(OldType) || !File.Exists(NewType)) 44 | { 45 | return false; 46 | } 47 | return true; 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /UI/JustAssembly/ViewModels/AssemblyAttributeTabItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JustAssembly.Infrastructure.CodeViewer; 3 | using JustDecompile.External.JustAssembly; 4 | using JustAssembly.Nodes; 5 | 6 | namespace JustAssembly.ViewModels 7 | { 8 | class AssemblyAttributeTabItem : CodeDiffTabItemBase 9 | { 10 | public AssemblyAttributeTabItem(AssemblyNode assemblyNode) 11 | : base(assemblyNode) { } 12 | 13 | public override void LoadContent() 14 | { 15 | this.IsIndeterminate = true; 16 | this.IsBusy = true; 17 | IAssemblyDecompilationResults oldAssemblyResult; 18 | IAssemblyDecompilationResults newAssemblyResult; 19 | 20 | this.header = GetTabTitle(instance); 21 | this.toolTip = GetTabToolTip(instance); 22 | 23 | if (instance.TypesMap.OldType != null && 24 | GlobalDecompilationResultsRepository.Instance.TryGetAssemblyDecompilationResult(instance.TypesMap.OldType, out oldAssemblyResult)) 25 | { 26 | this.LeftSourceCode = new DecompiledSourceCode(instance.OldMemberMetada, oldAssemblyResult.AssemblyAttributesDecompilationResults, instance.OldSource); 27 | } 28 | if (instance.TypesMap.NewType != null && 29 | GlobalDecompilationResultsRepository.Instance.TryGetAssemblyDecompilationResult(instance.TypesMap.NewType, out newAssemblyResult)) 30 | { 31 | this.RightSourceCode = new DecompiledSourceCode(instance.NewMemberMetada, newAssemblyResult.AssemblyAttributesDecompilationResults, instance.NewSource); 32 | } 33 | this.ApplyDiff(); 34 | this.IsBusy = false; 35 | } 36 | 37 | private string GetTabTitle(AssemblyNode instance) 38 | { 39 | return string.Format("{0} Attributes", instance.Name); 40 | } 41 | 42 | private string GetTabToolTip(AssemblyNode instance) 43 | { 44 | return string.Format("{0} Attributes", instance.Name); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /UI/JustAssembly/ViewModels/AssemblyDiffTabItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JustAssembly.Infrastructure.CodeViewer; 3 | using JustAssembly.Nodes; 4 | 5 | namespace JustAssembly.ViewModels 6 | { 7 | class JustAssemblyTabItem : CodeDiffTabItemBase 8 | { 9 | public JustAssemblyTabItem(DecompiledMemberNodeBase typeNode) 10 | : base(typeNode) { } 11 | 12 | public override void LoadContent() 13 | { 14 | this.IsIndeterminate = true; 15 | this.IsBusy = true; 16 | 17 | this.header = instance.Name; 18 | this.toolTip = instance.FullName; 19 | 20 | if (this.instance.OldDecompileResult != null) 21 | { 22 | this.LeftSourceCode = new DecompiledSourceCode(instance.OldMemberMetada, instance.OldDecompileResult, instance.OldSource); 23 | } 24 | if (this.instance.NewDecompileResult != null) 25 | { 26 | this.RightSourceCode = new DecompiledSourceCode(instance.NewMemberMetada, instance.NewDecompileResult, instance.NewSource); 27 | } 28 | this.ApplyDiff(); 29 | this.IsBusy = false; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /UI/JustAssembly/ViewModels/BindingProxy.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace JustAssembly.ViewModels 4 | { 5 | // This class is used to make the DataContext property available in to GridViewColumn. This is needed because the GridViewColumn doesn't 6 | // inherit the DataContext property by default, because it's not part of the visual tree. Also, because it's not part of the visual tree, 7 | // it cannot access parent's (GridView) DataContext. See also http://www.thomaslevesque.com/2011/03/21/wpf-how-to-bind-to-data-when-the-datacontext-is-not-inherited/ 8 | public class BindingProxy : Freezable 9 | { 10 | #region Overrides of Freezable 11 | 12 | protected override Freezable CreateInstanceCore() 13 | { 14 | return new BindingProxy(); 15 | } 16 | 17 | #endregion 18 | 19 | public object Data 20 | { 21 | get { return (object)GetValue(DataProperty); } 22 | set { SetValue(DataProperty, value); } 23 | } 24 | 25 | // Using a DependencyProperty as the backing store for Data. This enables animation, styling, binding, etc... 26 | public static readonly DependencyProperty DataProperty = 27 | DependencyProperty.Register("Data", typeof(object), typeof(BindingProxy), new UIPropertyMetadata(null)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /UI/JustAssembly/ViewModels/FolderBrowseTabItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JustAssembly.Interfaces; 3 | using JustAssembly.Nodes.APIDiff; 4 | using JustAssembly.Nodes; 5 | 6 | namespace JustAssembly.ViewModels 7 | { 8 | class FolderBrowseTabItem : BrowserTabSourceItemBase 9 | { 10 | public FolderBrowseTabItem(IOldToNewTupleMap tupleMap) 11 | { 12 | FilterSettings filterSettings = new FilterSettings(this.ShowAllUnmodified); 13 | this.nodes = new ItemNodeBase[] { 14 | new FolderNode(tupleMap, null, null, this, filterSettings, true) 15 | }; 16 | 17 | this.header = GetTabTitle(tupleMap); 18 | this.toolTip = GetTabToolTip(tupleMap); 19 | } 20 | 21 | public override TabKind TabKind 22 | { 23 | get { return TabKind.DirectoryBrowse; } 24 | } 25 | 26 | public override void LoadContent() 27 | { 28 | } 29 | 30 | public override void ReloadContent() 31 | { 32 | this.nodes[currentNode].ReloadChildren(); 33 | } 34 | 35 | private void OnFolderNodeChildrenLoaded(object sender, EventArgs e) 36 | { 37 | } 38 | 39 | public override void Dispose() 40 | { 41 | this.CancelProgress(); 42 | } 43 | 44 | public override void OnProjectFileGenerated(JustDecompile.External.JustAssembly.IFileGeneratedInfo args) 45 | { 46 | this.Progress = this.progress + 1; 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /UI/JustAssembly/ViewModels/FolderComparisonViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using JustAssembly.Interfaces; 3 | using JustAssembly.SelectorControl; 4 | 5 | namespace JustAssembly.ViewModels 6 | { 7 | class FolderComparisonViewModel : ComparisonSessionViewModelBase 8 | { 9 | public FolderComparisonViewModel() 10 | : base("Compare Folders") 11 | { 12 | } 13 | 14 | public override SelectedItemType SelectedItemType 15 | { 16 | get 17 | { 18 | return SelectedItemType.Folder; 19 | } 20 | } 21 | 22 | public override ITabSourceItem GetTabSourceItem() 23 | { 24 | return new FolderBrowseTabItem(this); 25 | } 26 | 27 | protected override bool GetLoadButtonState() 28 | { 29 | if (string.IsNullOrWhiteSpace(OldType) || string.IsNullOrWhiteSpace(NewType)) 30 | { 31 | return false; 32 | } 33 | else if (!Directory.Exists(OldType) || !Directory.Exists(NewType)) 34 | { 35 | return false; 36 | } 37 | return true; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /UI/JustAssembly/ViewModels/NewSessionTabItemTemplateSelector.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using JustAssembly.Interfaces; 4 | using JustAssembly.SelectorControl; 5 | 6 | namespace JustAssembly.ViewModels 7 | { 8 | public class NewSessionTabItemTemplateSelector : DataTemplateSelector 9 | { 10 | public NewSessionTabItemTemplateSelector() { } 11 | 12 | public DataTemplate AssembliesBrowseTemplate { get; set; } 13 | 14 | public DataTemplate DirectoriesBrowseTemplate { get; set; } 15 | 16 | public override DataTemplate SelectTemplate(object item, DependencyObject container) 17 | { 18 | IComparisonSessionModel tabSourceItem = item as IComparisonSessionModel; 19 | if (tabSourceItem == null) 20 | { 21 | return base.SelectTemplate(item, container); 22 | } 23 | switch (tabSourceItem.SelectedItemType) 24 | { 25 | case SelectedItemType.File: 26 | return this.AssembliesBrowseTemplate; 27 | 28 | case SelectedItemType.Folder: 29 | return this.DirectoriesBrowseTemplate; 30 | 31 | default: 32 | return base.SelectTemplate(item, container); 33 | } 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /UI/JustAssembly/ViewModels/NewSessionViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.ObjectModel; 3 | using System.Linq; 4 | using JustAssembly.Interfaces; 5 | using Microsoft.Practices.Prism.ViewModel; 6 | using System.Collections.ObjectModel; 7 | 8 | namespace JustAssembly.ViewModels 9 | { 10 | class NewSessionViewModel : NotificationObject 11 | { 12 | private IComparisonSessionModel selectedSession; 13 | 14 | public NewSessionViewModel() 15 | { 16 | this.Tabs = new ObservableCollection 17 | { 18 | new AssembliesComparisonViewModel(), 19 | new FolderComparisonViewModel() 20 | }; 21 | this.SelectedSession = Tabs[0]; 22 | } 23 | 24 | public ObservableCollection Tabs { get; private set; } 25 | 26 | public IComparisonSessionModel SelectedSession 27 | { 28 | get 29 | { 30 | return this.selectedSession; 31 | } 32 | set 33 | { 34 | if (this.selectedSession != value) 35 | { 36 | this.selectedSession = value; 37 | 38 | this.RaisePropertyChanged("SelectedSession"); 39 | } 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /UI/JustAssembly/ViewModels/TabItemTemplateSelector.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using JustAssembly.Interfaces; 4 | 5 | namespace JustAssembly.ViewModels 6 | { 7 | public class TabItemTemplateSelector : DataTemplateSelector 8 | { 9 | public TabItemTemplateSelector() { } 10 | 11 | public DataTemplate AssemblyBrowseTemplate { get; set; } 12 | 13 | public DataTemplate JustAssemblyTemplate { get; set; } 14 | 15 | public override DataTemplate SelectTemplate(object item, DependencyObject container) 16 | { 17 | ITabSourceItem tabSourceItem = item as ITabSourceItem; 18 | if (tabSourceItem == null) 19 | { 20 | return base.SelectTemplate(item, container); 21 | } 22 | switch (tabSourceItem.TabKind) 23 | { 24 | case TabKind.DirectoryBrowse: 25 | case TabKind.AssemblyBrowse: 26 | return this.AssemblyBrowseTemplate; 27 | 28 | case TabKind.JustAssembly: 29 | return this.JustAssemblyTemplate; 30 | 31 | default: 32 | return base.SelectTemplate(item, container); 33 | } 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /UI/JustAssembly/ViewModels/XamlDiffTabItem.cs: -------------------------------------------------------------------------------- 1 | using JustAssembly.Infrastructure.CodeViewer; 2 | using JustAssembly.Nodes; 3 | using JustAssembly.DiffAlgorithm; 4 | using JustAssembly.DiffAlgorithm.Models; 5 | 6 | namespace JustAssembly.ViewModels 7 | { 8 | class XamlDiffTabItem : CodeDiffTabItemBase 9 | { 10 | public XamlDiffTabItem(XamlResourceNode xamlResourceNode) 11 | : base(xamlResourceNode) 12 | { 13 | } 14 | 15 | public override void LoadContent() 16 | { 17 | this.IsIndeterminate = true; 18 | this.IsBusy = true; 19 | 20 | this.header = instance.Name; 21 | this.toolTip = instance.FullName; 22 | 23 | if (!string.IsNullOrWhiteSpace(instance.OldSource)) 24 | { 25 | this.LeftSourceCode = new DecompiledSourceCode(instance.OldSource); 26 | } 27 | if (!string.IsNullOrWhiteSpace(instance.NewSource)) 28 | { 29 | this.RightSourceCode = new DecompiledSourceCode(instance.NewSource); 30 | } 31 | this.ApplyDiff(); 32 | this.IsBusy = false; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /UI/JustAssembly/Views/Shell.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using System.Windows; 5 | using System.Windows.Input; 6 | using JustAssembly.ViewModels; 7 | 8 | namespace JustAssembly 9 | { 10 | 11 | public partial class Shell : Window 12 | { 13 | private readonly IShellViewModel shellViewModel; 14 | private readonly string[] args; 15 | 16 | public Shell(IShellViewModel viewModel, string[] args) 17 | { 18 | this.args = args; 19 | Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose; 20 | 21 | InitializeComponent(); 22 | 23 | this.DataContext = this.shellViewModel = viewModel; 24 | 25 | this.Loaded += OnLoaded; 26 | 27 | this.PreviewKeyDown += OnMainWindowKeyDown; 28 | } 29 | 30 | private void OnLoaded(object sender, RoutedEventArgs e) 31 | { 32 | if (this.args?.Length == 0) 33 | { 34 | this.shellViewModel.OpenNewSessionCommandExecuted(); 35 | } 36 | else 37 | { 38 | this.shellViewModel.OpenNewSessionWithCmdLineArgsCommandExecuted(); 39 | } 40 | } 41 | 42 | private void OnMainWindowKeyDown(object sender, KeyEventArgs e) 43 | { 44 | if (e.Key == Key.Escape) 45 | { 46 | this.shellViewModel.CancelCurrentOperation(); 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /UI/JustAssembly/Views/SideSummary.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | --------------------------------------------------------------------------------