[
https://issues.apache.org/jira/browse/AVRO-3453?focusedWorklogId=753539&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-753539
]
ASF GitHub Bot logged work on AVRO-3453:
----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Apr/22 17:23
Start Date: 06/Apr/22 17:23
Worklog Time Spent: 10m
Work Description: zcsizmadia commented on code in PR #1605:
URL: https://github.com/apache/avro/pull/1605#discussion_r844200517
##########
lang/csharp/src/apache/test/AvroGen/AvroGenHelper.cs:
##########
@@ -93,20 +93,21 @@ public static Assembly
CompileCSharpFilesIntoLibrary(IEnumerable<string> sourceF
{
typeof(object).Assembly.Location,
typeof(Schema).Assembly.Location,
+
typeof(System.CodeDom.Compiler.GeneratedCodeAttribute).Assembly.Location,
Path.Combine(assemblyPath, "System.Runtime.dll"),
Path.Combine(assemblyPath, "netstandard.dll")
};
// Create compiler
CSharpCompilation compilation = CSharpCompilation
- .Create(assemblyName)
- .WithOptions(new
CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary))
- .AddReferences(assemblies.Select(path =>
MetadataReference.CreateFromFile(path)))
- .AddSyntaxTrees(sourceFiles.Select(sourceFile =>
- {
- string sourceText =
System.IO.File.ReadAllText(sourceFile);
- return CSharpSyntaxTree.ParseText(sourceText);
- }));
+ .Create(assemblyName)
Review Comment:
Hmmm, my VS does not do that. Since it is not related to this PR, could you
revert that formatting change?
Issue Time Tracking
-------------------
Worklog Id: (was: 753539)
Time Spent: 6h 20m (was: 6h 10m)
> C# Avrogen Add Generated Code Attribute
> ---------------------------------------
>
> Key: AVRO-3453
> URL: https://issues.apache.org/jira/browse/AVRO-3453
> Project: Apache Avro
> Issue Type: Improvement
> Components: csharp
> Affects Versions: 1.11.1
> Reporter: Kyle Schoonover
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 6h 20m
> Remaining Estimate: 0h
>
> Development environments that use Code Analysis or something similar attempt
> to exclude auto generated code. By adding this attribute to generated
> classes, code analysis will skip over evaluating the code.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)