Filtering sources based on assembly type#1537
Merged
mayankbansal018 merged 4 commits intomicrosoft:masterfrom Apr 11, 2018
Merged
Filtering sources based on assembly type#1537mayankbansal018 merged 4 commits intomicrosoft:masterfrom
mayankbansal018 merged 4 commits intomicrosoft:masterfrom
Conversation
abhishkk
commented
Apr 9, 2018
| if (discoverer.Metadata.AssemblyType == AssemblyType.Native || | ||
| discoverer.Metadata.AssemblyType == AssemblyType.Managed) | ||
| { | ||
| assemblyTypeToSoucesMap = assemblyTypeToSoucesMap ?? GetAssemblyTypeToSoucesMap(sources); |
* Correcting Tests
abhishkk
commented
Apr 10, 2018
| private DiscoveryResultCache discoveryResultCache; | ||
| private Mock<IRequestData> mockRequestData; | ||
| private Mock<IMetricsCollection> mockMetricsCollection; | ||
| private Mock<IAssemblyProperties> mockPEReaderHelper; |
Contributor
Author
There was a problem hiding this comment.
renaming mockPEReaderHelper to mockAssemblyProperties
smadala
approved these changes
Apr 10, 2018
| this.assemblyProperties = new AssemblyProperties(); | ||
| } | ||
|
|
||
| // Added this to make class testable, needed a PEHeader mocked Instance |
Contributor
There was a problem hiding this comment.
Nit: needed a AssemblyProperties or remove comment.
| { | ||
| var sourcesToCheck = sources; | ||
|
|
||
| if (discoverer.Metadata.AssemblyType == AssemblyType.Native || |
Contributor
There was a problem hiding this comment.
Is there a chance discoverer can support both managed and native?
Contributor
Author
There was a problem hiding this comment.
No. adapter can't mention both
| assemblyTypeToSoucesMap[assemblyProperties.GetAssemblyType(source)] : | ||
| assemblyTypeToSoucesMap[AssemblyType.None]; | ||
|
|
||
| ((List<string>)sourcesList).Add(source); |
| } | ||
| finally | ||
| { | ||
| this.ResetDiscoverers(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 3 of RFC:
Contains changes for filtering sources based on assembly type.