-
Notifications
You must be signed in to change notification settings - Fork 9
VS-156: Support Strong Named 2.28 Driver #84
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
Conversation
tests/MongoDB.Analyzer.Tests/Infrastructure/DiagnosticsAnalyzer.cs
Outdated
Show resolved
Hide resolved
tests/MongoDB.Analyzer.Tests/Infrastructure/DiagnosticsAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/MongoDB.Analyzer/Core/Utilities/AnalysisCodeGeneratorUtilities.cs
Outdated
Show resolved
Hide resolved
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.
Few more changes requested.
src/MongoDB.Analyzer/Core/Utilities/AnalysisCodeGeneratorUtilities.cs
Outdated
Show resolved
Hide resolved
src/MongoDB.Analyzer/Core/Utilities/AnalysisCodeGeneratorUtilities.cs
Outdated
Show resolved
Hide resolved
src/MongoDB.Analyzer/Core/Utilities/AnalysisCodeGeneratorUtilities.cs
Outdated
Show resolved
Hide resolved
@@ -56,5 +60,7 @@ analysisType switch | |||
AnalysisType.Poco => JsonSyntaxElements.Poco.JsonGeneratorFullName, | |||
_ => throw new ArgumentOutOfRangeException(nameof(analysisType), analysisType, "Unsupported analysis type") | |||
}; | |||
|
|||
private static bool IsDriverVersion_2_28_Or_Greater(Version driverVersion) => driverVersion >= s_driverVersion_2_28; |
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.
It's pretty simple condition, probably no need for a separate method.
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.
Done
PathUtilities.VerifyTestDataModelAssembly(); | ||
var isDriverVersion_2_28_OrGreater = PathUtilities.IsDriverVersion_2_28_OrGreater(driverVersion); | ||
var testDataModelAssembly = isDriverVersion_2_28_OrGreater ? PathUtilities.TestDataModelAssemblyPathDriver_2_28_OrGreater : PathUtilities.TestDataModelAssemblyPathDriver_2_27_OrLower; | ||
PathUtilities.VerifyTestDataModelAssembly(testDataModelAssembly); |
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.
Maybe refactor all this to PathUtililites.GetTestDataModelAssemblyPath
?
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.
Done
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.
LGTM, good job!
syntaxTrees, | ||
referencesContainer.References, | ||
new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)); | ||
new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, publicSign: true, cryptoPublicKey: s_publicKey.ToImmutableArray())); |
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.
make s_publicKey
immutable array, to skip the conversion each time.
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.
Done
No description provided.