[
https://issues.apache.org/jira/browse/AVRO-2211?focusedWorklogId=742735&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-742735
]
ASF GitHub Bot logged work on AVRO-2211:
----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Mar/22 20:03
Start Date: 16/Mar/22 20:03
Worklog Time Spent: 10m
Work Description: yanivru commented on a change in pull request #1597:
URL: https://github.com/apache/avro/pull/1597#discussion_r828398569
##########
File path: lang/csharp/src/apache/main/Schema/EnumSchema.cs
##########
@@ -47,6 +48,33 @@ public class EnumSchema : NamedSchema
/// </summary>
public int Count { get { return Symbols.Count; } }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="EnumSchema"/> class.
+ /// </summary>
+ /// <param name="name">name of enum.</param>
+ /// <param name="space">namespace of enum.</param>
+ /// <param name="aliases">list of aliases for the name.</param>
+ /// <param name="symbols">list of enum symbols.</param>
+ /// <param name="customProperties">custom properties on this
schema.</param>
+ /// <param name="doc">documentation for this named schema.</param>
+ /// <param name="defaultSymbol"></param>
+ public EnumSchema(string name,
Review comment:
NewInstance is internal, and it's more of a deserializer than an object
creator, it contains a lot of logic. I can change the public constructors to a
factory method (how should I call it?), is that the 'interface' we want the
schema classes to expose? I think constructor is a bit more convenient to use.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 742735)
Time Spent: 1h 20m (was: 1h 10m)
> SchemaBuilder equivalent or other means of schema creation
> ----------------------------------------------------------
>
> Key: AVRO-2211
> URL: https://issues.apache.org/jira/browse/AVRO-2211
> Project: Apache Avro
> Issue Type: Wish
> Components: csharp
> Reporter: Dan Stelljes
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> Currently, the only way to create a schema is via the Schema.Parse method.
> We'd like to be able to build a schema programmatically—would it be possible
> to (1) introduce an analogue to the SchemaBuilder from the Java library or
> (2) expose constructors on Schema and its descendants?
> Would be more than happy to contribute work on this given some direction.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)