-
Notifications
You must be signed in to change notification settings - Fork 174
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
Add test plugin #3698
base: main
Are you sure you want to change the base?
Add test plugin #3698
Conversation
...Generator.CSharp.ClientModel.Plugin/src/Microsoft.Generator.CSharp.ClientModel.Plugin.csproj
Outdated
Show resolved
Hide resolved
...es/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel.Plugin/src/Program.cs
Outdated
Show resolved
Hide resolved
...tor/Microsoft.Generator.CSharp.ClientModel/src/Microsoft.Generator.CSharp.ClientModel.csproj
Outdated
Show resolved
Hide resolved
...sharp/generator/Microsoft.Generator.CSharp.ClientModel/src/OutputTypes/ScmKnownParameters.cs
Outdated
Show resolved
Hide resolved
...nerator/Microsoft.Generator.CSharp.ClientModel/src/Providers/MrwSerializationTypeProvider.cs
Outdated
Show resolved
Hide resolved
...client-csharp/generator/Microsoft.Generator.CSharp.TestPlugin/src/Properties/AssemblyInfo.cs
Outdated
Show resolved
Hide resolved
...-client-csharp/generator/Microsoft.Generator.CSharp.TestPlugin/test/Mocks/MockTypeFactory.cs
Outdated
Show resolved
Hide resolved
...sharp/generator/Microsoft.Generator.CSharp/perf/Microsoft.Generator.CSharp.Tests.Perf.csproj
Outdated
Show resolved
Hide resolved
...s/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Properties/launchSettings.json
Outdated
Show resolved
Hide resolved
...ages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Providers/MethodProvider.cs
Outdated
Show resolved
Hide resolved
…it-out-plugins
@@ -28,16 +26,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Generator.CSharp. | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestProjects.Local.Tests", "TestProjects\ProjFiles\TestProjects.Local.Tests.csproj", "{3AEDFB67-39E3-4BB7-976E-F44F59402034}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Generator.CSharp.ClientModel", "Microsoft.Generator.CSharp.ClientModel\src\Microsoft.Generator.CSharp.ClientModel.csproj", "{3712A9A0-EDC4-4CB8-81E4-EBF4993EF350}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProjects.Plugin.Tests", "TestProjects\ProjFiles\TestProjects.Plugin.Tests.csproj", "{0E3D9973-FD30-4130-8652-26EF39B76D69}" |
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.
do we need this project still if we are collapsing plugins back together with their impl?
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.
Yes, this is the generated project for the test plugin.
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.
would this exist if you had this sample plugin in the final samples location which might be in a different repo?
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.
Remove these from solns and get rid of proj refs.
packages/http-client-csharp/generator/TestPlugin/src/OutputTypes/TestPluginOutputLibrary.cs
Outdated
Show resolved
Hide resolved
packages/http-client-csharp/generator/TestPlugin/src/OutputTypes/TestPluginTypeFactory.cs
Outdated
Show resolved
Hide resolved
packages/http-client-csharp/generator/TestPlugin/src/TestPlugin.csproj
Outdated
Show resolved
Hide resolved
API change check APIView has identified API level changes in this PR and created following API reviews. |
No changes needing a change description found. |
{ | ||
public class ClientMethodProvider : MethodProvider | ||
{ | ||
public ClientMethodProvider(MethodSignatureBase signature, MethodBodyStatement bodyStatements, TypeProvider enclosingType, XmlDocProvider? xmlDocProvider = default) : base(signature, bodyStatements, enclosingType, xmlDocProvider) |
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.
I think we should settle on a convention for prefixing overrides by mgc.cm. I think Scm
makes sense, but we should be consistent throughout the library.
...enerator/Microsoft.Generator.CSharp.ClientModel/src/Providers/ScmMethodProviderCollection.cs
Show resolved
Hide resolved
@@ -28,16 +26,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Generator.CSharp. | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestProjects.Local.Tests", "TestProjects\ProjFiles\TestProjects.Local.Tests.csproj", "{3AEDFB67-39E3-4BB7-976E-F44F59402034}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Generator.CSharp.ClientModel", "Microsoft.Generator.CSharp.ClientModel\src\Microsoft.Generator.CSharp.ClientModel.csproj", "{3712A9A0-EDC4-4CB8-81E4-EBF4993EF350}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProjects.Plugin.Tests", "TestProjects\ProjFiles\TestProjects.Plugin.Tests.csproj", "{0E3D9973-FD30-4130-8652-26EF39B76D69}" |
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.
would this exist if you had this sample plugin in the final samples location which might be in a different repo?
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProjects.Plugin.Tests", "TestProjects\ProjFiles\TestProjects.Plugin.Tests.csproj", "{0E3D9973-FD30-4130-8652-26EF39B76D69}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SamplePlugin", "SamplePlugin\src\SamplePlugin.csproj", "{6825281D-C6BD-4E34-9F60-109D164EC928}" |
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.
same comment as above, I don't think this should be here given samples won't live here.
/// Converts an expression-based method provider to a method provider with <see cref="BodyStatements"/> populated. If the instance already has body statements, it is returned as is. | ||
/// </summary> | ||
/// <returns>An instance of a <see cref="MethodProvider"/> with <see cref="BodyStatements"/> populated.</returns> | ||
public MethodProvider ToBodyStatementMethodProvider() |
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.
Feels like an internal helper not something we want as a public API.
...client-csharp/generator/Microsoft.Generator.CSharp/src/Providers/MethodProviderCollection.cs
Outdated
Show resolved
Hide resolved
packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/StartUp/PluginHandler.cs
Show resolved
Hide resolved
packages/http-client-csharp/generator/SamplePlugin/src/Program.cs
Outdated
Show resolved
Hide resolved
packages/http-client-csharp/generator/SamplePlugin/src/SamplePlugin.csproj
Show resolved
Hide resolved
Found while working on #3698
Adds a test plugin demonstrating simple tracing and customization of list setters.
Fixes #3672