-
Notifications
You must be signed in to change notification settings - Fork 49
Added type forwarding check #548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e139669
Added type forwarding check
jeffreyxrh c9c7d3f
Update MDocUpdater.cs
jeffreyxrh a960c00
Update MDocUpdater.cs
jeffreyxrh 236c7d3
Merge branch 'develop' into jex/373824
jeffreyxrh 1ede395
Added test for type forwarding
jeffreyxrh 5bf7f89
Updated en.expected.typeForwards
jeffreyxrh a54e279
Create Four.xml
jeffreyxrh b77a04a
Added different TypeDefinitions integration test
jeffreyxrh c8e7215
Delete extra actual xml
jeffreyxrh ea4b331
Update TheClass.xml
jeffreyxrh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| namespace TheNamespace | ||
| { | ||
| public class TheClass | ||
| { | ||
| #if FIRST | ||
| public TheClass(int arg) | ||
| {} | ||
| #endif | ||
| #if SECOND | ||
| public TheClass(string arg) | ||
| {} | ||
| #endif | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
mdoc/Test/en.expected.differentTypeDefinitions/FrameworksIndex/One.xml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Framework Name="One"> | ||
| <Assemblies> | ||
| <Assembly Name="DocTest-differentTypeDefinitions-First" Version="0.0.0.0" /> | ||
| <Assembly Name="DocTest-differentTypeDefinitions-Second" Version="0.0.0.0" /> | ||
| </Assemblies> | ||
| <Namespace Name="TheNamespace"> | ||
| <Type Name="TheNamespace.TheClass" Id="T:TheNamespace.TheClass"> | ||
| <Member Id="M:TheNamespace.TheClass.#ctor(System.Int32)" /> | ||
| <Member Id="M:TheNamespace.TheClass.#ctor(System.String)" /> | ||
| </Type> | ||
| </Namespace> | ||
| </Framework> |
56 changes: 56 additions & 0 deletions
56
mdoc/Test/en.expected.differentTypeDefinitions/TheNamespace/TheClass.xml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| <Type Name="TheClass" FullName="TheNamespace.TheClass"> | ||
| <TypeSignature Language="C#" Value="public class TheClass" /> | ||
| <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit TheClass extends System.Object" /> | ||
| <AssemblyInfo> | ||
| <AssemblyName>DocTest-differentTypeDefinitions-First</AssemblyName> | ||
| <AssemblyVersion>0.0.0.0</AssemblyVersion> | ||
| </AssemblyInfo> | ||
| <AssemblyInfo> | ||
| <AssemblyName>DocTest-differentTypeDefinitions-Second</AssemblyName> | ||
| <AssemblyVersion>0.0.0.0</AssemblyVersion> | ||
| </AssemblyInfo> | ||
| <Base> | ||
| <BaseTypeName>System.Object</BaseTypeName> | ||
| </Base> | ||
| <Interfaces /> | ||
| <Docs> | ||
| <summary>To be added.</summary> | ||
| <remarks>To be added.</remarks> | ||
| </Docs> | ||
| <Members> | ||
| <Member MemberName=".ctor"> | ||
| <MemberSignature Language="C#" Value="public TheClass (int arg);" /> | ||
| <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 arg) cil managed" /> | ||
| <MemberType>Constructor</MemberType> | ||
| <AssemblyInfo> | ||
| <AssemblyName>DocTest-differentTypeDefinitions-First</AssemblyName> | ||
| <AssemblyVersion>0.0.0.0</AssemblyVersion> | ||
| </AssemblyInfo> | ||
| <Parameters> | ||
| <Parameter Name="arg" Type="System.Int32" /> | ||
| </Parameters> | ||
| <Docs> | ||
| <param name="arg">To be added.</param> | ||
| <summary>To be added.</summary> | ||
| <remarks>To be added.</remarks> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName=".ctor"> | ||
| <MemberSignature Language="C#" Value="public TheClass (string arg);" /> | ||
| <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string arg) cil managed" /> | ||
| <MemberType>Constructor</MemberType> | ||
| <AssemblyInfo> | ||
| <AssemblyName>DocTest-differentTypeDefinitions-Second</AssemblyName> | ||
| <AssemblyVersion>0.0.0.0</AssemblyVersion> | ||
| </AssemblyInfo> | ||
| <Parameters> | ||
| <Parameter Name="arg" Type="System.String" /> | ||
| </Parameters> | ||
| <Docs> | ||
| <param name="arg">To be added.</param> | ||
| <summary>To be added.</summary> | ||
| <remarks>To be added.</remarks> | ||
| </Docs> | ||
| </Member> | ||
| </Members> | ||
| </Type> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| <Overview> | ||
| <Assemblies> | ||
| <Assembly Name="DocTest-differentTypeDefinitions-First" Version="0.0.0.0"> | ||
| <Attributes> | ||
| <Attribute> | ||
| <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName> | ||
| </Attribute> | ||
| <Attribute> | ||
| <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName> | ||
| </Attribute> | ||
| </Attributes> | ||
| </Assembly> | ||
| <Assembly Name="DocTest-differentTypeDefinitions-Second" Version="0.0.0.0"> | ||
| <Attributes> | ||
| <Attribute> | ||
| <AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName> | ||
| </Attribute> | ||
| <Attribute> | ||
| <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName> | ||
| </Attribute> | ||
| </Attributes> | ||
| </Assembly> | ||
| </Assemblies> | ||
| <Remarks>To be added.</Remarks> | ||
| <Copyright>To be added.</Copyright> | ||
| <Types> | ||
| <Namespace Name="TheNamespace"> | ||
| <Type Name="TheClass" Kind="Class" /> | ||
| </Namespace> | ||
| </Types> | ||
| <Title>Untitled</Title> | ||
| </Overview> |
6 changes: 6 additions & 0 deletions
6
mdoc/Test/en.expected.differentTypeDefinitions/ns-TheNamespace.xml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <Namespace Name="TheNamespace"> | ||
| <Docs> | ||
| <summary>To be added.</summary> | ||
| <remarks>To be added.</remarks> | ||
| </Docs> | ||
| </Namespace> |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two similar but independent scenarios that this fix should be addressing:
TypeDefinitions (ie. different members ... such as different extension methods depending on which assembly reference you've added).I would like to see some integration tests that reflect both of these scenarios. In fact, there's already a type forward test included here ... maybe you could add to that particular test, a separate test class that reflects the second scenario, to make sure that mdoc will correctly add all methods in both classes.