You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/02/04 09:07:04 UTC
[avro] 02/02: AVRO-3353 simplified naming in CodeGen (#1504)
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch branch-1.11
in repository https://gitbox.apache.org/repos/asf/avro.git
commit 98217a3fc33806998df4e35e07c36b739b78d246
Author: Kyle Schoonover <ky...@minmaxcorp.com>
AuthorDate: Fri Feb 4 01:06:27 2022 -0800
AVRO-3353 simplified naming in CodeGen (#1504)
Co-authored-by: Kyle T. Schoonover <Ky...@nordstrom.com>
(cherry picked from commit 60cdcd0e4dcc87a702a37272767e6e5e5c961aaf)
---
lang/csharp/src/apache/main/CodeGen/CodeGen.cs | 28 +++++++++++++-------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/lang/csharp/src/apache/main/CodeGen/CodeGen.cs b/lang/csharp/src/apache/main/CodeGen/CodeGen.cs
index 22bb4c1..136a9a7 100644
--- a/lang/csharp/src/apache/main/CodeGen/CodeGen.cs
+++ b/lang/csharp/src/apache/main/CodeGen/CodeGen.cs
@@ -119,7 +119,7 @@ namespace Avro
/// <returns>
/// Code Namespace.
/// </returns>
- /// <exception cref="System.ArgumentNullException">name - name cannot be null.</exception>
+ /// <exception cref="ArgumentNullException">name - name cannot be null.</exception>
protected virtual CodeNamespace AddNamespace(string name)
{
if (string.IsNullOrEmpty(name))
@@ -152,7 +152,7 @@ namespace Avro
/// <returns>
/// Code Namespace.
/// </returns>
- /// <exception cref="System.ArgumentNullException">name - name cannot be null.</exception>
+ /// <exception cref="ArgumentNullException">name - name cannot be null.</exception>
[Obsolete("This method is deprecated and it will be removed in a future release! Please change call to AddNamespace(string name).")]
protected virtual CodeNamespace addNamespace(string name)
{
@@ -181,7 +181,7 @@ namespace Avro
/// <exception cref="CodeGenException">Names in schema should only be of type NamedSchema, type found " + sn.Value.Tag.</exception>
protected virtual void ProcessSchemas()
{
- foreach (Schema schema in this.Schemas)
+ foreach (Schema schema in Schemas)
{
SchemaNames names = GenerateNames(schema);
foreach (KeyValuePair<SchemaName, NamedSchema> sn in names)
@@ -252,7 +252,7 @@ namespace Avro
/// <returns>
/// List of named schemas.
/// </returns>
- /// <exception cref="System.ArgumentNullException">protocol - Protocol can not be null.</exception>
+ /// <exception cref="ArgumentNullException">protocol - Protocol can not be null.</exception>
[Obsolete("This method is deprecated and it will be removed in a future release! Please use GenerateNames() instead.")]
protected virtual SchemaNames generateNames(Protocol protocol)
{
@@ -266,7 +266,7 @@ namespace Avro
/// <returns>
/// List of named schemas.
/// </returns>
- /// <exception cref="System.ArgumentNullException">protocol - Protocol can not be null.</exception>
+ /// <exception cref="ArgumentNullException">protocol - Protocol can not be null.</exception>
protected virtual SchemaNames GenerateNames(Protocol protocol)
{
if (protocol == null)
@@ -315,7 +315,7 @@ namespace Avro
/// </summary>
/// <param name="schema">schema object to search.</param>
/// <param name="names">list of named schemas.</param>
- /// <exception cref="Avro.CodeGenException">Unable to add name for " + schema.Name + " type " + schema.Tag.</exception>
+ /// <exception cref="CodeGenException">Unable to add name for " + schema.Name + " type " + schema.Tag.</exception>
protected virtual void addName(Schema schema, SchemaNames names)
{
NamedSchema ns = schema as NamedSchema;
@@ -381,7 +381,7 @@ namespace Avro
/// Creates a class declaration for fixed schema.
/// </summary>
/// <param name="schema">fixed schema.</param>
- /// <exception cref="Avro.CodeGenException">
+ /// <exception cref="CodeGenException">
/// Unable to cast schema into a fixed
/// or
/// Namespace required for enum schema " + fixedSchema.Name.
@@ -445,7 +445,7 @@ namespace Avro
/// Creates an enum declaration.
/// </summary>
/// <param name="schema">enum schema.</param>
- /// <exception cref="Avro.CodeGenException">
+ /// <exception cref="CodeGenException">
/// Unable to cast schema into an enum
/// or
/// Enum symbol " + symbol + " is a C# reserved keyword
@@ -495,7 +495,7 @@ namespace Avro
/// Generates code for an individual protocol.
/// </summary>
/// <param name="protocol">Protocol to generate code for.</param>
- /// <exception cref="Avro.CodeGenException">Namespace required for enum schema " + nspace.</exception>
+ /// <exception cref="CodeGenException">Namespace required for enum schema " + nspace.</exception>
protected virtual void processInterface(Protocol protocol)
{
// Create abstract class
@@ -603,7 +603,7 @@ namespace Avro
requestMethod.Name = "Request";
requestMethod.ReturnType = new CodeTypeReference(typeof(void));
{
- var requestor = new CodeParameterDeclarationExpression(typeof(Avro.Specific.ICallbackRequestor),
+ var requestor = new CodeParameterDeclarationExpression(typeof(Specific.ICallbackRequestor),
"requestor");
requestMethod.Parameters.Add(requestor);
@@ -708,7 +708,7 @@ namespace Avro
/// <returns>
/// A new class code type declaration.
/// </returns>
- /// <exception cref="Avro.CodeGenException">
+ /// <exception cref="CodeGenException">
/// Unable to cast schema into a record
/// or
/// Namespace required for record schema " + recordSchema.Name.
@@ -885,7 +885,7 @@ namespace Avro
/// <returns>
/// Name of the schema's C# type representation.
/// </returns>
- /// <exception cref="Avro.CodeGenException">
+ /// <exception cref="CodeGenException">
/// Unable to cast schema into a named schema
/// or
/// Unable to cast schema into a named schema
@@ -1052,7 +1052,7 @@ namespace Avro
/// <returns>
/// schema that is nullable.
/// </returns>
- /// <exception cref="System.ArgumentNullException">schema - UnionSchema can not be null.</exception>
+ /// <exception cref="ArgumentNullException">schema - UnionSchema can not be null.</exception>
[Obsolete("This method is deprecated and it will be removed in a future release! Please use GetNullableType() instead.")]
public static Schema getNullableType(UnionSchema schema)
{
@@ -1066,7 +1066,7 @@ namespace Avro
/// <returns>
/// schema that is nullable.
/// </returns>
- /// <exception cref="System.ArgumentNullException">schema - UnionSchema can not be null.</exception>
+ /// <exception cref="ArgumentNullException">schema - UnionSchema can not be null.</exception>
public static Schema GetNullableType(UnionSchema schema)
{
if (schema == null)